Skip to content

Commit

Permalink
Remove duplicated label in helm chart: app.kubernetes.io/instance (#354)
Browse files Browse the repository at this point in the history
* R  templates/certmanager/certifacate.yaml -> templates/certmanager/certificate.yaml
M  templates/manager/deployment.yaml Edit#481

* M  lws/templates/_helpers.tpl Edit#482
  • Loading branch information
DiegoLelis authored Jan 31, 2025
1 parent 06f2219 commit 34422e7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
16 changes: 15 additions & 1 deletion charts/lws/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Common labels
*/}}
{{- define "lws.labels" -}}
helm.sh/chart: {{ include "lws.chart" . }}
{{ include "lws.selectorLabels" . }}
{{ include "lws.nameLabel" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -46,7 +46,21 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
Selector labels
*/}}
{{- define "lws.selectorLabels" -}}
{{ include "lws.nameLabel" . }}
{{ include "lws.instanceLabel" . }}
{{- end }}

{{/*
Name label
*/}}
{{- define "lws.nameLabel" -}}
app.kubernetes.io/name: {{ include "lws.name" . }}
{{- end }}

{{/*
Instance label
*/}}
{{- define "lws.instanceLabel" -}}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

Expand Down
2 changes: 2 additions & 0 deletions charts/lws/templates/manager/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
labels:
control-plane: controller-manager
{{- include "lws.labels" . | nindent 4 }}
{{- include "lws.instanceLabel" . | nindent 4 }}

spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand Down

0 comments on commit 34422e7

Please sign in to comment.