refactor(argo-cd): Use templating for labels (#627)

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
Marco Kilchhofer 2021-03-22 21:15:37 +01:00 committed by GitHub
parent da2dbda83e
commit 3b0ebdda66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 92 additions and 347 deletions

View file

@ -10,12 +10,7 @@ metadata:
{{- end }}
{{- end }}
labels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.dex.name }}
helm.sh/chart: {{ include "argo-cd.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/part-of: argocd
app.kubernetes.io/component: {{ .Values.dex.name }}
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 4 }}
{{- if .Values.dex.metrics.service.labels }}
{{- toYaml .Values.dex.metrics.service.labels | nindent 4 }}
{{- end }}
@ -36,6 +31,5 @@ spec:
targetPort: metrics
{{- end }}
selector:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.dex.name }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 4 }}
{{- end }}