[stable/spinnaker] Use "tpl" function to render the content of additional scripts (#13045)

* [stable/spinnaker] Use "tpl" function to render the content of additional scripts and init scripts

This allows to use variable interpolation in the body of these scripts.

Signed-off-by: Mikhail Zholobov <legal90@gmail.com>

* [stable/spinnaker] Bump chart version

Signed-off-by: Mikhail Zholobov <legal90@gmail.com>

* [stable/spinnaker] Update README.md

Signed-off-by: Mikhail Zholobov <legal90@gmail.com>
This commit is contained in:
Mikhail Zholobov
2019-05-21 01:46:41 -07:00
committed by Kubernetes Prow Robot
parent feb59f17dc
commit 8299179ca6
5 changed files with 23 additions and 21 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
description: Open source, multi-cloud continuous delivery platform for releasing software changes with high velocity and confidence.
name: spinnaker
version: 1.10.0
version: 1.10.1
appVersion: 1.12.5
home: http://spinnaker.io/
sources:
+18 -18
View File
@@ -41,24 +41,24 @@ for Spinnaker. If you want to add arbitrary clusters need to do the following:
1. Upload your kubeconfig to a secret with the key `config` in the cluster you are installing Spinnaker to.
```shell
$ kubectl create secret generic --from-file=$HOME/.kube/config my-kubeconfig
```
```shell
$ kubectl create secret generic --from-file=$HOME/.kube/config my-kubeconfig
```
1. Set the following values of the chart:
```yaml
kubeConfig:
enabled: true
secretName: my-kubeconfig
secretKey: config
contexts:
# Names of contexts available in the uploaded kubeconfig
- my-context
# This is the context from the list above that you would like
# to deploy Spinnaker itself to.
deploymentContext: my-context
```
```yaml
kubeConfig:
enabled: true
secretName: my-kubeconfig
secretKey: config
contexts:
# Names of contexts available in the uploaded kubeconfig
- my-context
# This is the context from the list above that you would like
# to deploy Spinnaker itself to.
deploymentContext: my-context
```
## Specifying Docker Registries and Valid Images (Repositories)
@@ -134,14 +134,14 @@ If you would rather the chart make the config file for you, you can set `halyard
halyard:
additionalScripts:
create: true
data:
data:
enable_oauth.sh: |-
echo "Setting oauth2 security"
$HAL_COMMAND config security authn oauth2 enable
additionalSecrets:
create: true
data:
password.txt: aHVudGVyMgo=
password.txt: aHVudGVyMgo=
additionalConfigMaps:
create: true
data:
@@ -162,4 +162,4 @@ Any files added through `additionalConfigMaps` will be written to disk at `/opt/
halyard:
annotations:
iam.amazonaws.com/role: <role_arn>
```
```
@@ -9,7 +9,7 @@ data:
{{- if and .Values.halyard.additionalScripts.create .Values.halyard.additionalScripts.data }}
{{- range $index, $content := .Values.halyard.additionalScripts.data }}
{{ $index }}: |-
{{ $content | indent 4 }}
{{ tpl $content $ | indent 4 }}
{{- end }}
{{- end }}
{{- end }}
@@ -22,5 +22,5 @@ data:
{{- if hasKey .Values.halyard "additionalInitScript" }}
# additionalInitScript
{{ .Values.halyard.additionalInitScript | indent 4 }}
{{ tpl .Values.halyard.additionalInitScript $ | indent 4 }}
{{- end }}
+2
View File
@@ -10,6 +10,7 @@ halyard:
configMapName: my-halyard-config
configMapKey: config.sh
# If you'd rather do an inline script, set create to true and put the content in the data dict like you would a configmap
# The content will be passed through `tpl`, so value interpolation is supported.
create: false
data: {}
additionalSecrets:
@@ -53,6 +54,7 @@ halyard:
## Uncomment if you want to add extra commands to the init script
## run by the init container before halyard is started.
## The content will be passed through `tpl`, so value interpolation is supported.
# additionalInitScript: |-
## Uncomment if you want to add annotations on halyard and install-using-hal pods