Skip to content

Commit 5dfb205

Browse files
committed
Fix Helm template whitespaces with and without value defined
1 parent c7f78ab commit 5dfb205

22 files changed

+23
-23
lines changed

charts/sourcegraph/templates/_helpers/_priorityClassName.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ and can override it for individual services, if needed, at .Values.<service>.pri
1313
{{- $globalPriorityClassName := (index $top.Values "sourcegraph" "priorityClassName") }}
1414
{{- $servicePriorityClassName := (index $top.Values $service "priorityClassName") }}
1515
{{- if $servicePriorityClassName }}
16-
priorityClassName: {{- $servicePriorityClassName | toYaml | trim }}
16+
priorityClassName: {{ $servicePriorityClassName | toYaml | trim }}
1717
{{- else if $globalPriorityClassName }}
18-
priorityClassName: {{- $globalPriorityClassName | toYaml | trim }}
18+
priorityClassName: {{ $globalPriorityClassName | toYaml | trim }}
1919
{{- end }}
2020
{{- end }}

charts/sourcegraph/templates/_worker.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ spec:
131131
{{- if $top.Values.worker.extraContainers }}
132132
{{- toYaml $top.Values.worker.extraContainers | nindent 6 }}
133133
{{- end }}
134-
{{- include "sourcegraph.priorityClassName" (list . "worker" ) | trim | nindent 6 }}
135134
securityContext:
136135
{{- toYaml $top.Values.worker.podSecurityContext | nindent 8 }}
137136
{{- include "sourcegraph.nodeSelector" (list $top "worker" ) | trim | nindent 6 }}
138137
{{- include "sourcegraph.affinity" (list $top "worker" ) | trim | nindent 6 }}
138+
{{- with include "sourcegraph.priorityClassName" (list $top "worker") | trim }}{{ . | nindent 6 }}{{- end }}
139139
{{- include "sourcegraph.tolerations" (list $top "worker" ) | trim | nindent 6 }}
140140
{{- with $top.Values.sourcegraph.imagePullSecrets }}
141141
imagePullSecrets:

charts/sourcegraph/templates/blobstore/blobstore.Deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ spec:
9292
{{- toYaml .Values.blobstore.podSecurityContext | nindent 8 }}
9393
{{- include "sourcegraph.nodeSelector" (list . "blobstore" ) | trim | nindent 6 }}
9494
{{- include "sourcegraph.affinity" (list . "blobstore" ) | trim | nindent 6 }}
95-
{{- include "sourcegraph.priorityClassName" (list . "blobstore" ) | trim | nindent 6 }}
95+
{{- with include "sourcegraph.priorityClassName" (list . "blobstore") | trim }}{{ . | nindent 6 }}{{- end }}
9696
{{- include "sourcegraph.tolerations" (list . "blobstore" ) | trim | nindent 6 }}
9797
{{- with .Values.sourcegraph.imagePullSecrets }}
9898
imagePullSecrets:

charts/sourcegraph/templates/cadvisor/cadvisor.DaemonSet.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ spec:
103103
{{- toYaml .Values.cadvisor.podSecurityContext | nindent 8 }}
104104
{{- include "sourcegraph.nodeSelector" (list . "cadvisor" ) | trim | nindent 6 }}
105105
{{- include "sourcegraph.affinity" (list . "cadvisor" ) | trim | nindent 6 }}
106-
{{- include "sourcegraph.priorityClassName" (list . "cadvisor" ) | trim | nindent 6 }}
106+
{{- with include "sourcegraph.priorityClassName" (list . "cadvisor" ) | trim }}{{ . | nindent 6 }}{{- end }}
107107
{{- include "sourcegraph.tolerations" (list . "cadvisor" ) | trim | nindent 6 }}
108108
{{- with .Values.sourcegraph.imagePullSecrets }}
109109
imagePullSecrets:

charts/sourcegraph/templates/codeinsights-db/codeinsights-db.StatefulSet.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ spec:
124124
{{- toYaml .Values.codeInsightsDB.podSecurityContext | nindent 8 }}
125125
{{- include "sourcegraph.nodeSelector" (list . "codeInsightsDB" ) | trim | nindent 6 }}
126126
{{- include "sourcegraph.affinity" (list . "codeInsightsDB" ) | trim | nindent 6 }}
127-
{{- include "sourcegraph.priorityClassName" (list . "codeInsightsDB" ) | trim | nindent 6 }}
127+
{{- with include "sourcegraph.priorityClassName" (list . "codeInsightsDB" ) | trim }}{{ . | nindent 6 }}{{- end }}
128128
{{- include "sourcegraph.tolerations" (list . "codeInsightsDB" ) | trim | nindent 6 }}
129129
{{- with .Values.sourcegraph.imagePullSecrets }}
130130
imagePullSecrets:

charts/sourcegraph/templates/codeintel-db/codeintel-db.StatefulSet.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ spec:
136136
{{- toYaml .Values.codeIntelDB.podSecurityContext | nindent 8 }}
137137
{{- include "sourcegraph.nodeSelector" (list . "codeIntelDB" ) | trim | nindent 6 }}
138138
{{- include "sourcegraph.affinity" (list . "codeIntelDB" ) | trim | nindent 6 }}
139-
{{- include "sourcegraph.priorityClassName" (list . "codeIntelDB" ) | trim | nindent 6 }}
139+
{{- with include "sourcegraph.priorityClassName" (list . "codeIntelDB" ) | trim }}{{ . | nindent 6 }}{{- end }}
140140
{{- include "sourcegraph.tolerations" (list . "codeIntelDB" ) | trim | nindent 6 }}
141141
{{- with .Values.sourcegraph.imagePullSecrets }}
142142
imagePullSecrets:

charts/sourcegraph/templates/frontend/sourcegraph-frontend.Deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ spec:
144144
{{- toYaml .Values.frontend.podSecurityContext | nindent 8 }}
145145
{{- include "sourcegraph.nodeSelector" (list . "frontend" ) | trim | nindent 6 }}
146146
{{- include "sourcegraph.affinity" (list . "frontend" ) | trim | nindent 6 }}
147-
{{- include "sourcegraph.priorityClassName" (list . "frontend" ) | trim | nindent 6 }}
147+
{{- with include "sourcegraph.priorityClassName" (list . "frontend" ) | trim }}{{ . | nindent 6 }}{{- end }}
148148
{{- include "sourcegraph.tolerations" (list . "frontend" ) | trim | nindent 6 }}
149149
{{- with .Values.sourcegraph.imagePullSecrets }}
150150
imagePullSecrets:

charts/sourcegraph/templates/gitserver/gitserver.StatefulSet.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ spec:
9999
{{- toYaml .Values.gitserver.podSecurityContext | nindent 8 }}
100100
{{- include "sourcegraph.nodeSelector" (list . "gitserver" ) | trim | nindent 6 }}
101101
{{- include "sourcegraph.affinity" (list . "gitserver" ) | trim | nindent 6 }}
102-
{{- include "sourcegraph.priorityClassName" (list . "gitserver" ) | trim | nindent 6 }}
102+
{{- with include "sourcegraph.priorityClassName" (list . "gitserver" ) | trim }}{{ . | nindent 6 }}{{- end }}
103103
{{- include "sourcegraph.tolerations" (list . "gitserver" ) | trim | nindent 6 }}
104104
{{- with .Values.sourcegraph.imagePullSecrets }}
105105
imagePullSecrets:

charts/sourcegraph/templates/grafana/grafana.StatefulSet.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ spec:
8888
{{- toYaml .Values.grafana.podSecurityContext | nindent 8 }}
8989
{{- include "sourcegraph.nodeSelector" (list . "grafana" ) | trim | nindent 6 }}
9090
{{- include "sourcegraph.affinity" (list . "grafana" ) | trim | nindent 6 }}
91-
{{- include "sourcegraph.priorityClassName" (list . "grafana" ) | trim | nindent 6 }}
91+
{{- with include "sourcegraph.priorityClassName" (list . "grafana" ) | trim }}{{ . | nindent 6 }}{{- end }}
9292
{{- include "sourcegraph.tolerations" (list . "grafana" ) | trim | nindent 6 }}
9393
{{- with .Values.sourcegraph.imagePullSecrets }}
9494
imagePullSecrets:

charts/sourcegraph/templates/indexed-search/indexed-search.StatefulSet.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ spec:
119119
{{- toYaml .Values.indexedSearch.podSecurityContext | nindent 8 }}
120120
{{- include "sourcegraph.nodeSelector" (list . "indexedSearch" ) | trim | nindent 6 }}
121121
{{- include "sourcegraph.affinity" (list . "indexedSearch" ) | trim | nindent 6 }}
122-
{{- include "sourcegraph.priorityClassName" (list . "indexedSearch" ) | trim | nindent 6 }}
122+
{{- with include "sourcegraph.priorityClassName" (list . "indexedSearch" ) | trim }}{{ . | nindent 6 }}{{- end }}
123123
{{- include "sourcegraph.tolerations" (list . "indexedSearch" ) | trim | nindent 6 }}
124124
{{- with .Values.sourcegraph.imagePullSecrets }}
125125
imagePullSecrets:

0 commit comments

Comments
 (0)