feat: argo-cd can deploy Redis HA

Signed-off-by: Carlos Juan Gómez Peñalver <carlosjuangp@gmail.com>
This commit is contained in:
Carlos Juan Gómez Peñalver 2020-03-18 20:16:10 +00:00
parent 219778eb9d
commit d2a14f1e58
9 changed files with 39 additions and 3 deletions

View file

@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.4.2" appVersion: "1.4.2"
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd name: argo-cd
version: 1.8.7 version: 1.8.8
home: https://github.com/argoproj/argo-helm home: https://github.com/argoproj/argo-helm
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
keywords: keywords:

View file

@ -257,3 +257,5 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i
| redis.resources | Resource limits and requests for redis | `{}` | | redis.resources | Resource limits and requests for redis | `{}` |
| redis.servicePort | Redis service port | `6379` | | redis.servicePort | Redis service port | `6379` |
| redis.tolerations | Tolerations for use with node taints https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ | `[]` | | redis.tolerations | Tolerations for use with node taints https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ | `[]` |
| redis.ha | Configures Redis HA subchart https://github.com/helm/charts/tree/master/stable/redis-ha | | |
| redis.ha.enabled | Enables the Redis HA subchart and disabled the custom Redis single node deployment| `false` |

Binary file not shown.

View file

@ -0,0 +1,6 @@
dependencies:
- name: redis-ha
repository: https://kubernetes-charts.storage.googleapis.com
version: 4.3.4
digest: sha256:281b2ee97e4ae47d8248912db4207bbb19f098de8de037452f7b50ebcc2819d4
generated: "2020-03-18T20:14:33.015349017Z"

View file

@ -0,0 +1,6 @@
dependencies:
- name: redis-ha
alias: redis.ha
version: 4.3.4
repository: https://kubernetes-charts.storage.googleapis.com
condition: redis.ha.enabled

View file

@ -42,8 +42,12 @@ Create dex name and version as used by the chart label.
Create redis name and version as used by the chart label. Create redis name and version as used by the chart label.
*/}} */}}
{{- define "argo-cd.redis.fullname" -}} {{- define "argo-cd.redis.fullname" -}}
{{- if .Values.redis.ha.enabled -}}
{{- printf "%s-redis-ha-haproxy" .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.redis.name | trunc 63 | trimSuffix "-" -}} {{- printf "%s-%s" (include "argo-cd.fullname" .) .Values.redis.name | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}
{{- end -}}
{{/* {{/*
Create argocd server name and version as used by the chart label. Create argocd server name and version as used by the chart label.

View file

@ -1,4 +1,4 @@
{{- if .Values.redis.enabled }} {{- if and .Values.redis.enabled (not .Values.redis.ha.enabled) }}
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:

View file

@ -1,4 +1,4 @@
{{- if .Values.redis.enabled }} {{- if and .Values.redis.enabled (not .Values.redis.ha.enabled) }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:

View file

@ -282,6 +282,24 @@ redis:
volumeMounts: [] volumeMounts: []
volumes: [] volumes: []
# This key configures Redis-HA subchart and when enabled (redis.ha.enabled=true)
# the custom redis deployment is omitted
ha:
enabled: false
# Check the redis-ha chart for more properties
exporter:
enabled: true
persistentVolume:
enabled: false
redis:
masterGroupName: argocd
config:
save: "\"\""
haproxy:
enabled: true
metrics:
enabled: true
## Server ## Server
server: server:
name: server name: server