Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterate over additional secret keys, making all available #1110

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

ralphbean
Copy link
Member

Two bugs are fixed here.

First, the buildah --secret arg expects a file, not a directory, so every key/value pair in the kubernetes secrets mounted in needs to be supplied as a separate argument to buildah.

Second, buildah won't accept symlinks and all of the individual files in the mounted directory are symlinks. The -L option to cp addresses that by de-referencing them.

@ralphbean
Copy link
Member Author

Related PR: containers/ai-lab-recipes#656

Copy link
Contributor

@chmeliik chmeliik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one bash suggestion

task/buildah-oci-ta/0.1/buildah-oci-ta.yaml Outdated Show resolved Hide resolved
ralphbean and others added 3 commits July 3, 2024 14:35
Two bugs are fixed here.

First, the buildah `--secret` arg expects a *file*, not a directory, so
every key/value pair in the kubernetes secrets mounted in needs to be
supplied as a separate argument to buildah.

Second, buildah won't accept symlinks and all of the individual files in
the mounted directory are symlinks. The `-L` option to `cp` addresses
that by de-referencing them.
It is more robust https://www.shellcheck.net/wiki/SC2044

And, this form still updates BUILDAH_ARGS in the current shell, unlike
`find ... | while read ...` which would try to update them in a
subshell.
@ralphbean ralphbean merged commit 5ec32c4 into main Jul 3, 2024
7 checks passed
@ralphbean ralphbean deleted the secrets-fix branch July 3, 2024 19:57
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.

2 participants