Skip to content

Commit 6d20005

Browse files
committed
add local redis helm chart dependency
1 parent e80a652 commit 6d20005

45 files changed

Lines changed: 14677 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

charts/redis/.helmignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
22+
# img folder
23+
img/
24+
# Changelog
25+
CHANGELOG.md

charts/redis/CHANGELOG.md

Lines changed: 2260 additions & 0 deletions
Large diffs are not rendered by default.

charts/redis/Chart.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: common
3+
repository: oci://registry-1.docker.io/bitnamicharts
4+
version: 2.31.4
5+
digest: sha256:fc442e77200e1914dd46fe26490dcf62f44caa51db673c2f8e67d5319cd4c163
6+
generated: "2025-08-13T18:17:23.415861424Z"

charts/redis/Chart.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright Broadcom, Inc. All Rights Reserved.
2+
# SPDX-License-Identifier: APACHE-2.0
3+
4+
annotations:
5+
images: |
6+
- name: kubectl
7+
image: docker.io/bitnami/kubectl:1.33.4-debian-12-r0
8+
- name: os-shell
9+
image: docker.io/bitnami/os-shell:12-debian-12-r51
10+
- name: redis
11+
image: docker.io/bitnami/redis:8.2.1-debian-12-r0
12+
- name: redis-exporter
13+
image: docker.io/bitnami/redis-exporter:1.76.0-debian-12-r0
14+
- name: redis-sentinel
15+
image: docker.io/bitnami/redis-sentinel:8.2.1-debian-12-r0
16+
licenses: Apache-2.0
17+
tanzuCategory: service
18+
apiVersion: v2
19+
appVersion: 8.2.1
20+
dependencies:
21+
- name: common
22+
repository: oci://registry-1.docker.io/bitnamicharts
23+
tags:
24+
- bitnami-common
25+
version: 2.x.x
26+
description: Redis(R) is an open source, advanced key-value store. It is often referred
27+
to as a data structure server since keys can contain strings, hashes, lists, sets
28+
and sorted sets.
29+
home: https://bitnami.com
30+
icon: https://dyltqmyl993wv.cloudfront.net/assets/stacks/redis/img/redis-stack-220x234.png
31+
keywords:
32+
- redis
33+
- keyvalue
34+
- database
35+
maintainers:
36+
- name: Broadcom, Inc. All Rights Reserved.
37+
url: https://github.com/bitnami/charts
38+
name: redis
39+
sources:
40+
- https://github.com/bitnami/charts/tree/main/bitnami/redis
41+
version: 23.0.5

charts/redis/README.md

Lines changed: 1365 additions & 0 deletions
Large diffs are not rendered by default.
11.2 KB
Loading
9.48 KB
Loading

charts/redis/templates/NOTES.txt

Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
CHART NAME: {{ .Chart.Name }}
2+
CHART VERSION: {{ .Chart.Version }}
3+
APP VERSION: {{ .Chart.AppVersion }}
4+
5+
⚠ WARNING: Since August 28th, 2025, only a limited subset of images/charts are available for free.
6+
Subscribe to Bitnami Secure Images to receive continued support and security updates.
7+
More info at https://bitnami.com and https://github.com/bitnami/containers/issues/83267
8+
9+
** Please be patient while the chart is being deployed **
10+
11+
{{- if .Values.diagnosticMode.enabled }}
12+
The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
13+
14+
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
15+
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
16+
17+
Get the list of pods by executing:
18+
19+
kubectl get pods --namespace {{ include "common.names.namespace" . }} -l app.kubernetes.io/instance={{ .Release.Name }}
20+
21+
Access the pod you want to debug by executing
22+
23+
kubectl exec --namespace {{ include "common.names.namespace" . }} -ti <NAME OF THE POD> -- bash
24+
25+
In order to replicate the container startup scripts execute this command:
26+
27+
For Redis:
28+
29+
/opt/bitnami/scripts/redis/entrypoint.sh /opt/bitnami/scripts/redis/run.sh
30+
31+
{{- if .Values.sentinel.enabled }}
32+
33+
For Redis Sentinel:
34+
35+
/opt/bitnami/scripts/redis-sentinel/entrypoint.sh /opt/bitnami/scripts/redis-sentinel/run.sh
36+
37+
{{- end }}
38+
{{- else }}
39+
40+
{{- if contains .Values.master.service.type "LoadBalancer" }}
41+
{{- if not .Values.auth.enabled }}
42+
{{ if and (not .Values.networkPolicy.enabled) (.Values.networkPolicy.allowExternal) }}
43+
44+
-------------------------------------------------------------------------------
45+
WARNING
46+
47+
By specifying "master.service.type=LoadBalancer" and "auth.enabled=false" you have
48+
most likely exposed the Redis&reg; service externally without any authentication
49+
mechanism.
50+
51+
For security reasons, we strongly suggest that you switch to "ClusterIP" or
52+
"NodePort". As alternative, you can also switch to "auth.enabled=true"
53+
providing a valid password on "password" parameter.
54+
55+
-------------------------------------------------------------------------------
56+
{{- end }}
57+
{{- end }}
58+
{{- end }}
59+
60+
{{- if and .Values.auth.enabled .Values.auth.usePasswordFiles (not .Values.auth.usePasswordFileFromSecret) (or (empty .Values.master.initContainers) (empty .Values.replica.initContainers)) }}
61+
62+
-------------------------------------------------------------------------------
63+
WARNING
64+
65+
By specifying ".Values.auth.usePasswordFiles=true" and ".Values.auth.usePasswordFileFromSecret=false"
66+
Redis is expecting that the password is mounted as a file in each pod
67+
(by default in /opt/bitnami/redis/secrets/redis-password)
68+
69+
Ensure that you specify the respective initContainers in
70+
both .Values.master.initContainers and .Values.replica.initContainers
71+
in order to populate the contents of this file.
72+
73+
-------------------------------------------------------------------------------
74+
{{- end }}
75+
76+
{{- if eq .Values.architecture "replication" }}
77+
{{- if .Values.sentinel.enabled }}
78+
79+
Redis&reg; can be accessed via port {{ .Values.sentinel.service.ports.redis }} on the following DNS name from within your cluster:
80+
81+
{{ template "common.names.fullname" . }}.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }} for read only operations
82+
83+
For read/write operations, first access the Redis&reg; Sentinel cluster, which is available in port {{ .Values.sentinel.service.ports.sentinel }} using the same domain name above.
84+
85+
{{- else }}
86+
87+
Redis&reg; can be accessed on the following DNS names from within your cluster:
88+
89+
{{ printf "%s-master.%s.svc.%s" (include "common.names.fullname" .) (include "common.names.namespace" . ) .Values.clusterDomain }} for read/write operations (port {{ .Values.master.service.ports.redis }})
90+
{{ printf "%s-replicas.%s.svc.%s" (include "common.names.fullname" .) (include "common.names.namespace" . ) .Values.clusterDomain }} for read-only operations (port {{ .Values.replica.service.ports.redis }})
91+
92+
{{- end }}
93+
{{- else }}
94+
95+
Redis&reg; can be accessed via port {{ .Values.master.service.ports.redis }} on the following DNS name from within your cluster:
96+
97+
{{ template "common.names.fullname" . }}-master.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }}
98+
99+
{{- end }}
100+
101+
{{ if .Values.auth.enabled }}
102+
103+
To get your password run:
104+
105+
export REDIS_PASSWORD=$(kubectl get secret --namespace {{ include "common.names.namespace" . }} {{ template "redis.secretName" . }} -o jsonpath="{.data.redis-password}" | base64 -d)
106+
107+
{{- end }}
108+
109+
To connect to your Redis&reg; server:
110+
111+
1. Run a Redis&reg; pod that you can use as a client:
112+
113+
kubectl run --namespace {{ include "common.names.namespace" . }} redis-client --restart='Never' {{ if .Values.auth.enabled }} --env REDIS_PASSWORD=$REDIS_PASSWORD {{ end }} --image {{ template "redis.image" . }} --command -- sleep infinity
114+
115+
{{- if .Values.tls.enabled }}
116+
117+
Copy your TLS certificates to the pod:
118+
119+
kubectl cp --namespace {{ include "common.names.namespace" . }} /path/to/client.cert redis-client:/tmp/client.cert
120+
kubectl cp --namespace {{ include "common.names.namespace" . }} /path/to/client.key redis-client:/tmp/client.key
121+
kubectl cp --namespace {{ include "common.names.namespace" . }} /path/to/CA.cert redis-client:/tmp/CA.cert
122+
123+
{{- end }}
124+
125+
Use the following command to attach to the pod:
126+
127+
kubectl exec --tty -i redis-client \
128+
{{- if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}--labels="{{ template "common.names.fullname" . }}-client=true" \{{- end }}
129+
--namespace {{ include "common.names.namespace" . }} -- bash
130+
131+
2. Connect using the Redis&reg; CLI:
132+
133+
{{- if eq .Values.architecture "replication" }}
134+
{{- if .Values.sentinel.enabled }}
135+
{{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ template "common.names.fullname" . }} -p {{ .Values.sentinel.service.ports.redis }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} # Read only operations
136+
{{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ template "common.names.fullname" . }} -p {{ .Values.sentinel.service.ports.sentinel }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }} # Sentinel access
137+
{{- else }}
138+
{{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ printf "%s-master" (include "common.names.fullname" .) }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
139+
{{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ printf "%s-replicas" (include "common.names.fullname" .) }}{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
140+
{{- end }}
141+
{{- else }}
142+
{{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h {{ template "common.names.fullname" . }}-master{{ if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
143+
{{- end }}
144+
145+
{{- if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}
146+
147+
Note: Since NetworkPolicy is enabled, only pods with label {{ template "common.names.fullname" . }}-client=true" will be able to connect to redis.
148+
149+
{{- else }}
150+
151+
To connect to your database from outside the cluster execute the following commands:
152+
153+
{{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled }}
154+
{{- if contains "NodePort" .Values.sentinel.service.type }}
155+
156+
export NODE_IP=$(kubectl get nodes --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
157+
export NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "common.names.fullname" . }})
158+
{{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $NODE_IP -p $NODE_PORT {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
159+
160+
{{- else if contains "LoadBalancer" .Values.sentinel.service.type }}
161+
162+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
163+
Watch the status with: 'kubectl get svc --namespace {{ include "common.names.namespace" . }} -w {{ template "common.names.fullname" . }}'
164+
165+
export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.names.namespace" . }} {{ template "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
166+
{{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $SERVICE_IP -p {{ .Values.sentinel.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
167+
168+
{{- else if contains "ClusterIP" .Values.sentinel.service.type }}
169+
170+
kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ template "common.names.fullname" . }} {{ .Values.sentinel.service.ports.redis }}:{{ .Values.sentinel.service.ports.redis }} &
171+
{{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h 127.0.0.1 -p {{ .Values.sentinel.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
172+
173+
{{- end }}
174+
{{- else }}
175+
{{- if contains "NodePort" .Values.master.service.type }}
176+
177+
export NODE_IP=$(kubectl get nodes --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
178+
export NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ printf "%s-master" (include "common.names.fullname" .) }})
179+
{{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $NODE_IP -p $NODE_PORT {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
180+
181+
{{- else if contains "LoadBalancer" .Values.master.service.type }}
182+
183+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
184+
Watch the status with: 'kubectl get svc --namespace {{ include "common.names.namespace" . }} -w {{ template "common.names.fullname" . }}'
185+
186+
export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.names.namespace" . }} {{ printf "%s-master" (include "common.names.fullname" .) }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
187+
{{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h $SERVICE_IP -p {{ .Values.master.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
188+
189+
{{- else if contains "ClusterIP" .Values.master.service.type }}
190+
191+
kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ printf "%s-master" (include "common.names.fullname" .) }} {{ .Values.master.service.ports.redis }}:{{ .Values.master.service.ports.redis }} &
192+
{{ if .Values.auth.enabled }}REDISCLI_AUTH="$REDIS_PASSWORD" {{ end }}redis-cli -h 127.0.0.1 -p {{ .Values.master.service.ports.redis }} {{- if .Values.tls.enabled }} --tls --cert /tmp/client.cert --key /tmp/client.key --cacert /tmp/CA.cert{{ end }}
193+
194+
{{- end }}
195+
{{- end }}
196+
197+
{{- end }}
198+
{{- end }}
199+
{{- include "redis.checkRollingTags" . }}
200+
{{- include "common.warnings.rollingTag" .Values.volumePermissions.image }}
201+
{{- include "common.warnings.rollingTag" .Values.sysctl.image }}
202+
{{- include "redis.validateValues" . }}
203+
204+
{{- if and (eq .Values.architecture "replication") .Values.sentinel.enabled (eq .Values.sentinel.service.type "NodePort") (not .Release.IsUpgrade ) }}
205+
{{- if $.Values.sentinel.service.nodePorts.sentinel }}
206+
No need to upgrade, ports and nodeports have been set from values
207+
{{- else }}
208+
#!#!#!#!#!#!#!# IMPORTANT #!#!#!#!#!#!#!#
209+
YOU NEED TO PERFORM AN UPGRADE FOR THE SERVICES AND WORKLOAD TO BE CREATED
210+
{{- end }}
211+
{{- end }}
212+
{{- $resourceSections := list "metrics" "replica" "sentinel" "sysctl" "volumePermissions" }}
213+
{{- if not (and (eq .Values.architecture "replication") .Values.sentinel.enabled) }}
214+
{{- $resourceSections = append $resourceSections "master" -}}
215+
{{- end }}
216+
{{- include "common.warnings.resources" (dict "sections" $resourceSections "context" $) }}
217+
{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.image .Values.sentinel.image .Values.metrics.image .Values.volumePermissions.image .Values.kubectl.image .Values.sysctl.image) "context" $) }}
218+
{{- include "common.errors.insecureImages" (dict "images" (list .Values.image .Values.sentinel.image .Values.metrics.image .Values.volumePermissions.image .Values.kubectl.image .Values.sysctl.image) "context" $) }}

0 commit comments

Comments
 (0)