Skip to content

Commit

Permalink
fix: selector label error
Browse files Browse the repository at this point in the history
  • Loading branch information
yashmehrotra committed Jul 10, 2024
1 parent 5a97b7a commit e5e719a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ Selector labels
app.kubernetes.io/name: {{ include "config-db.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
control-plane: {{ include "config-db.name" . }}
{{- if .Values.global.labels }}
{{- end }}

{{- define "config-db.extraLabels" -}}
{{- if .Values.global.labels -}}
{{.Values.global.labels | toYaml}}
{{- end }}
{{- end }}

8 changes: 6 additions & 2 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ kind: Deployment
{{- end }}
metadata:
name: {{ include "config-db.name" . }}
labels: {{- include "config-db.labels" . | nindent 4 }}
labels:
{{- include "config-db.labels" . | nindent 4 }}
{{- include "config-db.extraLabels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicas }}
revisionHistoryLimit: 1
Expand All @@ -32,7 +34,9 @@ spec:
{{- end }}
template:
metadata:
labels: {{- include "config-db.selectorLabels" . | nindent 8 }}
labels:
{{- include "config-db.selectorLabels" . | nindent 8 }}
{{- include "config-db.extraLabels" . | nindent 8 }}
spec:
serviceAccountName: {{ template "config-db.serviceAccountName" . }}
securityContext:
Expand Down

0 comments on commit e5e719a

Please sign in to comment.