Skip to content

Commit b3ceebb

Browse files
mboutetMaxence Boutet
authored andcommitted
Update _helpers.tpl
Signed-off-by: Maxence Boutet <[email protected]>
1 parent e4059d7 commit b3ceebb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

bitnami/redis/templates/_helpers.tpl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,28 @@ SPDX-License-Identifier: APACHE-2.0
66
{{/* vim: set filetype=mustache: */}}
77

88
{{/*
9-
Return the proper Redis master fullname
9+
Return the proper Redis master fullname.
10+
11+
The 0000000000 is to take into account the 10-charaters hash that the StatefulSet
12+
appends to the name of the StatefulSet in the pod's controller-revision-hash label.
13+
A label value can only have 63 characters.
1014
*/}}
1115
{{- define "redis.master.fullname" -}}
12-
{{- printf "%s-%s" ((include "common.names.fullname" .) | trunc ((sub 63 ("-master" | len)) | int) | trimSuffix "-") "master" -}}
16+
{{- printf "%s-%s" ((include "common.names.fullname" .) | trunc ((sub 63 ("-master-0000000000" | len)) | int) | trimSuffix "-") "master" -}}
1317
{{- end -}}
1418
1519
{{/*
1620
Return the proper Redis replicas fullname
1721
*/}}
1822
{{- define "redis.replicas.fullname" -}}
19-
{{- printf "%s-%s" ((include "common.names.fullname" .) | trunc ((sub 63 ("-replicas" | len)) | int) | trimSuffix "-") "replicas" -}}
23+
{{- printf "%s-%s" ((include "common.names.fullname" .) | trunc ((sub 63 ("-replicas-0000000000" | len)) | int) | trimSuffix "-") "replicas" -}}
2024
{{- end -}}
2125
2226
{{/*
2327
Return the proper Redis sentinel fullname
2428
*/}}
2529
{{- define "redis.sentinel.fullname" -}}
26-
{{- printf "%s-%s" ((include "common.names.fullname" .) | trunc ((sub 63 ("-node" | len)) | int) | trimSuffix "-") "node" -}}
30+
{{- printf "%s-%s" ((include "common.names.fullname" .) | trunc ((sub 63 ("-node-0000000000" | len)) | int) | trimSuffix "-") "node" -}}
2731
{{- end -}}
2832
2933
{{/*

0 commit comments

Comments
 (0)