fix: exclude extraSecrets from KbsConfig on Azure to match pull-secret-credential-policy - #42
Open
butler54 wants to merge 1 commit into
Open
Conversation
butler54
force-pushed
the
fix/azure-kbs-credential-secret
branch
from
August 31, 2026 14:05
6813f90 to
f716adf
Compare
…t-credential-policy KbsConfig.spec.kbsSecretResources unconditionally listed kbs.extraSecrets (default: ["credential"]), but the ACM ConfigurationPolicy that creates the 'credential' Secret (pull-secret-credential-policy.yaml) is explicitly skipped on Azure, since peer-pod CDH doesn't fetch registry credentials from KBS there. The mismatch caused the kbsconfig-controller to fail deploying KBS on Azure with: Error in creating/updating KBS deployment: Secret "credential" not found Gate the extraSecrets range in templates/kbs.yaml with the same 'global.coco.secured == true AND global.clusterPlatform != Azure' condition used by pull-secret-credential-policy.yaml, so the CR and the policy that satisfies it stay in sync by construction. Bare metal / other platforms are unaffected (extraSecrets still included there). Confirmed on a live Azure cluster that sandboxed-policies-chart's pull-secret-distribution mechanism (per-namespace 'pull-secret' Secret + default ServiceAccount imagePullSecrets patch) is already deployed and working, so the KBS-based 'credential' resource is genuinely unnecessary on Azure -- not just unused in theory.
butler54
force-pushed
the
fix/azure-kbs-credential-secret
branch
from
August 31, 2026 15:13
f716adf to
bac9ef0
Compare
butler54
added a commit
to validatedpatterns/coco-pattern
that referenced
this pull request
Aug 31, 2026
On Azure, KBS deployment fails with: Error in creating/updating KBS deployment: Secret "credential" not found trustee-chart's default kbs.extraSecrets (['credential']) is unconditionally added to KbsConfig.spec.kbsSecretResources, but the ACM ConfigurationPolicy that creates that Secret (pull-secret-credential-policy.yaml) is skipped on Azure -- peer-pod CDH doesn't fetch registry credentials from KBS there. Override kbs.extraSecrets: [] in overrides/values-trustee-azure.yaml so KbsConfig on Azure never lists a Secret that will never exist. Confirmed on a live Azure cluster that sandboxed-policies-chart's pull-secret-distribution mechanism (per-namespace 'pull-secret' Secret + default ServiceAccount imagePullSecrets patch) is already deployed and working -- the KBS-based credential path is genuinely redundant on Azure, not just theoretically unused. This is a workaround for the currently-pinned trustee chartVersion (0.10.*). The proper fix (gate extraSecrets in kbs.yaml the same way as the policy) is in validatedpatterns/trustee-chart#42; once merged and released as >= 0.10.1, this override becomes redundant but harmless and can be dropped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Azure, the KBS deployment fails with:
Root cause:
templates/kbs.yamlunconditionally listskbs.extraSecrets(default:
["credential"]) inKbsConfig.spec.kbsSecretResources. Buttemplates/pull-secret-credential-policy.yaml— the ACMConfigurationPolicythat creates thecredentialSecret from thecluster's
openshift-config/pull-secret— is explicitly (and correctly)skipped on Azure, since peer-pod CDH doesn't fetch registry credentials via
KBS. Nothing kept
KbsConfig's secret list in sync with that exclusion.Fix
Gate the
extraSecretsrange intemplates/kbs.yamlwith the samecondition used by
pull-secret-credential-policy.yaml:Bare metal and other non-Azure platforms are unaffected —
extraSecrets(
credential) is still included there, matching existing behavior.(Note: an earlier revision of this PR took the opposite approach — making
the
credentialpolicy unconditional so the secret would exist everywhere.That was reverted after confirming on a live Azure cluster that
sandboxed-policies-chart'spull-secret-distributionmechanism(per-namespace
pull-secretSecret + default ServiceAccountimagePullSecretspatch) is already deployed and working there, making theKBS-based
credentialresource genuinely redundant on Azure, not justtheoretically unused.)
Verification
helm template/helm lintagainst a clean checkout of this branch:global.clusterPlatform=Azure, global.coco.secured=true→kbsSecretResourcesexcludes"credential";pull-secret-credential-policydoes not render.global.clusterPlatform=BareMetal, global.coco.secured=true→kbsSecretResourcesstill includes"credential"(unchanged); policy still renders.helm lint .passes.Confirmed on a live Azure cluster (
sandbox-policiesArgoCD app Synced/Healthy) thatpull-secretSecrets and patched default ServiceAccounts already exist in workload namespaces (hello-openshift,kbs-access), independent of KBS.