File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -6,24 +6,28 @@ SPDX-License-Identifier: APACHE-2.0
6
6
{ {/* vim: set filetype= mustache: */} }
7
7
8
8
{ {/*
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.
10
14
*/}}
11
15
{{- 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" -}}
13
17
{{- end -}}
14
18
15
19
{{/*
16
20
Return the proper Redis replicas fullname
17
21
*/}}
18
22
{{- 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" -}}
20
24
{{- end -}}
21
25
22
26
{{/*
23
27
Return the proper Redis sentinel fullname
24
28
*/}}
25
29
{{- 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" -}}
27
31
{{- end -}}
28
32
29
33
{{/*
You can’t perform that action at this time.
0 commit comments