...
 
Commits (2)
## Helm Charts for Minds
WIP
### Pipes are your friend
The settings.php generated by the interpolation of settings.yaml is very fragile.
Fortunately, helm provides pipes for handling some formatting issues.
1. Bools and ints should *not* be quoted
2. You can set a reasonable default with ```{{ .Values.key | default "value" }}}```
3. You can ensure your values are quoted with ```{{ .Values.key | quote }}```
4. To properly escape an empty string ```{{ .Values.key | default "" | quote }}```
### Testing
No more shipping broken templates!
```
helm install --dry-run --debug ./minds
```
This will output all the files generated by helm and allows you to spot check settings.php to make sure your changes look right.
......@@ -668,12 +668,12 @@ data:
$CONFIG->set('email', [
'smtp' => [
'host' => {{ .Values.email.host | quote }},
'username' => {{ .Values.email.username | quote }},
'password' => {{ .Values.email.password | quote }},
'host' => {{ .Values.email.host | default "" | quote }},
'username' => {{ .Values.email.username | default "" | quote }},
'password' => {{ .Values.email.password | default "" | quote }},
'port' => {{ .Values.email.port | default 465 }},
'auth' => {{ .Values.email.auth | default true }},
'smtp_secure' => {{ .Values.email.smtp_secure | quote }}
'smtp_secure' => {{ .Values.email.smtp_secure | default "none" | quote }}
]
]);
......