argocd-helm/charts/argo-cd/templates/redis/deployment.yaml
Marcel Hoyer 3ba4cdb1ca
fix(argo-cd): Sync ArgoCD helm chart with kustomize (#659)
* copy CRD resource files from https://github.com/argoproj/argo-cd/tree/v2.0.0/manifests/crds

Signed-off-by: Marcel Hoyer <mhoyer@pixelplastic.de>

* update `global.image` values in `values.yaml` to quay.io

Signed-off-by: Marcel Hoyer <mhoyer@pixelplastic.de>

* update redis image to 6.2.1

Signed-off-by: Marcel Hoyer <mhoyer@pixelplastic.de>

* add optional volume mount to secret `argocd-repo-server-tls` according to 7a68880e2e

Signed-off-by: Marcel Hoyer <mhoyer@pixelplastic.de>

* increase patch version of chart to 3.0.1

Signed-off-by: Marcel Hoyer <mhoyer@pixelplastic.de>

* add `redis.extraArgs` to enable customization of `redis-server` arguments

Signed-off-by: Marcel Hoyer <mhoyer@pixelplastic.de>

* add some notes to the `README` about syncing changes from original `manifests/install.yaml`

Signed-off-by: Marcel Hoyer <mhoyer@pixelplastic.de>

* fix example for `extraArgs` in `values.yaml` of argo-cd chart

Signed-off-by: Marcel Hoyer <mhoyer@pixelplastic.de>

* Bump chart version to 3.1.2

Signed-off-by: Marcel Hoyer <mhoyer@pixelplastic.de>

* Bump argo-cd version to 3.2.2

Signed-off-by: Marcel Hoyer <mhoyer@pixelplastic.de>

Co-authored-by: Oliver Bähler <oliverbaehler@hotmail.com>

Co-authored-by: Oliver Bähler <oliverbaehler@hotmail.com>
2021-04-24 12:50:25 +02:00

84 lines
2.9 KiB
YAML
Executable file

{{- $redisHa := (index .Values "redis-ha") -}}
{{- if and .Values.redis.enabled (not $redisHa.enabled) -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "argo-cd.redis.fullname" . }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
app.kubernetes.io/version: {{ .Values.redis.image.tag | quote }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }}
template:
metadata:
{{- if .Values.redis.podAnnotations }}
annotations:
{{- range $key, $value := .Values.redis.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 8 }}
app.kubernetes.io/version: {{ .Values.redis.image.tag | quote }}
{{- if .Values.redis.podLabels }}
{{- toYaml .Values.redis.podLabels | nindent 8 }}
{{- end }}
spec:
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
automountServiceAccountToken: false
{{- if .Values.redis.securityContext }}
securityContext: {{- toYaml .Values.redis.securityContext | nindent 8 }}
{{- end }}
containers:
- name: {{ template "argo-cd.redis.fullname" . }}
args:
- --save
- ""
- --appendonly
- "no"
{{- with .Values.redis.extraArgs }}
{{- . | toYaml | nindent 8 }}
{{- end }}
image: {{ .Values.redis.image.repository }}:{{ .Values.redis.image.tag }}
imagePullPolicy: {{ .Values.redis.image.imagePullPolicy}}
{{- if .Values.redis.containerSecurityContext }}
securityContext: {{- toYaml .Values.redis.containerSecurityContext | nindent 10 }}
{{- end }}
{{- if .Values.redis.env }}
env:
{{- toYaml .Values.redis.env | nindent 8 }}
{{- end }}
ports:
- containerPort: {{ .Values.redis.containerPort }}
{{- if .Values.redis.volumeMounts }}
volumeMounts:
{{- toYaml .Values.redis.volumeMounts | nindent 10 }}
{{- end }}
resources:
{{- toYaml .Values.redis.resources | nindent 10 }}
{{- if .Values.redis.nodeSelector }}
nodeSelector:
{{- toYaml .Values.redis.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.redis.tolerations }}
tolerations:
{{- toYaml .Values.redis.tolerations | nindent 8 }}
{{- end }}
{{- if .Values.redis.affinity }}
affinity:
{{- toYaml .Values.redis.affinity | nindent 8 }}
{{- end }}
{{- if .Values.redis.volumes }}
volumes:
{{- toYaml .Values.redis.volumes | nindent 8}}
{{- end }}
{{- if .Values.redis.priorityClassName }}
priorityClassName: {{ .Values.redis.priorityClassName }}
{{- end }}
{{- end }}