fix: Helm bug with subcharts and alias
This commit is contained in:
parent
13a6e76068
commit
90c2eeb76a
10 changed files with 44 additions and 38 deletions
|
@ -263,8 +263,8 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i
|
||||||
|
|
||||||
When Redis is completely disabled from the chart (`redis.enabled=false`) and
|
When Redis is completely disabled from the chart (`redis.enabled=false`) and
|
||||||
an external Redis instance wants to be used or
|
an external Redis instance wants to be used or
|
||||||
when Redis HA subcart is enabled (`redis.enabled=true and redis.ha.enabled=true`)
|
when Redis HA subcart is enabled (`redis.enabled=true and redis-ha.enabled=true`)
|
||||||
but HA proxy is disabled `redis.ha.haproxy.enabled=false` Redis flags need to be specified
|
but HA proxy is disabled `redis-ha.haproxy.enabled=false` Redis flags need to be specified
|
||||||
through `xxx.extraArgs`
|
through `xxx.extraArgs`
|
||||||
|
|
||||||
| Key | Default | Description |
|
| Key | Default | Description |
|
||||||
|
@ -284,12 +284,12 @@ through `xxx.extraArgs`
|
||||||
| 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 | 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` |
|
| redis-ha.enabled | Enables the Redis HA subchart and disables the custom Redis single node deployment| `false` |
|
||||||
| redis.ha.exporter.enabled | If `true`, the prometheus exporter sidecar is enabled | `true` |
|
| redis-ha.exporter.enabled | If `true`, the prometheus exporter sidecar is enabled | `true` |
|
||||||
| redis.ha.persistentVolume.enabled | Configures persistency on Redis nodes | `false`
|
| redis-ha.persistentVolume.enabled | Configures persistency on Redis nodes | `false`
|
||||||
| redis.ha.redis.masterGroupName | Redis convention for naming the cluster group: must match `^[\\w-\\.]+$` and can be templated | `argocd`
|
| redis-ha.redis.masterGroupName | Redis convention for naming the cluster group: must match `^[\\w-\\.]+$` and can be templated | `argocd`
|
||||||
| redis.ha.redis.config | Any valid redis config options in this section will be applied to each server (see `redis-ha` chart) | `` |
|
| redis-ha.redis.config | Any valid redis config options in this section will be applied to each server (see `redis-ha` chart) | `` |
|
||||||
| redis.ha.redis.config.save | Will save the DB if both the given number of seconds and the given number of write operations against the DB occurred. `""` is disabled | `""` |
|
| redis-ha.redis.config.save | Will save the DB if both the given number of seconds and the given number of write operations against the DB occurred. `""` is disabled | `""` |
|
||||||
| redis.ha.haproxy.enabled | Enabled HAProxy LoadBalancing/Proxy | `true` |
|
| redis-ha.haproxy.enabled | Enabled HAProxy LoadBalancing/Proxy | `true` |
|
||||||
| redis.ha.haproxy.metrics.enabled | HAProxy enable prometheus metric scraping | `true` |
|
| redis-ha.haproxy.metrics.enabled | HAProxy enable prometheus metric scraping | `true` |
|
||||||
|
|
|
@ -2,5 +2,5 @@ dependencies:
|
||||||
- name: redis-ha
|
- name: redis-ha
|
||||||
repository: https://kubernetes-charts.storage.googleapis.com
|
repository: https://kubernetes-charts.storage.googleapis.com
|
||||||
version: 4.4.2
|
version: 4.4.2
|
||||||
digest: sha256:d3b7b8ec4c09eeeae44a64352f983cd1619cf98d80d0e49780a016aedb477a6c
|
digest: sha256:70fdd035c3aa3b7185882f12a73143c58ab32f04262dda2cf34a2b1a52116d96
|
||||||
generated: "2020-03-18T22:24:39.082009894Z"
|
generated: "2020-03-29T14:37:59.349371452+01:00"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: redis-ha
|
- name: redis-ha
|
||||||
alias: redis.ha
|
|
||||||
version: 4.4.2
|
version: 4.4.2
|
||||||
repository: https://kubernetes-charts.storage.googleapis.com
|
repository: https://kubernetes-charts.storage.googleapis.com
|
||||||
condition: redis.ha.enabled
|
condition: redis-ha.enabled
|
|
@ -42,8 +42,11 @@ 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 and .Values.redis.ha.enabled .Values.redis.ha.haproxy.enabled -}}
|
{{ $redisHa := (index .Values "redis-ha") }}
|
||||||
{{- printf "%s-redis-ha-haproxy" .Release.Name | trunc 63 | trimSuffix "-" -}}
|
{{- if and $redisHa.enabled -}}
|
||||||
|
{{- if $redisHa.haproxy.enabled -}}
|
||||||
|
{{- printf "%s-redis-ha-haproxy" .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
{{- else -}}
|
{{- 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 -}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
{{- $redisHa := (index .Values "redis-ha") -}}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -56,7 +56,7 @@ spec:
|
||||||
- {{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
|
- {{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
|
||||||
- --loglevel
|
- --loglevel
|
||||||
- {{ .Values.controller.logLevel }}
|
- {{ .Values.controller.logLevel }}
|
||||||
{{- if and .Values.redis.enabled .Values.redis.ha.enabled .Values.redis.ha.haproxy.enabled }}
|
{{- if or (and .Values.redis.enabled (not $redisHa.enabled)) (and $redisHa.enabled $redisHa.haproxy.enabled) }}
|
||||||
- --redis
|
- --redis
|
||||||
- {{ template "argo-cd.redis.fullname" . }}:{{ .Values.redis.servicePort }}
|
- {{ template "argo-cd.redis.fullname" . }}:{{ .Values.redis.servicePort }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{- $redisHa := (index .Values "redis-ha") -}}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -52,7 +53,7 @@ spec:
|
||||||
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.repoServer.image.imagePullPolicy }}
|
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.repoServer.image.imagePullPolicy }}
|
||||||
command:
|
command:
|
||||||
- argocd-repo-server
|
- argocd-repo-server
|
||||||
{{- if and .Values.redis.enabled .Values.redis.ha.enabled .Values.redis.ha.haproxy.enabled }}
|
{{- if or (and .Values.redis.enabled (not $redisHa.enabled)) (and $redisHa.enabled $redisHa.haproxy.enabled) }}
|
||||||
- --redis
|
- --redis
|
||||||
- {{ template "argo-cd.redis.fullname" . }}:{{ .Values.redis.servicePort }}
|
- {{ template "argo-cd.redis.fullname" . }}:{{ .Values.redis.servicePort }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{{- $redisHa := (index .Values "redis-ha") -}}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -62,7 +63,7 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- --loglevel
|
- --loglevel
|
||||||
- {{ .Values.server.logLevel }}
|
- {{ .Values.server.logLevel }}
|
||||||
{{- if and .Values.redis.enabled .Values.redis.ha.enabled .Values.redis.ha.haproxy.enabled }}
|
{{- if or (and .Values.redis.enabled (not $redisHa.enabled)) (and $redisHa.enabled $redisHa.haproxy.enabled) }}
|
||||||
- --redis
|
- --redis
|
||||||
- {{ template "argo-cd.redis.fullname" . }}:{{ .Values.redis.servicePort }}
|
- {{ template "argo-cd.redis.fullname" . }}:{{ .Values.redis.servicePort }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{{- if and .Values.redis.enabled (not .Values.redis.ha.enabled) }}
|
{{- $redisHa := (index .Values "redis-ha") -}}
|
||||||
|
{{- if and .Values.redis.enabled (not $redisHa.enabled) -}}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{{- if and .Values.redis.enabled (not .Values.redis.ha.enabled) }}
|
{{- $redisHa := (index .Values "redis-ha") -}}
|
||||||
|
{{- if and .Values.redis.enabled (not $redisHa.enabled) -}}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -282,23 +282,23 @@ redis:
|
||||||
volumeMounts: []
|
volumeMounts: []
|
||||||
volumes: []
|
volumes: []
|
||||||
|
|
||||||
# This key configures Redis-HA subchart and when enabled (redis.ha.enabled=true)
|
# This key configures Redis-HA subchart and when enabled (redis-ha.enabled=true)
|
||||||
# the custom redis deployment is omitted
|
# the custom redis deployment is omitted
|
||||||
ha:
|
redis-ha:
|
||||||
|
enabled: false
|
||||||
|
# Check the redis-ha chart for more properties
|
||||||
|
exporter:
|
||||||
|
enabled: true
|
||||||
|
persistentVolume:
|
||||||
enabled: false
|
enabled: false
|
||||||
# Check the redis-ha chart for more properties
|
redis:
|
||||||
exporter:
|
masterGroupName: argocd
|
||||||
|
config:
|
||||||
|
save: "\"\""
|
||||||
|
haproxy:
|
||||||
|
enabled: true
|
||||||
|
metrics:
|
||||||
enabled: true
|
enabled: true
|
||||||
persistentVolume:
|
|
||||||
enabled: false
|
|
||||||
redis:
|
|
||||||
masterGroupName: argocd
|
|
||||||
config:
|
|
||||||
save: "\"\""
|
|
||||||
haproxy:
|
|
||||||
enabled: true
|
|
||||||
metrics:
|
|
||||||
enabled: true
|
|
||||||
|
|
||||||
## Server
|
## Server
|
||||||
server:
|
server:
|
||||||
|
|
Loading…
Reference in a new issue