Skip to content

Commit

Permalink
fix: don't let the helper function call a non existent func
Browse files Browse the repository at this point in the history
  • Loading branch information
alee-x committed Oct 10, 2024
1 parent 6bc6e48 commit f54a24c
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 17 deletions.
32 changes: 28 additions & 4 deletions charts/agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,33 @@ Create chart name and version as used by the chart label.
{{/*
Common labels - egress
*/}}
{{- define "agent.egressLabels" -}}
{{- define "agent.egressApiLabels" -}}
helm.sh/chart: {{ include "agent.chart" . }}
{{ include "agent.egressSelectorLabels" . }}
{{ include "agent.egressApiSelectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Common labels - egress
*/}}
{{- define "agent.egressUiLabels" -}}
helm.sh/chart: {{ include "agent.chart" . }}
{{ include "agent.egressUiSelectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Common labels - tre
*/}}
{{- define "agent.treApiLabels" -}}
helm.sh/chart: {{ include "agent.chart" . }}
{{ include "agent.treApiSelectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,9 +69,9 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Common labels - tre
*/}}
{{- define "agent.treLabels" -}}
{{- define "agent.treUiLabels" -}}
helm.sh/chart: {{ include "agent.chart" . }}
{{ include "agent.treSelectorLabels" . }}
{{ include "agent.treUiSelectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/egress/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: {{ include "agent.fullname" . }}-egress-api
labels:
{{- include "agent.egressLabels" . | nindent 4 }}
{{- include "agent.egressApiLabels" . | nindent 4 }}
spec:
replicas: 1
selector:
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/egress/api/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kind: Ingress
metadata:
name: {{ $fullName }}-api
labels:
{{- include "agent.egressLabels" . | nindent 4 }}
{{- include "agent.egressApiLabels" . | nindent 4 }}
{{- with .Values.egress.api.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/egress/api/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Service
metadata:
name: {{ include "agent.fullname" . }}-egress-api
labels:
{{- include "agent.egressLabels" . | nindent 4 }}
{{- include "agent.egressApiLabels" . | nindent 4 }}
spec:
type: {{ .Values.egress.api.service.type }}
ports:
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/egress/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ServiceAccount
metadata:
name: {{ include "agent.egressServiceAccountName" . }}-egress
labels:
{{- include "agent.egressLabels" . | nindent 4 }}
{{- include "agent.egressUiLabels" . | nindent 4 }}
{{- with .Values.egress.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/egress/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: {{ include "agent.fullname" . }}-egress-ui
labels:
{{- include "agent.egressLabels" . | nindent 4 }}
{{- include "agent.egressUiLabels" . | nindent 4 }}
spec:
replicas: 1
selector:
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/egress/ui/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kind: Ingress
metadata:
name: {{ $fullName }}-ui
labels:
{{- include "agent.egressLabels" . | nindent 4 }}
{{- include "agent.egressUiLabels" . | nindent 4 }}
{{- with .Values.egress.ui.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/egress/ui/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Service
metadata:
name: {{ include "agent.fullname" . }}-egress-ui
labels:
{{- include "agent.egressLabels" . | nindent 4 }}
{{- include "agent.egressUiLabels" . | nindent 4 }}
spec:
type: {{ .Values.egress.ui.service.type }}
ports:
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/tre/api/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: {{ include "agent.fullname" . }}-tre-api
labels:
{{- include "agent.treLabels" . | nindent 4 }}
{{- include "agent.treApiLabels" . | nindent 4 }}
spec:
replicas: 1
selector:
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/tre/api/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kind: Ingress
metadata:
name: {{ $fullName }}-api
labels:
{{- include "agent.treLabels" . | nindent 4 }}
{{- include "agent.treApiLabels" . | nindent 4 }}
{{- with .Values.tre.api.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/tre/api/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Service
metadata:
name: {{ include "agent.fullname" . }}-tre-api
labels:
{{- include "agent.treLabels" . | nindent 4 }}
{{- include "agent.treApiLabels" . | nindent 4 }}
spec:
type: {{ .Values.tre.api.service.type }}
ports:
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/tre/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ServiceAccount
metadata:
name: {{ include "agent.treServiceAccountName" . }}-tre
labels:
{{- include "agent.treLabels" . | nindent 4 }}
{{- include "agent.treUiLabels" . | nindent 4 }}
{{- with .Values.tre.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/tre/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: {{ include "agent.fullname" . }}-tre-ui
labels:
{{- include "agent.treLabels" . | nindent 4 }}
{{- include "agent.treUiLabels" . | nindent 4 }}
spec:
replicas: 1
selector:
Expand Down
2 changes: 1 addition & 1 deletion charts/agent/templates/tre/ui/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Service
metadata:
name: {{ include "agent.fullname" . }}-tre-ui
labels:
{{- include "agent.treLabels" . | nindent 4 }}
{{- include "agent.treUiLabels" . | nindent 4 }}
spec:
type: {{ .Values.tre.ui.service.type }}
ports:
Expand Down

0 comments on commit f54a24c

Please sign in to comment.