Files
tools/stx/lib/stx/stx_control.py
Davlet Panech 01144d82d1 debian: preserve k8s env vars when entering pods
Currently "stx control enter" starts bash inside the container as the
root user, then runs a child bash instance as user $MYUSER via sudo.
This resets the environment for $MYUSER, removing any variables passed
to the pod by k8s.

Use "runuser" rather than "sudo" when starting bash inside the builder
pod.

Tests
=====

- Verified nothing sensitive is inherited from the root account's
  environment to $MYUSER
- Verified k8s-created env vars are passed to $MYUSER
- Performed a full build

Story: 2009897
Task: 44691
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: Ib2fcf2b9ed5b644a0c512216c04682bf0d7188af
2022-03-07 12:07:43 -05:00

12 KiB