* reenable static assets for argo-cd server Signed-off-by: Geisler, James D <geislerjamesd@gmail.com> * add fix to changelog Signed-off-by: Geisler, James D <geislerjamesd@gmail.com> * feat(argo-cd): Upgrade argo-cd image to 2.1.1 Signed-off-by: Petr Drastil <petr.drastil@gmail.com> * Bump chart version Signed-off-by: Petr Drastil <petr.drastil@gmail.com> * Bump fix version Signed-off-by: Petr Drastil <petr.drastil@gmail.com> Co-authored-by: Geisler, James D <geislerjamesd@gmail.com>
184 lines
7 KiB
YAML
Executable file
184 lines
7 KiB
YAML
Executable file
{{- $redisHa := (index .Values "redis-ha") -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "argo-cd.server.fullname" . }}
|
|
labels:
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
|
app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.server.image.tag | quote }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 6 }}
|
|
revisionHistoryLimit: 5
|
|
{{- if (ne .Values.server.autoscaling.enabled true) }}
|
|
replicas: {{ .Values.server.replicas }}
|
|
{{- end }}
|
|
template:
|
|
metadata:
|
|
{{- with (mergeOverwrite .Values.global.podAnnotations .Values.server.podAnnotations) }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 8 }}
|
|
app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.server.image.tag | quote }}
|
|
{{- with (mergeOverwrite .Values.global.podLabels .Values.server.podLabels) }}
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.global.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.global.securityContext }}
|
|
securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }}
|
|
{{- end }}
|
|
containers:
|
|
- name: {{ .Values.server.name }}
|
|
image: {{ default .Values.global.image.repository .Values.server.image.repository }}:{{ default .Values.global.image.tag .Values.server.image.tag }}
|
|
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.server.image.imagePullPolicy }}
|
|
command:
|
|
- argocd-server
|
|
{{ if .Values.server.staticAssets.enabled }}
|
|
- --staticassets
|
|
- /shared/app
|
|
{{ end }}
|
|
- --repo-server
|
|
- {{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
|
|
{{- if .Values.dex.enabled }}
|
|
- --dex-server
|
|
- http://{{ template "argo-cd.dex.fullname" . }}:{{ .Values.dex.servicePortHttp }}
|
|
{{- end }}
|
|
- --logformat
|
|
- {{ .Values.server.logFormat }}
|
|
- --loglevel
|
|
- {{ .Values.server.logLevel }}
|
|
{{- if or (and .Values.redis.enabled (not $redisHa.enabled)) (and $redisHa.enabled $redisHa.haproxy.enabled) }}
|
|
- --redis
|
|
- {{ template "argo-cd.redis.fullname" . }}:{{ .Values.redis.servicePort }}
|
|
{{- end }}
|
|
{{- with .Values.server.extraArgs }}
|
|
{{- . | toYaml | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.server.containerSecurityContext }}
|
|
securityContext: {{- toYaml .Values.server.containerSecurityContext | nindent 10 }}
|
|
{{- end }}
|
|
{{- if .Values.server.env }}
|
|
env:
|
|
{{- toYaml .Values.server.env | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.server.envFrom }}
|
|
envFrom: {{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
{{- if .Values.server.volumeMounts }}
|
|
{{- toYaml .Values.server.volumeMounts | nindent 8}}
|
|
{{- end }}
|
|
{{- if .Values.configs.knownHosts }}
|
|
- mountPath: /app/config/ssh
|
|
name: ssh-known-hosts
|
|
{{- end }}
|
|
{{- if .Values.configs.tlsCerts }}
|
|
- mountPath: /app/config/tls
|
|
name: tls-certs
|
|
{{- end }}
|
|
- mountPath: /app/config/server/tls
|
|
name: argocd-repo-server-tls
|
|
{{- if .Values.configs.styles }}
|
|
- mountPath: "/shared/app/custom/custom.styles.css"
|
|
subPath: "custom.styles.css"
|
|
name: custom-styles
|
|
{{- end }}
|
|
- mountPath: /tmp
|
|
name: tmp-dir
|
|
ports:
|
|
- name: {{ .Values.server.name }}
|
|
containerPort: {{ .Values.server.containerPort }}
|
|
protocol: TCP
|
|
{{ if .Values.server.metrics.enabled }}
|
|
- name: metrics
|
|
containerPort: 8083
|
|
protocol: TCP
|
|
{{- end }}
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: {{ .Values.server.containerPort }}
|
|
initialDelaySeconds: {{ .Values.server.livenessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.server.livenessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.server.livenessProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.server.livenessProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.server.livenessProbe.failureThreshold }}
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: {{ .Values.server.containerPort }}
|
|
initialDelaySeconds: {{ .Values.server.readinessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.server.readinessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.server.readinessProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.server.readinessProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.server.readinessProbe.failureThreshold }}
|
|
resources:
|
|
{{- toYaml .Values.server.resources | nindent 10 }}
|
|
{{- if .Values.server.lifecycle }}
|
|
lifecycle:
|
|
{{- toYaml .Values.server.lifecycle | nindent 10 }}
|
|
{{- end }}
|
|
{{- if .Values.server.extraContainers }}
|
|
{{- toYaml .Values.server.extraContainers | nindent 6 }}
|
|
{{- end }}
|
|
{{- if .Values.server.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml .Values.server.nodeSelector | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.server.tolerations }}
|
|
tolerations:
|
|
{{- toYaml .Values.server.tolerations | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.server.affinity }}
|
|
affinity:
|
|
{{- toYaml .Values.server.affinity | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ template "argo-cd.serverServiceAccountName" . }}
|
|
{{- with .Values.global.hostAliases }}
|
|
hostAliases:
|
|
{{ toYaml . | indent 6 }}
|
|
{{- end }}
|
|
volumes:
|
|
{{- if .Values.server.volumes }}
|
|
{{- toYaml .Values.server.volumes | nindent 6}}
|
|
{{- end }}
|
|
- emptyDir: {}
|
|
name: static-files
|
|
- emptyDir: {}
|
|
name: tmp-dir
|
|
{{- if .Values.configs.styles }}
|
|
- configMap:
|
|
name: argocd-custom-styles
|
|
name: custom-styles
|
|
{{- end }}
|
|
{{- if .Values.configs.knownHosts }}
|
|
- configMap:
|
|
name: argocd-ssh-known-hosts-cm
|
|
name: ssh-known-hosts
|
|
{{- end }}
|
|
{{- if .Values.configs.tlsCerts }}
|
|
- configMap:
|
|
name: argocd-tls-certs-cm
|
|
name: tls-certs
|
|
{{- end }}
|
|
- name: argocd-repo-server-tls
|
|
secret:
|
|
items:
|
|
- key: tls.crt
|
|
path: tls.crt
|
|
- key: tls.key
|
|
path: tls.key
|
|
- key: ca.crt
|
|
path: ca.crt
|
|
optional: true
|
|
secretName: argocd-repo-server-tls
|
|
{{- if .Values.server.priorityClassName }}
|
|
priorityClassName: {{ .Values.server.priorityClassName }}
|
|
{{- end }}
|