summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/cassandra/templates/service.yaml
diff options
context:
space:
mode:
authorBorislav Glozman <Borislav.Glozman@amdocs.com>2019-02-27 17:29:29 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-27 17:29:29 +0000
commit6bfc50c41e338b52818323ffe9550a94d1111dea (patch)
treeb2a07a54c34d0c3fcee8dd342c12a71ebb98566b /kubernetes/common/cassandra/templates/service.yaml
parent526ca35cce4afc61ce82699091a155e55861e906 (diff)
parentf59d9258543481a594a5da26577fdd8288d56df5 (diff)
Merge "Instantiate common cassandra cluster"
Diffstat (limited to 'kubernetes/common/cassandra/templates/service.yaml')
-rw-r--r--kubernetes/common/cassandra/templates/service.yaml58
1 files changed, 19 insertions, 39 deletions
diff --git a/kubernetes/common/cassandra/templates/service.yaml b/kubernetes/common/cassandra/templates/service.yaml
index 467a6a9d44..cda519115d 100644
--- a/kubernetes/common/cassandra/templates/service.yaml
+++ b/kubernetes/common/cassandra/templates/service.yaml
@@ -22,48 +22,28 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
+ annotations:
+ service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
type: {{ .Values.service.type }}
+ publishNotReadyAddresses: true
ports:
- {{if eq .Values.service.type "NodePort" -}}
- - port: {{ .Values.service.externalPort }}
- targetPort: {{ .Values.service.internalPort }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
- name: {{ .Values.service.portName }}
- - port: {{ .Values.service.externalPort2 }}
- targetPort: {{ .Values.service.internalPort2 }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
- name: {{ .Values.service.portName }}2
- - port: {{ .Values.service.externalPort3 }}
- targetPort: {{ .Values.service.internalPort3 }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }}
- name: {{ .Values.service.portName }}3
- - port: {{ .Values.service.externalPort4 }}
- targetPort: {{ .Values.service.internalPort4 }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }}
- name: {{ .Values.service.portName }}4
- - port: {{ .Values.service.externalPort5 }}
- targetPort: {{ .Values.service.internalPort5 }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort5 }}
- name: {{ .Values.service.portName }}5
-
- {{- else -}}
- - port: {{ .Values.service.externalPort }}
- targetPort: {{ .Values.service.internalPort }}
- name: {{ .Values.service.portName }}
- - port: {{ .Values.service.externalPort2 }}
- targetPort: {{ .Values.service.internalPort2 }}
- name: {{ .Values.service.portName }}2
- - port: {{ .Values.service.externalPort3 }}
- targetPort: {{ .Values.service.internalPort3 }}
- name: {{ .Values.service.portName }}3
- - port: {{ .Values.service.externalPort4 }}
- targetPort: {{ .Values.service.internalPort4 }}
- name: {{ .Values.service.portName }}4
- - port: {{ .Values.service.externalPort5 }}
- targetPort: {{ .Values.service.internalPort5 }}
- name: {{ .Values.service.portName }}5
- {{- end}}
+ {{if eq .Values.service.type "NodePort" -}}
+ {{- $global := . }}
+ {{- range $index, $ports := .Values.service.ports }}
+ - port: {{ $ports.port }}
+ targetPort: {{ $ports.port }}
+ nodePort: {{ $global.Values.global.nodePortPrefix | default $global.Values.nodePortPrefix }}{{ $ports.nodePort }}
+ name: {{ $ports.name }}
+ {{- end }}
+{{- else -}}
+ {{- range $index, $ports := .Values.service.ports }}
+ - port: {{ $ports.port }}
+ targetPort: {{ $ports.port }}
+ name: {{ $ports.name }}
+ {{- end }}
+{{- end}}
selector:
app: {{ include "common.name" . }}
release: {{ .Release.Name }}
+ clusterIP: None