Wire backend key.existingSecret into deployments (GH #34) - #35
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
CRThaze
force-pushed
the
CRThaze/s3proxy-issue-34/backend-existing-secret
branch
from
September 2, 2026 12:29
d35123e to
59fab56
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
config.backends.<name>.*.existingSecret was documented in values.yaml for s3, azureblob (key + sasToken), b2, openstackSwift and rackspace (commit 3556147, "consistent with gcs") but never referenced by any template — only GCS's privateKey.existingSecret and the TLS keystore ones were ever wired. So an existingSecret reference silently rendered an empty jclouds.credential. Extend the existing merge-configs initContainer mechanism generically: - _helpers.tpl: s3proxy.externalBackendSecrets lists each enabled backend that references an existingSecret (backend, jclouds property, secret, key). - deployment.yaml: one range projects each secret as a file named for its jclouds property under /backend-secret/<backend>/, and the init loop appends "<property>=<value>" to that backend's properties file. - configmap.yaml: azureblob no longer emits an empty jclouds.credential= when the key comes from an existing secret (the init container adds it). Coverage: render leg (test-values/azureblob-existing-secret.yaml + lint-render matrix) and an end-to-end functional leg (Azurite, account key via a pre-created Secret).
CRThaze
force-pushed
the
CRThaze/s3proxy-issue-34/backend-existing-secret
branch
from
September 2, 2026 12:59
59fab56 to
e2e7fc8
Compare
📊 Helm Render Diff SummaryChart
🔍 Detailed Changes📝 Changes in
|
📝 README.md PreviewThe following changes to Click to expand diffdiff --git a/README.md b/README.md
index 5d3b508..eead0ce 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# s3proxy
-  
+  
A Helm chart for deploying S3Proxy - Access other storage backends via the S3 API
|
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.
Fixes #34.
Problem
config.backends.<name>.*.existingSecretis documented invalues.yamlfor s3, azureblob (key + sasToken), b2, openstackSwift and rackspace (added in3556147, "consistent with gcs"), but it was never referenced by any template. Only GCS'sprivateKey.existingSecretand the TLS keystore/keystorePassword ones were ever actually wired. So the reporter'sazureblob.key.existingSecret: some-secretrenderedjclouds.credential=(empty) and the pod could not authenticate — and the same silent failure affected every non-GCS backend.Fix
Extend the one mechanism credentials already flow through (the
merge-configsinitContainer), rather than patching a single backend:_helpers.tpl—s3proxy.externalBackendSecretsyields, per enabled backend that references anexistingSecret,{name, backend, prop, secret, key}.deployment.yaml— onerangeprojects each secret as a file named for its jclouds property under/backend-secret/<backend>/, and the init loop appends<property>=<value>to that backend's properties file (mirrors the existingsecret-<backend>.propertiesappend). Coversjclouds.credentialfor all five backends plusjclouds.azureblob.sas.configmap.yaml— azureblob no longer emits an emptyjclouds.credential=when the key comes from an existing secret (the init container supplies it).Chart.yaml—0.4.1 → 0.4.2.Tests
test-values/azureblob-existing-secret.yamladded to the lint-render matrix.azureblob-existing-secret(Azurite mock, account key delivered via a pre-created Secret) — a broken wiring leavesjclouds.credentialempty and the round-trip fails against Azurite.Verification
helm lint/templateclean; init-container merge simulated → exactly one correctjclouds.credential; 0 injected volumes on all inline/no-secret legs (no regression), 1 on the existingSecret leg.