aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/consul/charts/consul-server/templates/service.yaml
diff options
context:
space:
mode:
authorPriyanka Jain <Priyanka.Jain3@amdocs.com>2018-05-09 08:42:50 +0000
committerBorislavG <Borislav.Glozman@amdocs.com>2018-05-15 12:07:43 +0300
commit1fda96895b4e2d6debbcf6fe34a638d537e0a592 (patch)
treea131c2031d0f3de53d2dbe059eca2cdd7737d994 /kubernetes/consul/charts/consul-server/templates/service.yaml
parentd31e2a0a1032acd12cce02a3767988027cd6a5c6 (diff)
Consul Stateful Set
Issue-ID: OOM-1032 Change-Id: I911085dffc35067d844b5dcb286581fa0897a27a Signed-off-by: Priyanka Jain <Priyanka.Jain3@amdocs.com>
Diffstat (limited to 'kubernetes/consul/charts/consul-server/templates/service.yaml')
-rw-r--r--kubernetes/consul/charts/consul-server/templates/service.yaml43
1 files changed, 34 insertions, 9 deletions
diff --git a/kubernetes/consul/charts/consul-server/templates/service.yaml b/kubernetes/consul/charts/consul-server/templates/service.yaml
index c79662b254..c0f8726826 100644
--- a/kubernetes/consul/charts/consul-server/templates/service.yaml
+++ b/kubernetes/consul/charts/consul-server/templates/service.yaml
@@ -25,14 +25,39 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- - port: {{ .Values.service.internalPort }}
- targetPort: {{ .Values.service.internalPort }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
- name: {{ .Values.service.portName }}
- - port: {{ .Values.service.internalPort2 }}
- targetPort: {{ .Values.service.internalPort2 }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
- name: {{ .Values.service.portName2 }}
+ {{if eq .Values.service.type "NodePort" -}}
+ - port: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+ name: {{ .Values.service.portName }}
+ {{- else -}}
+ - port: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.portName }}
+ {{- end}}
selector:
- app: {{ template "common.name" . }}
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ clusterIP: None
+---
+kind: Service
+metadata:
+ name: {{ include "common.servicename" . }}-ui
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ type: {{ .Values.service.type2 }}
+ ports:
+ {{if eq .Values.service.type2 "NodePort" -}}
+ - port: {{ .Values.service.internalPort2 }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+ name: {{ .Values.service.portName2 }}
+ {{- else -}}
+ - port: {{ .Values.service.internalPort2 }}
+ name: {{ .Values.service.portName2 }}
+ {{- end}}
+ selector:
+ app: {{ include "common.name" . }}
release: {{ .Release.Name }}