Skip to content

Commit

Permalink
fix(kratos): correct initContainer formatting (#310)
Browse files Browse the repository at this point in the history
#300 Added support for init-containers, but the way they were implemented led helm to interpret them as strings instead of as yaml. This was an error of communication between author and reviewer.

Example of how this is currently parsed:

```
initContainers:
|
- command: ...
```

I'm not sure why exactly the bar gets added but it does
  • Loading branch information
scottcrossen authored Aug 16, 2021
1 parent 3f8a035 commit fadd949
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helm/charts/kratos/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
{{- if .Values.deployment.extraInitContainers}}
initContainers:
{{- if .Values.deployment.extraInitContainers }}
{{ toYaml ( tpl .Values.deployment.extraInitContainers . ) | indent 8 }}
{{ tpl .Values.deployment.extraInitContainers . | indent 8 }}
{{- end }}
{{- end }}
volumes:
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/kratos/templates/job-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
restartPolicy: Never
{{- if .Values.deployment.extraInitContainers }}
initContainers:
{{ toYaml ( tpl .Values.deployment.extraInitContainers . ) | indent 8 }}
{{ tpl .Values.deployment.extraInitContainers . | indent 8 }}
{{- end }}
{{- if .Values.deployment.extraVolumes }}
volumes:
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/kratos/templates/statefulset-mail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- if .Values.deployment.extraInitContainers }}
initContainers:
{{ toYaml ( tpl .Values.deployment.extraInitContainers . ) | indent 8 }}
{{ tpl .Values.deployment.extraInitContainers . | indent 8 }}
{{- end }}
volumes:
- name: {{ include "kratos.fullname" . }}-config-volume
Expand Down

0 comments on commit fadd949

Please sign in to comment.