Skip to content

feat: foward image pull secrets#1583

Merged
viccuad merged 3 commits intokubewarden:mainfrom
jvanz:issue1576
Mar 18, 2026
Merged

feat: foward image pull secrets#1583
viccuad merged 3 commits intokubewarden:mainfrom
jvanz:issue1576

Conversation

@jvanz
Copy link
Copy Markdown
Member

@jvanz jvanz commented Mar 16, 2026

Description

Adds a new controller CLI flag to allow used to define a list of secret that must be set in the policy server deployments to allow the container image to be downloaded from a private registry. Also update the Helm chart to expose this new CLI flag to users.

Fix #1576

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.22%. Comparing base (60719bb) to head (a780700).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1583      +/-   ##
==========================================
+ Coverage   75.04%   75.22%   +0.18%     
==========================================
  Files         170      170              
  Lines       21062    21064       +2     
==========================================
+ Hits        15805    15846      +41     
+ Misses       5043     5006      -37     
+ Partials      214      212       -2     
Flag Coverage Δ
go-tests 57.53% <100.00%> (+0.66%) ⬆️
rust-tests 80.02% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jvanz jvanz marked this pull request as ready for review March 17, 2026 13:23
@jvanz jvanz requested a review from a team as a code owner March 17, 2026 13:23
Comment thread api/policies/v1/policyserver_types.go
# Secrets to pull container images from private registries
# Secrets to pull container images from private registries. When set, the
# secret names are passed to the controller via --image-pull-secrets and added
# to the spec.template.spec.imagePullSecrets of every policy-server Deployment.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can remove this comment addition, it's an implementation detail, and is only partially true. This also happens for the audit-scanner CronJob and the controller Deployment.

jvanz added 2 commits March 17, 2026 14:33
Adds a new controller CLI flag to allow used to define a list of secret
that must be set in the policy server deployments to allow the container
image to be downloaded from a private registry.

Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
Assisted-by: Github Copilot
Updates the kubewarden-controller Helm chart to use the new controller
CLI flag that allow users to define a list of secrets with the data to
allowing container image download from private registries.

Signed-off-by: José Guilherme Vanz <jguilhermevanz@suse.com>
Assisted-by: Github Copilot
Copy link
Copy Markdown
Member

@flavio flavio left a comment

Choose a reason for hiding this comment

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

thanks for the fix and for the changes you've done

Comment thread api/policies/v1/policyserver_types.go Outdated
// inside the policy-server container so that the policy-server binary can
// pull OCI policy artifacts from private registries at runtime. Note: this
// secret is not used to pull the policy-server container image itself; use
// the controller's --image-pull-secrets flag for that purpose.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this has too many implementation details as it ends in the PolicyServer CRDs end-user docs. I wouldn't mention the controller --image-pull-secrets flag, as users can't set that by hand. Nor I would mention that it is mounted inside the policy-server container, as we have PolicyServer CRs so users don't need to understand the implementation details.

I would mention that it is used for pulling policies from repositories (I wouldn't say private registries, they don't particularly need to be..), and have the note that is note used for container images if anything.

Signed-off-by: Víctor Cuadrado Juan <vcuadradojuan@suse.de>
@viccuad viccuad merged commit 8b4bb09 into kubewarden:main Mar 18, 2026
45 of 46 checks passed
@jvanz jvanz deleted the issue1576 branch March 19, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-full Run all CI jobs for all languages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

policy-server Deployments lack imagePullSecrets

3 participants