chore(argo-cd): Cleanup Redis manifest (#1577)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
parent
229ca3902a
commit
2cdd2ba687
2 changed files with 66 additions and 60 deletions
|
@ -2,7 +2,7 @@ apiVersion: v2
|
||||||
appVersion: v2.5.0
|
appVersion: v2.5.0
|
||||||
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
||||||
name: argo-cd
|
name: argo-cd
|
||||||
version: 5.8.4
|
version: 5.8.5
|
||||||
home: https://github.com/argoproj/argo-helm
|
home: https://github.com/argoproj/argo-helm
|
||||||
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
|
||||||
sources:
|
sources:
|
||||||
|
@ -22,4 +22,5 @@ dependencies:
|
||||||
condition: redis-ha.enabled
|
condition: redis-ha.enabled
|
||||||
annotations:
|
annotations:
|
||||||
artifacthub.io/changes: |
|
artifacthub.io/changes: |
|
||||||
- "[Removed]: AWS volume from server component"
|
- "[Changed]: Cleanup indentation in Redis deployment manifest"
|
||||||
|
- "[Fixed]: Global image pull policy works with Redis"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{{- $redisHa := (index .Values "redis-ha") -}}
|
{{- $redisHa := index .Values "redis-ha" -}}
|
||||||
{{- if and .Values.redis.enabled (not $redisHa.enabled) -}}
|
{{- if and .Values.redis.enabled (not $redisHa.enabled) -}}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ template "argo-cd.redis.fullname" . }}
|
name: {{ include "argo-cd.redis.fullname" . }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
@ -12,111 +12,116 @@ spec:
|
||||||
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }}
|
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }}
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 8 }}
|
||||||
|
{{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.redis.podLabels) }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.redis.podAnnotations) }}
|
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.redis.podAnnotations) }}
|
||||||
annotations:
|
annotations:
|
||||||
{{- range $key, $value := . }}
|
{{- range $key, $value := . }}
|
||||||
{{ $key }}: {{ $value | quote }}
|
{{ $key }}: {{ $value | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
labels:
|
|
||||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 8 }}
|
|
||||||
{{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.redis.podLabels) }}
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.redis.imagePullSecrets | default .Values.global.imagePullSecrets }}
|
{{- with .Values.redis.imagePullSecrets | default .Values.global.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
automountServiceAccountToken: {{ .Values.redis.serviceAccount.automountServiceAccountToken }}
|
{{- with .Values.redis.securityContext }}
|
||||||
serviceAccountName: {{ template "argo-cd.redisServiceAccountName" . }}
|
securityContext:
|
||||||
{{- if .Values.redis.securityContext }}
|
{{- toYaml . | nindent 8 }}
|
||||||
securityContext: {{- toYaml .Values.redis.securityContext | nindent 8 }}
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "argo-cd.redisServiceAccountName" . }}
|
||||||
|
{{- with .Values.redis.initContainers }}
|
||||||
|
initContainers:
|
||||||
|
{{- toYaml . | nindent 6 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ template "argo-cd.redis.fullname" . }}
|
- name: {{ .Values.redis.name }}
|
||||||
|
image: {{ .Values.redis.image.repository }}:{{ .Values.redis.image.tag }}
|
||||||
|
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.redis.image.imagePullPolicy }}
|
||||||
args:
|
args:
|
||||||
- --save
|
- --save
|
||||||
- ""
|
- ""
|
||||||
- --appendonly
|
- --appendonly
|
||||||
- "no"
|
- "no"
|
||||||
{{- with .Values.redis.extraArgs }}
|
{{- with .Values.redis.extraArgs }}
|
||||||
{{- . | toYaml | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
image: {{ .Values.redis.image.repository }}:{{ .Values.redis.image.tag }}
|
{{- with .Values.redis.env }}
|
||||||
imagePullPolicy: {{ .Values.redis.image.imagePullPolicy}}
|
|
||||||
{{- if .Values.redis.containerSecurityContext }}
|
|
||||||
securityContext: {{- toYaml .Values.redis.containerSecurityContext | nindent 10 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.redis.env }}
|
|
||||||
env:
|
env:
|
||||||
{{- toYaml .Values.redis.env | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.redis.envFrom }}
|
{{- with .Values.redis.envFrom }}
|
||||||
envFrom: {{- toYaml . | nindent 8 }}
|
envFrom:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ .Values.redis.containerPort }}
|
- name: redis
|
||||||
name: redis
|
containerPort: {{ .Values.redis.containerPort }}
|
||||||
{{- if .Values.redis.volumeMounts }}
|
protocol: TCP
|
||||||
volumeMounts:
|
|
||||||
{{- toYaml .Values.redis.volumeMounts | nindent 10 }}
|
|
||||||
{{- end }}
|
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.redis.resources | nindent 10 }}
|
{{- toYaml .Values.redis.resources | nindent 10 }}
|
||||||
|
{{- with .Values.redis.containerSecurityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.redis.volumeMounts }}
|
||||||
|
volumeMounts:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
{{- if .Values.redis.metrics.enabled }}
|
{{- if .Values.redis.metrics.enabled }}
|
||||||
- name: metrics
|
- name: metrics
|
||||||
|
image: {{ .Values.redis.metrics.image.repository }}:{{ .Values.redis.metrics.image.tag }}
|
||||||
|
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.redis.metrics.image.imagePullPolicy }}
|
||||||
env:
|
env:
|
||||||
- name: REDIS_ADDR
|
- name: REDIS_ADDR
|
||||||
value: {{ printf "redis://localhost:%v" .Values.redis.containerPort }}
|
value: {{ printf "redis://localhost:%v" .Values.redis.containerPort }}
|
||||||
- name: REDIS_EXPORTER_WEB_LISTEN_ADDRESS
|
- name: REDIS_EXPORTER_WEB_LISTEN_ADDRESS
|
||||||
value: {{ printf "0.0.0.0:%v" .Values.redis.metrics.containerPort }}
|
value: {{ printf "0.0.0.0:%v" .Values.redis.metrics.containerPort }}
|
||||||
image: {{ .Values.redis.metrics.image.repository }}:{{ .Values.redis.metrics.image.tag }}
|
|
||||||
imagePullPolicy: {{ .Values.redis.metrics.image.imagePullPolicy}}
|
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ .Values.redis.metrics.containerPort }}
|
- name: metrics
|
||||||
name: metrics
|
containerPort: {{ .Values.redis.metrics.containerPort }}
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
resources: {{- toYaml .Values.redis.metrics.resources | nindent 10 }}
|
resources:
|
||||||
|
{{- toYaml .Values.redis.metrics.resources | nindent 10 }}
|
||||||
{{- with .Values.redis.containerSecurityContext }}
|
{{- with .Values.redis.containerSecurityContext }}
|
||||||
securityContext: {{- toYaml . | nindent 10 }}
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.redis.extraContainers }}
|
{{- with .Values.redis.extraContainers }}
|
||||||
{{- toYaml . | nindent 6 }}
|
{{- toYaml . | nindent 6 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.redis.nodeSelector }}
|
{{- with .Values.redis.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml .Values.redis.nodeSelector | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.redis.tolerations }}
|
{{- with .Values.redis.tolerations }}
|
||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml .Values.redis.tolerations | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.redis.affinity }}
|
{{- with .Values.redis.affinity }}
|
||||||
affinity:
|
affinity:
|
||||||
{{- toYaml .Values.redis.affinity | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.redis.topologySpreadConstraints }}
|
{{- with .Values.redis.topologySpreadConstraints }}
|
||||||
topologySpreadConstraints:
|
topologySpreadConstraints:
|
||||||
{{- range $constraint := . }}
|
{{- range $constraint := . }}
|
||||||
- {{ toYaml $constraint | nindent 8 | trim }}
|
- {{ toYaml $constraint | nindent 8 | trim }}
|
||||||
{{- if not $constraint.labelSelector }}
|
{{- if not $constraint.labelSelector }}
|
||||||
labelSelector:
|
labelSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/name: {{ include "argo-cd.name" $ }}-{{ $.Values.redis.name }}
|
app.kubernetes.io/name: {{ include "argo-cd.name" $ }}-{{ $.Values.redis.name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- with .Values.redis.priorityClassName }}
|
||||||
{{- if .Values.redis.volumes }}
|
priorityClassName: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.redis.volumes }}
|
||||||
volumes:
|
volumes:
|
||||||
{{- toYaml .Values.redis.volumes | nindent 8}}
|
{{- toYaml . | nindent 8}}
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.redis.initContainers }}
|
|
||||||
initContainers:
|
|
||||||
{{- toYaml .Values.redis.initContainers | nindent 6 }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.redis.priorityClassName }}
|
|
||||||
priorityClassName: {{ .Values.redis.priorityClassName }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue