155 lines
6.2 KiB
YAML
Executable File
155 lines
6.2 KiB
YAML
Executable File
{{- $redisHa := (index .Values "redis-ha") -}}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "argo-cd.repoServer.fullname" . }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.repoServer.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.repoServer.name }}
|
|
app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.repoServer.image.tag | quote }}
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.repoServer.name }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
revisionHistoryLimit: 5
|
|
{{- if (ne .Values.repoServer.autoscaling.enabled true) }}
|
|
replicas: {{ .Values.repoServer.replicas }}
|
|
{{- end }}
|
|
template:
|
|
metadata:
|
|
{{- if .Values.repoServer.podAnnotations }}
|
|
annotations:
|
|
{{- range $key, $value := .Values.repoServer.podAnnotations }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.repoServer.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.repoServer.name }}
|
|
app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.repoServer.image.tag | quote }}
|
|
{{- if .Values.repoServer.podLabels }}
|
|
{{- toYaml .Values.repoServer.podLabels | 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.repoServer.name }}
|
|
image: {{ default .Values.global.image.repository .Values.repoServer.image.repository }}:{{ default .Values.global.image.tag .Values.repoServer.image.tag }}
|
|
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.repoServer.image.imagePullPolicy }}
|
|
command:
|
|
{{- if .Values.openshift.enabled }}
|
|
- uid_entrypoint.sh
|
|
{{- end }}
|
|
- argocd-repo-server
|
|
{{- 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 }}
|
|
- --loglevel
|
|
- {{ .Values.repoServer.logLevel }}
|
|
{{- with .Values.repoServer.extraArgs }}
|
|
{{- . | toYaml | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.repoServer.containerSecurityContext }}
|
|
securityContext: {{- toYaml .Values.repoServer.containerSecurityContext | nindent 10 }}
|
|
{{- end }}
|
|
{{- if or (.Values.repoServer.env) (.Values.openshift.enabled) }}
|
|
env:
|
|
{{- if .Values.repoServer.env }}
|
|
{{- toYaml .Values.repoServer.env | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.openshift.enabled }}
|
|
- name: USER_NAME
|
|
value: argocd
|
|
{{- end }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
{{- if .Values.repoServer.volumeMounts }}
|
|
{{- toYaml .Values.repoServer.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 }}
|
|
ports:
|
|
- name: repo-server
|
|
containerPort: {{ .Values.repoServer.containerPort }}
|
|
protocol: TCP
|
|
{{ if .Values.repoServer.metrics.enabled }}
|
|
- name: metrics
|
|
containerPort: 8084
|
|
protocol: TCP
|
|
{{- end }}
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: {{ .Values.repoServer.containerPort }}
|
|
initialDelaySeconds: {{ .Values.repoServer.livenessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.repoServer.livenessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.repoServer.livenessProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.repoServer.livenessProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.repoServer.livenessProbe.failureThreshold }}
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: {{ .Values.repoServer.containerPort }}
|
|
initialDelaySeconds: {{ .Values.repoServer.readinessProbe.initialDelaySeconds }}
|
|
periodSeconds: {{ .Values.repoServer.readinessProbe.periodSeconds }}
|
|
timeoutSeconds: {{ .Values.repoServer.readinessProbe.timeoutSeconds }}
|
|
successThreshold: {{ .Values.repoServer.readinessProbe.successThreshold }}
|
|
failureThreshold: {{ .Values.repoServer.readinessProbe.failureThreshold }}
|
|
resources:
|
|
{{- toYaml .Values.repoServer.resources | nindent 10 }}
|
|
{{- if .Values.repoServer.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml .Values.repoServer.nodeSelector | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.repoServer.tolerations }}
|
|
tolerations:
|
|
{{- toYaml .Values.repoServer.tolerations | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.repoServer.affinity }}
|
|
affinity:
|
|
{{- toYaml .Values.repoServer.affinity | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ template "argo-cd.repoServerServiceAccountName" . }}
|
|
{{- with .Values.global.hostAliases }}
|
|
hostAliases:
|
|
{{ toYaml . | indent 6 }}
|
|
{{- end }}
|
|
volumes:
|
|
{{- if .Values.repoServer.volumes }}
|
|
{{- toYaml .Values.repoServer.volumes | nindent 6}}
|
|
{{- 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 }}
|
|
{{- if .Values.repoServer.initContainers }}
|
|
initContainers:
|
|
{{- toYaml .Values.repoServer.initContainers | nindent 6 }}
|
|
{{- end }}
|