Skip to content

Commit 1c05adb

Browse files
author
Vaughn Dice
committed
ref(*): require key_json chart value to be base64-encoded
To support passing json data via `--set` at `helm install` time.
1 parent fcab233 commit 1c05adb

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

charts/workflow/templates/objectstorage-secret.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
deis.io/objectstorage: "{{ .Values.global.storage }}"
99
type: Opaque
1010
data: {{ if eq .Values.global.storage "gcs"}}
11-
key.json: {{.Values.gcs.key_json | b64enc}}
11+
key.json: {{.Values.gcs.key_json}}
1212
builder-bucket: {{.Values.gcs.builder_bucket | b64enc }}
1313
registry-bucket: {{.Values.gcs.registry_bucket | b64enc }}
1414
database-bucket: {{.Values.gcs.database_bucket | b64enc }}{{ else if eq .Values.global.storage "azure"}}

charts/workflow/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ azure:
7575
gcs:
7676
# key_json is expanded into a JSON file on the remote server. It must be
7777
# well-formatted JSON data.
78-
key_json: ''
78+
key_json: <base64-encoded JSON data>
7979
registry_bucket: "your-registry-bucket-name"
8080
database_bucket: "your-database-bucket-name"
8181
builder_bucket: "your-builder-bucket-name"
@@ -163,7 +163,7 @@ registry-token-refresher:
163163
registryid: ""
164164
hostname: ""
165165
gcr:
166-
key_json: 'Paste JSON data here.'
166+
key_json: <base64-encoded JSON data>
167167
hostname: ""
168168

169169
router:

src/installing-workflow/configuring-object-storage.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ Operators should configure object storage by editing the Helm values file before
4141
* Save your changes.
4242

4343
!!! note
44-
You do not need to base64 encode any of these values as Helm will handle encoding automatically.
44+
All values will be automatically (base64) encoded _except_ the `key_json` values under `gcs`/`gcr`. These must be base64-encoded. This is to support cleanly passing said encoded text via `helm --set` cli functionality rather than attempting to pass the raw JSON data. For example:
45+
46+
$ helm install workflow --namespace deis \
47+
--set global.storage=gcs,gcs.key_json="$(cat /path/to/gcs_creds.json | base64 | tr -d '[:space:]')"
4548

4649
You are now ready to run `helm install deis/workflow --namespace deis -f values.yaml` using your desired object storage.
4750

0 commit comments

Comments
 (0)