Skip to content

Commit

Permalink
Merge pull request #10 from stakater-charts/dyamic-container-name
Browse files Browse the repository at this point in the history
fix indentation and use dynamic container names
  • Loading branch information
kahootali authored Nov 16, 2019
2 parents bb28d85 + 20a9be9 commit 2b96b51
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions application/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,39 +27,37 @@ spec:
{{- if .Values.deployment.podLabels }}
{{ toYaml .Values.deployment.podLabels | indent 8 }}
{{- end }}
{{- if .Values.deployment.additionalPodAnnotations}}
annotations:
{{- else if .Values.deployment.fluentdConfigAnnotations }}
{{- if or .Values.deployment.additionalPodAnnotations .Values.deployment.fluentdConfigAnnotations }}
annotations:
{{- end }}
{{- with .Values.deployment.additionalPodAnnotations }}
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.deployment.fluentdConfigAnnotations }}
fluentdConfiguration: >
[
{
"containers":
[
{
"expressionFirstLine": "{{ .regexFirstLine }}",
"expression": "{{ .regex }}",
"timeFormat": "{{ .timeFormat }}",
"containerName": "spring-boot"
}
]{{- with .notifications }},
"notifications": {
{{- with .slack }}
"slack": {
"webhookURL": "{{ .webhookURL }}",
"channelName": "{{ .channelName }}"
}
{{- end }}
{{- if .Values.deployment.fluentdConfigAnnotations }}
fluentdConfiguration: >
[
{
"containers":
[
{
"expressionFirstLine": "{{ .Values.deployment.fluentdConfigAnnotations.regexFirstLine }}",
"expression": "{{ .Values.deployment.fluentdConfigAnnotations.regex }}",
"timeFormat": "{{ .Values.deployment.fluentdConfigAnnotations.timeFormat }}",
"containerName": "{{ template "application.name" . }}"
}
]{{- with .Values.deployment.fluentdConfigAnnotations.notifications }},
"notifications": {
{{- with .slack }}
"slack": {
"webhookURL": "{{ .webhookURL }}",
"channelName": "{{ .channelName }}"
}
{{- end }}
}
]
{{- end }}
{{- end }}
}
]
{{- end }}
spec:
{{- if .Values.deployment.initContainers }}
initContainers:
Expand Down

0 comments on commit 2b96b51

Please sign in to comment.