Skip to content

fix: [CI-21630]: Fix inherit flow if creds are empty#98

Open
smjt-h wants to merge 1 commit intomasterfrom
dlcdef
Open

fix: [CI-21630]: Fix inherit flow if creds are empty#98
smjt-h wants to merge 1 commit intomasterfrom
dlcdef

Conversation

@smjt-h
Copy link
Copy Markdown
Collaborator

@smjt-h smjt-h commented Mar 30, 2026

Changes-
Default PLUGIN_BUILDKIT_INHERIT_AUTH to true and strip static AWS credentials when not provided
It fixes both IRSA and inherit from delegate flow.

buildkit-inherit-auth now defaults to true (cli.BoolFlag → cli.BoolTFlag) so AWS environment variables and IRSA web identity tokens are automatically forwarded into the BuildKit container without requiring explicit opt-in.

When PLUGIN_HARNESS_SELF_HOSTED_S3_ACCESS_KEY / PLUGIN_HARNESS_SELF_HOSTED_S3_SECRET_KEY are not set, the harness_placeholder_aws_creds entries are stripped from --cache-from / --cache-to strings, allowing BuildKit to fall back to instance role or IRSA credentials for S3 cache access.

Why: On K8s builds using IRSA for S3-backed DLC, the BuildKit container runs isolated from the pod's IAM identity. Previously, users had to explicitly enable credential inheritance and ensure no static keys were present in the cache configuration. Together these changes make IRSA-based DLC work by default without manual intervention.

image

Copy link
Copy Markdown
Collaborator

@anurag-harness anurag-harness left a comment

Choose a reason for hiding this comment

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

This wont help since placeholders are removed on buildkit anyways

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.

3 participants