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

cmd-remote-build-container: Add support for secret, mount-host-ca-cer… #4033

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

ravanelli
Copy link
Member

…ts, and security-opt parameters

  • Allow passing secret files and SELinux labels in remote builds.
  • Enable mounting the host's CA certificates, as they are already available by default on the host.

@ravanelli ravanelli requested review from jlebon and jbtrystram March 3, 2025 20:46
jlebon
jlebon previously approved these changes Mar 4, 2025
Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

Final nits, otherwise LGTM!

parser.add_argument(
'--repo', default='localhost', required=False,
help='Registry repository')
parser.add_argument(
'--secret', required=False, action='append', default=[],
help='Provide a local secret for remote access. Uses the same syntax as podman --secret')
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
help='Provide a local secret for remote access. Uses the same syntax as podman --secret')
help='Provide a local secret for remote access. Uses the same syntax as `podman build --secret`')

help='Provide a local secret for remote access. Uses the same syntax as podman --secret')
parser.add_argument(
'--security-opt', required=False,
help='Set SELinux options. Uses the same syntax as podman --security-opt')
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
help='Set SELinux options. Uses the same syntax as podman --security-opt')
help='Set SELinux options. Uses the same syntax as `podman build --security-opt`')

…ts, and security-opt parameters

- Allow passing secret files and SELinux labels in remote builds.
- Enable mounting the host's CA certificates, as they are already
available by default on the host.

Signed-off-by: Renata Ravanelli <[email protected]>
Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

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

CI failure is unrelated. CI doesn't test this (apart from the Python lint/flake checks, which passed), so let's just merge it.

@jlebon jlebon merged commit 707c2d6 into coreos:main Mar 5, 2025
4 of 5 checks passed
Comment on lines +34 to +36
if secret:
for s in secret:
cmd.append(f"--secret={s}")
Copy link
Member

Choose a reason for hiding this comment

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

I guess this could be just

for secret in secrets:
    cmd.append(f"--secret={secret}")

but not worth the respin.

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