Repository navigation
feat(helm): read RustFS credentials from rustfs.existingSecret - #169
Open
ProbstenHias wants to merge 1 commit into
Open
ProbstenHias wants to merge 1 commit into
ProbstenHias wants to merge 1 commit into
Conversation
Signed-off-by: Matthias Weilinger <matthias.weilinger@gmx.de>
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
charts/substraterendersrustfs.accessKeyandrustfs.secretKeyas literalenv[].valueentries in three Pod specs: the RustFS Deployment, therustfs-bucket-initJob and the object-store plugin. Anyone who can read those Pod specs can read the credentials, and they cannot be managed by an external secret store.Change
Add
rustfs.existingSecret. When it is set, all three consumers read the credentials withvalueFrom.secretKeyReffrom the keysAWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYof that Secret, andrustfs.accessKey/rustfs.secretKeyare ignored. One helper,substrate.rustfs.credentialsEnv, renders the env entries for all three.The keys match what
charts/substrate-ateletalready expects forobjectStore.credentialsSecret, so one Secret can serve both charts.Backwards compatibility
existingSecretdefaults to"". With default values,helm templateoutput is byte-identical tomain.Testing
helm unittest charts/substrate: exit 0, 63/63 passed. Newtests/rustfs_credentials_test.yamlcovers the default (literal values) path and theexistingSecretpath for all three consumers.helm templatewith default values, diffed againstmain: empty diff, exit 0.helm template --set rustfs.existingSecret=foo: none of the 8RUSTFS_*_KEY/AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEYentries has a literalvalue:.helm lint charts/substrate charts/substrate-crds charts/substrate-podcert charts/substrate-atelet: exit 0.hack/render-manifests.sh --check: exit 0.AI disclosure: I used an AI coding assistant to help prepare this change. I reviewed and tested every line.