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
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{{/*
1620Return 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{{/*
2327Return 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{{/*
You can’t perform that action at this time.
0 commit comments