Skip to content

cmd/run, pkg/utils, doc: Add include-env and exclude-env config options - #1866

Open
lilith-aster wants to merge 1 commit into
containers:mainfrom
lilith-aster:issue-998-env-config
Open

lilith-aster wants to merge 1 commit into
containers:mainfrom
lilith-aster:issue-998-env-config

Conversation

@lilith-aster

Copy link
Copy Markdown

Allow users and distributors to customize which host environment variables are forwarded into containers by 'toolbox enter' and 'toolbox run' via 'include-env' and 'exclude-env' under [general] in toolbox.conf(5).

Names are matched exactly and case-sensitively. Variables absent from the host environment are skipped, empty values are forwarded, and 'exclude-env' takes precedence over both 'include-env' and the built-in preserved list. Duplicate entries are deduplicated, and '--env=' values are omitted from debug logs.

ForwardToHost() continues to use only the built-in preserved variable list.

Close #998

Allow users and distributors to customize which host environment
variables are forwarded into containers by 'toolbox enter' and
'toolbox run' via 'include-env' and 'exclude-env' under [general] in
toolbox.conf(5).

Names are matched exactly and case-sensitively. Variables absent from
the host environment are skipped, empty values are forwarded, and
'exclude-env' takes precedence over both 'include-env' and the built-in
preserved list. Duplicate entries are deduplicated, and '--env=' values
are omitted from debug logs.

ForwardToHost() continues to use only the built-in preserved variable
list.

containers#998

Signed-off-by: Lilith Aster <lilith@lilith-aster.me>
@centosinfra-prod-github-app

Copy link
Copy Markdown

Build succeeded.
https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/local/buildset/1eef8093ea7542b9ab35d005f0019832

✔️ unit-test SUCCESS in 2m 08s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 09s
✔️ unit-test-restricted SUCCESS in 2m 05s
✔️ system-test-fedora-rawhide-commands-options SUCCESS in 32m 35s
✔️ system-test-fedora-rawhide-runtime-environment-arch-fedora SUCCESS in 22m 58s
✔️ system-test-fedora-rawhide-runtime-environment-ubuntu SUCCESS in 5m 31s
✔️ system-test-fedora-45-commands-options SUCCESS in 32m 20s
✔️ system-test-fedora-45-runtime-environment-arch-fedora SUCCESS in 22m 42s
✔️ system-test-fedora-45-runtime-environment-ubuntu SUCCESS in 5m 30s
✔️ system-test-fedora-44-commands-options SUCCESS in 30m 33s
✔️ system-test-fedora-44-runtime-environment-arch-fedora SUCCESS in 22m 09s
✔️ system-test-fedora-44-runtime-environment-ubuntu SUCCESS in 5m 27s
✔️ system-test-fedora-43-commands-options SUCCESS in 30m 05s
✔️ system-test-fedora-43-runtime-environment-arch-fedora SUCCESS in 21m 57s
✔️ system-test-fedora-43-runtime-environment-ubuntu SUCCESS in 5m 33s
✔️ system-test-fedora-coreos-next-commands-options SUCCESS in 30m 58s
✔️ system-test-fedora-coreos-next-runtime-environment-arch-fedora SUCCESS in 24m 31s
✔️ system-test-fedora-coreos-next-runtime-environment-ubuntu SUCCESS in 6m 12s
✔️ system-test-fedora-coreos-stable-commands-options SUCCESS in 33m 20s
✔️ system-test-fedora-coreos-stable-runtime-environment-arch-fedora SUCCESS in 25m 20s
✔️ system-test-fedora-coreos-stable-runtime-environment-ubuntu SUCCESS in 6m 36s
✔️ system-test-fedora-coreos-testing-commands-options SUCCESS in 30m 45s
✔️ system-test-fedora-coreos-testing-runtime-environment-arch-fedora SUCCESS in 23m 15s
✔️ system-test-fedora-coreos-testing-runtime-environment-ubuntu SUCCESS in 6m 10s

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow (potentially selective) preservation of environment variables

1 participant