Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
ref(*): require key_json chart value to be base64-encoded
Browse files Browse the repository at this point in the history
To support passing json data via `--set` at `helm install` time.
  • Loading branch information
Vaughn Dice committed Dec 28, 2016
1 parent fcab233 commit 1c05adb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/workflow/templates/objectstorage-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
deis.io/objectstorage: "{{ .Values.global.storage }}"
type: Opaque
data: {{ if eq .Values.global.storage "gcs"}}
key.json: {{.Values.gcs.key_json | b64enc}}
key.json: {{.Values.gcs.key_json}}
builder-bucket: {{.Values.gcs.builder_bucket | b64enc }}
registry-bucket: {{.Values.gcs.registry_bucket | b64enc }}
database-bucket: {{.Values.gcs.database_bucket | b64enc }}{{ else if eq .Values.global.storage "azure"}}
Expand Down
4 changes: 2 additions & 2 deletions charts/workflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ azure:
gcs:
# key_json is expanded into a JSON file on the remote server. It must be
# well-formatted JSON data.
key_json: ''
key_json: <base64-encoded JSON data>
registry_bucket: "your-registry-bucket-name"
database_bucket: "your-database-bucket-name"
builder_bucket: "your-builder-bucket-name"
Expand Down Expand Up @@ -163,7 +163,7 @@ registry-token-refresher:
registryid: ""
hostname: ""
gcr:
key_json: 'Paste JSON data here.'
key_json: <base64-encoded JSON data>
hostname: ""

router:
Expand Down
5 changes: 4 additions & 1 deletion src/installing-workflow/configuring-object-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ Operators should configure object storage by editing the Helm values file before
* Save your changes.

!!! note
You do not need to base64 encode any of these values as Helm will handle encoding automatically.
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:

$ helm install workflow --namespace deis \
--set global.storage=gcs,gcs.key_json="$(cat /path/to/gcs_creds.json | base64 | tr -d '[:space:]')"

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

Expand Down

0 comments on commit 1c05adb

Please sign in to comment.