Skip to content

Commit d63d81e

Browse files
committed
DND-1416: add optional azureblob regions (jclouds.regions) for bucket creation
The azureblob-sdk provider on real Azure needs jclouds.regions to create buckets; without it `aws s3 mb` fails with InvalidLocationConstraint ("no jclouds.regions configured for provider azureblob-sdk") — GH issue #15. Add an optional config.backends.azureblob.regions value, emitted as jclouds.regions= in the azureblob backend properties when set (omitted when empty, so Azurite and other backends are unaffected). This completes the chart mechanism for DND-1416 item 2. Items 1 (endpoint typo) and 3 (default-endpoint guard) already landed via PR #22. The endpoint fix + azureblob-sdk provider are confirmed against Azurite; the real-Azure bucket-create fix (correct default region) still needs validation against a live Azure backend. No Chart.yaml version bump (deferred, handled separately), so verify-version fails by design for now. Verified on kind: azureblob-sdk + jclouds.regions round-trips against Azurite; helm lint + kubeconform (all test-values) clean; regions omitted when empty.
1 parent 91d5529 commit d63d81e

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

charts/s3proxy/templates/configmap.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ data:
142142
{{- if or .Values.config.backends.azureblob.endpoint .Values.config.backends.azureblob.account }}
143143
jclouds.endpoint={{ .Values.config.backends.azureblob.endpoint | default (printf "https://%s.blob.core.windows.net" .Values.config.backends.azureblob.account) }}
144144
{{- end }}
145+
{{- if .Values.config.backends.azureblob.regions }}
146+
# Required by the azureblob-sdk provider on real Azure to create buckets
147+
# (otherwise "no jclouds.regions configured" -> InvalidLocationConstraint).
148+
jclouds.regions={{ .Values.config.backends.azureblob.regions }}
149+
{{- end }}
145150
{{- if .Values.config.backends.azureblob.account }}
146151
jclouds.identity={{ .Values.config.backends.azureblob.account }}
147152
{{- end }}

charts/s3proxy/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ config:
226226
# -- (string) Azure endpoint
227227
# @default -- `https://{{ .Values.config.backends.azureblob.account }}.blob.core.windows.net`
228228
endpoint:
229+
# -- jclouds region(s) for the backend, emitted as `jclouds.regions=`. The azureblob-sdk provider requires this on real Azure to create buckets (without it `aws s3 mb` fails with InvalidLocationConstraint / "no jclouds.regions configured"). Comma-separated for multiple. Not needed against Azurite. Leave empty to omit.
230+
regions: ""
229231
# -- SAS token configuration
230232
sasToken:
231233
# -- SAS token value

0 commit comments

Comments
 (0)