fix: exclude credential secret from Azure KbsConfig - #137
Closed
butler54 wants to merge 1 commit into
Closed
Conversation
…rustee-chart#42) 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; pull secrets are distributed to workload namespace SAs instead (see sandboxed-policies-chart/pull-secret-distribution.yaml). Override kbs.extraSecrets: [] in overrides/values-trustee-azure.yaml so KbsConfig on Azure never lists a Secret that will never exist. 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 (both agree extraSecrets should be empty on Azure) and can be dropped in a follow-up. Verified via 'helm template' with both the unfixed (0.10.0, currently published) and fixed trustee-chart templates/kbs.yaml: this override alone removes 'credential' from KbsConfig.spec.kbsSecretResources on Azure in both cases, and does not affect bare metal.
Collaborator
Author
|
Closing — this goes the wrong direction. Instead of excluding the |
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
KBS deployment fails on Azure with:
Root cause: trustee-chart's
KbsConfigCR unconditionally listskbs.extraSecrets(default:["credential"]) inspec.kbsSecretResources. The only thing that creates a Secret literallynamed
credentialintrustee-operator-systemis an ACMConfigurationPolicy(pull-secret-credential-policy.yaml) that isexplicitly skipped on Azure — peer-pod CDH doesn't fetch registry
credentials from KBS there; pull secrets are distributed to workload
namespace service accounts instead (see
sandboxed-policies-chart/pull-secret-distribution.yaml). Nothing incoco-pattern's Azure overrides removed
credentialfromkbs.extraSecretsto match, so
KbsConfigkept declaring a dependency the platform neversatisfies.
Fix
Override
kbs.extraSecrets: []inoverrides/values-trustee-azure.yaml.This is a workaround at the currently-pinned trustee
chartVersion: 0.10.*.The proper fix — gating the
extraSecretsrange in trustee-chart'stemplates/kbs.yamlwith the same condition used bypull-secret-credential-policy.yaml— is proposed upstream invalidatedpatterns/trustee-chart#42.
Once that's merged and released as
>= 0.10.1, this override becomesredundant (both agree
extraSecretsshould be empty on Azure) but harmless,and can be dropped in a follow-up.
Verification
Rendered
KbsConfigviahelm templateagainst both the currentlypublished trustee-chart 0.10.0 (unfixed) and the proposed
trustee-chart#42 fix, stacking
overrides/values-trustee.yaml+overrides/values-trustee-azure.yamlexactly asvalues-azure.yaml'sextraValueFilesdoes:secured=true:kbsSecretResourcesno longer includes"credential"in either case.clusterPlatformunset/non-Azure): unaffected — this overrideonly applies via
values-trustee-azure.yaml, loaded for the Azuretopology only.
Related