Skip to content

Commit df15944

Browse files
guzzijonesajjonen
authored andcommitted
clusterDomain values entry
1 parent 5791b33 commit df15944

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templates/_helpers.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Generate comma-separated list of nodes for MongoDB-HA connection string, based o
103103
{{- range $index0 := until $replicas -}}
104104
{{- $index1 := $index0 | add1 -}}
105105
{{- if eq $architecture "replicaset" }}
106-
{{- $mongo_fullname }}-{{ $index0 }}.{{ $mongo_fullname }}-headless.{{ $.Release.Namespace }}.svc.cluster.local{{ if ne $index1 $replicas }},{{ end }}
106+
{{- $mongo_fullname }}-{{ $index0 }}.{{ $mongo_fullname }}-headless.{{ $.Release.Namespace }}.svc.{{ $.Values.clusterDomain }}{{ if ne $index1 $replicas }},{{ end }}
107107
{{- else }}
108108
{{- $mongo_fullname }}-{{ $index0 }}.{{ $mongo_fullname }}{{ if ne $index1 $replicas }},{{ end }}
109109
{{- end -}}
@@ -122,9 +122,9 @@ Generate list of nodes for Redis with Sentinel connection string, based on numbe
122122
{{- $sentinel_port := (index .Values "redis" "sentinel" "port") }}
123123
{{- range $index0 := until $replicas -}}
124124
{{- if eq $index0 0 -}}
125-
{{ $.Release.Name }}-redis-node-{{ $index0 }}.{{ $.Release.Name }}-redis-headless.{{ $.Release.Namespace }}.svc.cluster.local:{{ $sentinel_port }}?sentinel={{ $master_name }}
125+
{{ $.Release.Name }}-redis-node-{{ $index0 }}.{{ $.Release.Name }}-redis-headless.{{ $.Release.Namespace }}.svc.{{ $.Values.clusterDomain }}:{{ $sentinel_port }}?sentinel={{ $master_name }}
126126
{{- else -}}
127-
&sentinel_fallback={{ $.Release.Name }}-redis-node-{{ $index0 }}.{{ $.Release.Name }}-redis-headless.{{ $.Release.Namespace }}.svc.cluster.local:{{ $sentinel_port }}
127+
&sentinel_fallback={{ $.Release.Name }}-redis-node-{{ $index0 }}.{{ $.Release.Name }}-redis-headless.{{ $.Release.Namespace }}.svc.{{ $.Values.clusterDomain }}:{{ $sentinel_port }}
128128
{{- end -}}
129129
{{- end -}}
130130
{{- end -}}

values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ image:
2222
# See: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
2323
#pullSecret: "your-pull-secret"
2424

25-
25+
clusterDomain: cluster.local
2626

2727
##
2828
## Service Account

0 commit comments

Comments
 (0)