argocd-helm/charts/argo-cd/templates/dex/deployment.yaml
Léo Depriester 3a2c980044 [charts/argo-cd] add support of custom environment variables (#181)
Signed-off-by: Léo Depriester <leo.depriester@camptocamp.com>
* Fix controller env path
* Updating chart bump to patch as this is a backwards compatible change
2019-12-06 10:50:47 +11:00

80 lines
2.8 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.imagePullPolicy }}
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.imagePullPolicy }}
command:
- /shared/argocd-util
- rundex
{{- if .Values.dex.env }}
env:
{{- toYaml .Values.dex.env | nindent 8 }}
{{- end }}
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 }}