Skip to content

Commit

Permalink
fix: selector label error (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra authored Jul 10, 2024
1 parent 3162edb commit 75b42c6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion agent-chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ Selector labels
app.kubernetes.io/name: {{ include "incident-commander.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
control-plane: incident-commander
{{- if .Values.global.labels }}
{{- end }}

{{- define "incident-commander.extraLabels" -}}
{{- if .Values.global.labels -}}
{{.Values.global.labels | toYaml}}
{{- end }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions agent-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: {{ include "incident-commander.name" . }}
labels:
{{- include "incident-commander.labels" . | nindent 4 }}
{{- include "incident-commander.extraLabels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicas }}
selector:
Expand All @@ -13,6 +14,7 @@ spec:
metadata:
labels:
{{- include "incident-commander.selectorLabels" . | nindent 8 }}
{{- include "incident-commander.extraLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name }}
volumes:
Expand Down
5 changes: 4 additions & 1 deletion chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ Selector labels
app.kubernetes.io/name: {{ include "incident-commander.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
control-plane: incident-commander
{{- if .Values.global.labels }}
{{- end }}

{{- define "incident-commander.extraLabels" -}}
{{- if .Values.global.labels -}}
{{.Values.global.labels | toYaml}}
{{- end }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: {{ include "incident-commander.name" . }}
labels:
{{- include "incident-commander.labels" . | nindent 4 }}
{{- include "incident-commander.extraLabels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicas }}
revisionHistoryLimit: 1
Expand All @@ -14,6 +15,7 @@ spec:
metadata:
labels:
{{- include "incident-commander.selectorLabels" . | nindent 8 }}
{{- include "incident-commander.extraLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ .Values.serviceAccount.name }}
volumes:
Expand Down

0 comments on commit 75b42c6

Please sign in to comment.