Skip to content

Commit 4c3a155

Browse files
authored
Ensure we use global for includes. (#568)
Some call sites used . which was sometimes not the global context.
1 parent 95b67a7 commit 4c3a155

13 files changed

+37
-37
lines changed

charts/temporal/templates/admintools-deployment.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:
5-
name: {{ include "temporal.componentname" (list . "admintools") }}
5+
name: {{ include "temporal.componentname" (list $ "admintools") }}
66
labels:
7-
{{- include "temporal.resourceLabels" (list . "admintools" "") | nindent 4 }}
7+
{{- include "temporal.resourceLabels" (list $ "admintools" "") | nindent 4 }}
88
spec:
99
replicas: 1
1010
selector:
1111
matchLabels:
12-
app.kubernetes.io/name: {{ include "temporal.name" . }}
12+
app.kubernetes.io/name: {{ include "temporal.name" $ }}
1313
app.kubernetes.io/instance: {{ .Release.Name }}
1414
app.kubernetes.io/component: admintools
1515
template:
1616
metadata:
1717
labels:
18-
{{- include "temporal.resourceLabels" (list . "admintools" "pod") | nindent 8 }}
18+
{{- include "temporal.resourceLabels" (list $ "admintools" "pod") | nindent 8 }}
1919
{{- with $.Values.admintools.podAnnotations }}
2020
annotations:
2121
{{- toYaml . | nindent 8 }}
2222
{{- end }}
2323
spec:
24-
{{ include "temporal.serviceAccount" . }}
24+
{{ include "temporal.serviceAccount" $ }}
2525
containers:
2626
- name: admin-tools
2727
image: "{{ .Values.admintools.image.repository }}:{{ .Values.admintools.image.tag }}"
@@ -33,9 +33,9 @@ spec:
3333
env:
3434
# TEMPORAL_CLI_ADDRESS is deprecated, use TEMPORAL_ADDRESS instead
3535
- name: TEMPORAL_CLI_ADDRESS
36-
value: {{ include "temporal.fullname" . }}-frontend:{{ .Values.server.frontend.service.port }}
36+
value: {{ include "temporal.fullname" $ }}-frontend:{{ .Values.server.frontend.service.port }}
3737
- name: TEMPORAL_ADDRESS
38-
value: {{ include "temporal.fullname" . }}-frontend:{{ .Values.server.frontend.service.port }}
38+
value: {{ include "temporal.fullname" $ }}-frontend:{{ .Values.server.frontend.service.port }}
3939
{{- if .Values.admintools.additionalEnv }}
4040
{{- toYaml .Values.admintools.additionalEnv | nindent 12 }}
4141
{{- end }}

charts/temporal/templates/admintools-service.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: {{ include "temporal.componentname" (list . "admintools") }}
5+
name: {{ include "temporal.componentname" (list $ "admintools") }}
66
labels:
7-
{{- include "temporal.resourceLabels" (list . "admintools" "") | nindent 4 }}
7+
{{- include "temporal.resourceLabels" (list $ "admintools" "") | nindent 4 }}
88
spec:
99
type: ClusterIP
1010
ports:
@@ -14,7 +14,7 @@ spec:
1414
name: ssh
1515

1616
selector:
17-
app.kubernetes.io/name: {{ include "temporal.name" . }}
17+
app.kubernetes.io/name: {{ include "temporal.name" $ }}
1818
app.kubernetes.io/instance: {{ .Release.Name }}
1919
app.kubernetes.io/component: admintools
2020
{{- end }}

charts/temporal/templates/frontend-ingress.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ apiVersion: extensions/v1beta1
88
{{- end }}
99
kind: Ingress
1010
metadata:
11-
name: {{ include "temporal.componentname" (list . "frontend") }}
11+
name: {{ include "temporal.componentname" (list $ "frontend") }}
1212
labels:
13-
{{- include "temporal.resourceLabels" (list . "frontend" "") | nindent 4 }}
13+
{{- include "temporal.resourceLabels" (list $ "frontend" "") | nindent 4 }}
1414
{{- with .Values.server.frontend.ingress.annotations }}
1515
annotations:
1616
{{ toYaml . | indent 4 }}

charts/temporal/templates/server-configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ kind: ConfigMap
66
metadata:
77
name: "{{ include "temporal.fullname" $ }}-config"
88
labels:
9-
{{- include "temporal.resourceLabels" (list . "" "") | nindent 4 }}
9+
{{- include "temporal.resourceLabels" (list $ "" "") | nindent 4 }}
1010
data:
1111
config_template.yaml: |-
1212
log:

charts/temporal/templates/server-dynamicconfigmap.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
apiVersion: v1
33
kind: ConfigMap
44
metadata:
5-
name: "{{ include "temporal.fullname" . }}-dynamic-config"
5+
name: "{{ include "temporal.fullname" $ }}-dynamic-config"
66
labels:
7-
{{- include "temporal.resourceLabels" (list . "" "") | nindent 4 }}
7+
{{- include "temporal.resourceLabels" (list $ "" "") | nindent 4 }}
88
data:
99
dynamic_config.yaml: |-
1010
{{- if $.Values.server.dynamicConfig }}

charts/temporal/templates/server-job.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
apiVersion: batch/v1
33
kind: Job
44
metadata:
5-
name: {{ include "temporal.componentname" (list . "schema") }}
5+
name: {{ include "temporal.componentname" (list $ "schema") }}
66
labels:
7-
{{- include "temporal.resourceLabels" (list . "database" "") | nindent 4 }}
7+
{{- include "temporal.resourceLabels" (list $ "database" "") | nindent 4 }}
88
spec:
99
backoffLimit: {{ $.Values.schema.setup.backoffLimit }}
1010
template:
1111
metadata:
12-
name: {{ include "temporal.componentname" (list . "schema") }}
12+
name: {{ include "temporal.componentname" (list $ "schema") }}
1313
labels:
14-
{{- include "temporal.resourceLabels" (list . "database" "") | nindent 8 }}
14+
{{- include "temporal.resourceLabels" (list $ "database" "") | nindent 8 }}
1515
{{- with $.Values.schema.podLabels }}
1616
{{- toYaml . | nindent 8 }}
1717
{{- end }}
@@ -20,7 +20,7 @@ spec:
2020
{{- toYaml . | nindent 8 }}
2121
{{- end }}
2222
spec:
23-
{{- include "temporal.serviceAccount" . }}
23+
{{- include "temporal.serviceAccount" $ }}
2424
restartPolicy: OnFailure
2525
initContainers:
2626
{{- if $.Values.cassandra.enabled }}

charts/temporal/templates/server-pdb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ kind: PodDisruptionBudget
77
metadata:
88
name: {{ include "temporal.componentname" (list $ $service) }}-pdb
99
labels:
10-
{{- include "temporal.resourceLabels" (list . $service "") | nindent 4 }}
10+
{{- include "temporal.resourceLabels" (list $ $service "") | nindent 4 }}
1111
spec:
1212
{{ toYaml $serviceValues.podDisruptionBudget }}
1313
selector:

charts/temporal/templates/server-service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: {{ include "temporal.componentname" (list . "frontend") }}
5+
name: {{ include "temporal.componentname" (list $ "frontend") }}
66
labels:
77
{{- include "temporal.resourceLabels" (list $ "frontend" "") | nindent 4 }}
88
{{- if .Values.server.frontend.service.annotations }}
@@ -24,7 +24,7 @@ spec:
2424
name: http
2525
# TODO: Allow customizing the node HTTP port
2626
selector:
27-
app.kubernetes.io/name: {{ include "temporal.name" . }}
27+
app.kubernetes.io/name: {{ include "temporal.name" $ }}
2828
app.kubernetes.io/instance: {{ .Release.Name }}
2929
app.kubernetes.io/component: frontend
3030

charts/temporal/templates/serviceaccount.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:
5-
name: {{ include "temporal.serviceAccountName" . }}
5+
name: {{ include "temporal.serviceAccountName" $ }}
66
labels:
7-
{{- include "temporal.resourceLabels" (list . "" "") | nindent 4 }}
7+
{{- include "temporal.resourceLabels" (list $ "" "") | nindent 4 }}
88
annotations:
99
helm.sh/hook: pre-install, pre-upgrade
1010
helm.sh/hook-weight: "-10"

charts/temporal/templates/web-deployment.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:
5-
name: {{ include "temporal.componentname" (list . "web") }}
5+
name: {{ include "temporal.componentname" (list $ "web") }}
66
labels:
7-
{{- include "temporal.resourceLabels" (list . "web" "") | nindent 4 }}
7+
{{- include "temporal.resourceLabels" (list $ "web" "") | nindent 4 }}
88
spec:
99
replicas: {{ .Values.web.replicaCount }}
1010
selector:
1111
matchLabels:
12-
app.kubernetes.io/name: {{ include "temporal.name" . }}
12+
app.kubernetes.io/name: {{ include "temporal.name" $ }}
1313
app.kubernetes.io/instance: {{ .Release.Name }}
1414
app.kubernetes.io/component: web
1515
template:
@@ -21,7 +21,7 @@ spec:
2121
{{- toYaml . | nindent 8 }}
2222
{{- end }}
2323
spec:
24-
{{ include "temporal.serviceAccount" . }}
24+
{{ include "temporal.serviceAccount" $ }}
2525
{{- if .Values.web.additionalVolumes }}
2626
volumes:
2727
{{- toYaml .Values.web.additionalVolumes | nindent 8 }}
@@ -32,7 +32,7 @@ spec:
3232
imagePullPolicy: {{ .Values.web.image.pullPolicy }}
3333
env:
3434
- name: TEMPORAL_ADDRESS
35-
value: "{{ include "temporal.fullname" . }}-frontend.{{ .Release.Namespace }}.svc:{{ .Values.server.frontend.service.port }}"
35+
value: "{{ include "temporal.fullname" $ }}-frontend.{{ .Release.Namespace }}.svc:{{ .Values.server.frontend.service.port }}"
3636
{{- if .Values.web.additionalEnv }}
3737
{{- toYaml .Values.web.additionalEnv | nindent 12 }}
3838
{{- end }}

0 commit comments

Comments
 (0)