diff --git a/deploy/helm/kubernetes/manifests/coredns.yaml b/deploy/helm/kubernetes/manifests/coredns.yaml index 5c45bbb..983977a 100644 --- a/deploy/helm/kubernetes/manifests/coredns.yaml +++ b/deploy/helm/kubernetes/manifests/coredns.yaml @@ -206,7 +206,7 @@ metadata: spec: selector: k8s-app: kube-dns - clusterIP: {{ template "getCoreDNS" . }} + clusterIP: {{ template "kubernetes.getCoreDNS" . }} ports: - name: dns port: 53 diff --git a/deploy/helm/kubernetes/templates/_helpers.tpl b/deploy/helm/kubernetes/templates/_helpers.tpl index 7086c06..0f2bdc1 100644 --- a/deploy/helm/kubernetes/templates/_helpers.tpl +++ b/deploy/helm/kubernetes/templates/_helpers.tpl @@ -65,12 +65,12 @@ Generate etcd servers list. {{/* Take the first IP address from the serviceClusterIPRange for the kube-dns service. */}} -{{- define "getCoreDNS" -}} +{{- define "kubernetes.getCoreDNS" -}} {{- $octetsList := splitList "." .Values.apiServer.serviceClusterIPRange -}} {{- printf "%d.%d.%d.%d" (index $octetsList 0 | int) (index $octetsList 1 | int) (index $octetsList 2 | int) 10 -}} {{- end -}} -{{- define "getAPIAddress" -}} +{{- define "kubernetes.getAPIAddress" -}} {{- $octetsList := splitList "." .Values.apiServer.serviceClusterIPRange -}} {{- printf "%d.%d.%d.%d" (index $octetsList 0 | int) (index $octetsList 1 | int) (index $octetsList 2 | int) 1 -}} {{- end -}} diff --git a/deploy/helm/kubernetes/templates/kubernetes-certs.yaml b/deploy/helm/kubernetes/templates/kubernetes-certs.yaml index 8f25f15..6438b63 100644 --- a/deploy/helm/kubernetes/templates/kubernetes-certs.yaml +++ b/deploy/helm/kubernetes/templates/kubernetes-certs.yaml @@ -80,7 +80,7 @@ spec: {{- end }} ipAddresses: - "127.0.0.1" - - "{{- template "getAPIAddress" . }}" + - "{{- template "kubernetes.getAPIAddress" . }}" {{- with .Values.apiServer.service.loadBalancerIP }} {{- if not (has . $.Values.apiServer.certSANs.ipAddresses) }} - {{ . | quote }} @@ -122,7 +122,7 @@ spec: {{- end }} ipAddresses: - "127.0.0.1" - - "{{- template "getAPIAddress" . }}" + - "{{- template "kubernetes.getAPIAddress" . }}" {{- with .Values.apiServer.service.loadBalancerIP }} {{- if not (has . $.Values.apiServer.certSANs.ipAddresses) }} - {{ . | quote }} @@ -164,7 +164,7 @@ spec: {{- end }} ipAddresses: - "127.0.0.1" - - "{{- template "getAPIAddress" . }}" + - "{{- template "kubernetes.getAPIAddress" . }}" {{- with .Values.apiServer.service.loadBalancerIP }} {{- if not (has . $.Values.apiServer.certSANs.ipAddresses) }} - {{ . | quote }}