Skip to content

Commit

Permalink
Add: Keda CRD labels for ArgoCD Application's releaseName
Browse files Browse the repository at this point in the history
Signed-off-by: choisungwook <[email protected]>
  • Loading branch information
choisungwook committed Nov 2, 2023
1 parent 02b56f3 commit 29aabd0
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
12 changes: 10 additions & 2 deletions keda/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@ Create chart name and version as used by the chart label.
{{- end -}}

{{/*
Generate basic labels
Generate CRD labels
*/}}
{{- define "keda.labels" }}
{{- define "keda.crd-labels" }}
helm.sh/chart: {{ include "keda.chart" . }}
app.kubernetes.io/component: operator
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/part-of: {{ .Values.operator.name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
{{- end }}
{{- end }}

{{/*
Generate basic labels
*/}}
{{- define "keda.labels" -}}
{{- include "keda.crd-labels" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.additionalLabels }}
{{ toYaml .Values.additionalLabels }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion keda/templates/crds/crd-clustertriggerauthentications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
{{- include "keda.labels" . | indent 4 }}
{{- include "keda.crd-labels" . | indent 4 }}
name: clustertriggerauthentications.keda.sh
spec:
group: keda.sh
Expand Down
2 changes: 1 addition & 1 deletion keda/templates/crds/crd-scaledjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
{{- include "keda.labels" . | indent 4 }}
{{- include "keda.crd-labels" . | indent 4 }}
name: scaledjobs.keda.sh
spec:
group: keda.sh
Expand Down
2 changes: 1 addition & 1 deletion keda/templates/crds/crd-scaledobjects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
{{- include "keda.labels" . | indent 4 }}
{{- include "keda.crd-labels" . | indent 4 }}
name: scaledobjects.keda.sh
spec:
group: keda.sh
Expand Down
2 changes: 1 addition & 1 deletion keda/templates/crds/crd-triggerauthentications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
{{- end }}
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
{{- include "keda.labels" . | indent 4 }}
{{- include "keda.crd-labels" . | indent 4 }}
name: triggerauthentications.keda.sh
spec:
group: keda.sh
Expand Down

0 comments on commit 29aabd0

Please sign in to comment.