diff options
| author | Max Roby <max@lil-mac.lan> | 2023-11-23 12:08:27 +0100 |
|---|---|---|
| committer | Chris Lu <chrislusf@users.noreply.github.com> | 2023-11-24 06:40:19 -0800 |
| commit | ac6158818b4d1b952c3a35c0978536c9a1a38e55 (patch) | |
| tree | 6d222da6c6d1b949383be320960b527d3c5b3377 | |
| parent | f7b98ea1fb8a5c7b59ac93e2b5eb5c3ea27f3a3d (diff) | |
| download | seaweedfs-ac6158818b4d1b952c3a35c0978536c9a1a38e55.tar.xz seaweedfs-ac6158818b4d1b952c3a35c0978536c9a1a38e55.zip | |
fix issue with underscores versus dashes in secret name causing variable expansion failure
| -rw-r--r-- | k8s/charts/seaweedfs/templates/post-install-user-hook.yaml | 8 | ||||
| -rw-r--r-- | k8s/charts/seaweedfs/values.yaml | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/k8s/charts/seaweedfs/templates/post-install-user-hook.yaml b/k8s/charts/seaweedfs/templates/post-install-user-hook.yaml index 0926c0ba7..7c1c37cda 100644 --- a/k8s/charts/seaweedfs/templates/post-install-user-hook.yaml +++ b/k8s/charts/seaweedfs/templates/post-install-user-hook.yaml @@ -47,12 +47,12 @@ spec: - name: SEAWEEDFS_FULLNAME value: "{{ template "seaweedfs.name" . }}" {{- range $reg, $props := $.Values.filer.s3.createUsers }} - - name: {{ $props.secretName | upper }}_ID + - name: {{ $props.name | upper }}_ACCESS_KEY_ID valueFrom: secretKeyRef: name: {{ $props.secretName }} key: ACCESS_KEY_ID - - name: {{ $props.secretName | upper }}_KEY + - name: {{ $props.name | upper }}_SECRET_ACCESS_KEY valueFrom: secretKeyRef: name: {{ $props.secretName }} @@ -67,8 +67,8 @@ spec: "s3.configure --user {{ $props.name }} \ --buckets {{ $props.buckets }} \ --actions {{ $props.actions }} \ - --access_key ${{ $props.secretName | upper }}_ID \ - --secret_key ${{ $props.secretName | upper }}_KEY \ + --access_key ${{ $props.name | upper }}_ACCESS_KEY_ID \ + --secret_key ${{ $props.name | upper }}_SECRET_ACCESS_KEY \ --apply true" |\ /usr/bin/weed shell {{- end }} diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yaml index a94bbb745..5f2359250 100644 --- a/k8s/charts/seaweedfs/values.yaml +++ b/k8s/charts/seaweedfs/values.yaml @@ -579,8 +579,6 @@ filer: # You may specify buckets and users to be created during the install process # The user's credentials must be in an existing secret using the key names: # 'ACCESS_KEY_ID' and 'ACCESS_SECRET_KEY' - # The secret name should use underscore '_' separators, - # using a dash '-' will case variable expansion to fail inside the job. #createBuckets: # - bucket-a # - bucket-b |
