argocd-helm/charts/argo-cd/templates/dex/deployment.yaml
TomHellier 33c4adfbb6 Issue #147, k8s label part-of expected to be argocd (#151)
The argocd application expects that the label 'app.kubernetes.io/part-of' is set to 'argocd' otherwise the configmap or secret is rejected, and the argocd-dex-server, argocd-server, and argocd-application-controller fail to start.
2019-11-06 09:47:56 +11:00

76 lines
No EOL
2.7 KiB
YAML

{{- if .Values.dex.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "argo-cd.dex.fullname" . }}
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 }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.dex.name }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
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 }}
spec:
initContainers:
- name: copyutil
image: {{ default .Values.global.image.repository .Values.dex.initImage.repository }}:{{ default .Values.global.image.tag .Values.dex.initImage.tag }}
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.dex.initImage.pullPolicy }}
command:
- cp
- /usr/local/bin/argocd-util
- /shared
volumeMounts:
- mountPath: /shared
name: static-files
containers:
- name: {{ .Values.dex.name }}
image: {{ .Values.dex.image.repository }}:{{ .Values.dex.image.tag }}
imagePullPolicy: {{ .Values.dex.image.pullPolicy }}
command:
- /shared/argocd-util
- rundex
ports:
- name: http
containerPort: {{ .Values.dex.containerPortHttp }}
protocol: TCP
- name: grpc
containerPort: {{ .Values.dex.containerPortGrpc }}
protocol: TCP
{{- if .Values.dex.volumeMounts }}
volumeMounts:
{{- toYaml .Values.dex.volumeMounts | nindent 10 }}
{{- end }}
resources:
{{- toYaml .Values.dex.resources | nindent 10 }}
{{- if .Values.dex.nodeSelector }}
nodeSelector:
{{- toYaml .Values.dex.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.dex.tolerations }}
tolerations:
{{- toYaml .Values.dex.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.dex.affinity }}
affinity:
{{- toYaml .Values.dex.affinity | nindent 8 }}
{{- end }}
serviceAccountName: {{ template "argo-cd.dexServiceAccountName" . }}
{{- if .Values.dex.volumes }}
volumes:
{{- toYaml .Values.dex.volumes | nindent 8}}
{{- end }}
{{- end }}