mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/redis] Refactor StorageClass template to support old Helm versions (#16480)
* Refactor StorageClass template to support old Helm versions Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com> * [stable/redis] Update components versions Signed-off-by: Bitnami Containers <containers@bitnami.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
149fd16232
commit
5ef4e566b0
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: redis
|
||||
version: 9.1.0
|
||||
version: 9.1.1
|
||||
appVersion: 5.0.5
|
||||
description: Open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
|
||||
keywords:
|
||||
|
||||
@@ -239,41 +239,71 @@ WARNING: Rolling tag detected ({{ .Values.sentinel.image.repository }}:{{ .Value
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Storage Class
|
||||
Return the proper Storage Class for master
|
||||
*/}}
|
||||
{{- define "redis.master.storageClass" -}}
|
||||
{{- $storageClass := "" }}
|
||||
{{- if .Values.master.persistence.storageClass -}}
|
||||
{{- $storageClass = .Values.master.persistence.storageClass -}}
|
||||
{{- end -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
*/}}
|
||||
{{- if .Values.global -}}
|
||||
{{- if .Values.global.storageClass -}}
|
||||
{{- $storageClass = .Values.global.storageClass -}}
|
||||
{{- if (eq "-" .Values.global.storageClass) -}}
|
||||
{{- printf "\"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "%s" .Values.global.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .Values.master.persistence.storageClass -}}
|
||||
{{- if (eq "-" .Values.master.persistence.storageClass) -}}
|
||||
{{- printf "\"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "%s" .Values.master.persistence.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .Values.master.persistence.storageClass -}}
|
||||
{{- if (eq "-" .Values.master.persistence.storageClass) -}}
|
||||
{{- printf "\"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "%s" .Values.master.persistence.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if (eq "-" $storageClass) -}}
|
||||
{{- printf "\"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "%s" $storageClass -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Storage Class
|
||||
Return the proper Storage Class for slave
|
||||
*/}}
|
||||
{{- define "redis.slave.storageClass" -}}
|
||||
{{- $storageClass := "" }}
|
||||
{{- if .Values.slave.persistence.storageClass -}}
|
||||
{{- $storageClass = .Values.slave.persistence.storageClass -}}
|
||||
{{- end -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
*/}}
|
||||
{{- if .Values.global -}}
|
||||
{{- if .Values.global.storageClass -}}
|
||||
{{- $storageClass = .Values.global.storageClass -}}
|
||||
{{- if (eq "-" .Values.global.storageClass) -}}
|
||||
{{- printf "\"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "%s" .Values.global.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .Values.slave.persistence.storageClass -}}
|
||||
{{- if (eq "-" .Values.slave.persistence.storageClass) -}}
|
||||
{{- printf "\"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "%s" .Values.slave.persistence.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if .Values.slave.persistence.storageClass -}}
|
||||
{{- if (eq "-" .Values.slave.persistence.storageClass) -}}
|
||||
{{- printf "\"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "%s" .Values.slave.persistence.storageClass -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if (eq "-" $storageClass) -}}
|
||||
{{- printf "\"\"" -}}
|
||||
{{- else }}
|
||||
{{- printf "%s" $storageClass -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -17,7 +17,7 @@ image:
|
||||
## Bitnami Redis image tag
|
||||
## ref: https://github.com/bitnami/bitnami-docker-redis#supported-tags-and-respective-dockerfile-links
|
||||
##
|
||||
tag: 5.0.5-debian-9-r95
|
||||
tag: 5.0.5-debian-9-r104
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -443,7 +443,7 @@ metrics:
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/redis-exporter
|
||||
tag: 1.0.4-debian-9-r4
|
||||
tag: 1.1.0-debian-9-r1
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
|
||||
@@ -17,7 +17,7 @@ image:
|
||||
## Bitnami Redis image tag
|
||||
## ref: https://github.com/bitnami/bitnami-docker-redis#supported-tags-and-respective-dockerfile-links
|
||||
##
|
||||
tag: 5.0.5-debian-9-r95
|
||||
tag: 5.0.5-debian-9-r104
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -443,7 +443,7 @@ metrics:
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/redis-exporter
|
||||
tag: 1.0.4-debian-9-r4
|
||||
tag: 1.1.0-debian-9-r1
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
|
||||
Reference in New Issue
Block a user