Make all services independent of helm Release.Name
Issue-ID: OOM-906
Change-Id: Ic65127d3981cb0a696c784392cab59fbf06b1e66
Signed-off-by: BorislavG <Borislav.Glozman@amdocs.com>
diff --git a/kubernetes/sdnc/charts/dmaap-listener/templates/service.yaml b/kubernetes/sdnc/charts/dmaap-listener/templates/service.yaml
index a76592e..b2b34d0 100644
--- a/kubernetes/sdnc/charts/dmaap-listener/templates/service.yaml
+++ b/kubernetes/sdnc/charts/dmaap-listener/templates/service.yaml
@@ -15,7 +15,7 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ include "common.fullname" . }}
+ name: {{ include "common.servicename" . }}
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
diff --git a/kubernetes/sdnc/charts/dmaap-listener/values.yaml b/kubernetes/sdnc/charts/dmaap-listener/values.yaml
index 474113d..1a5ca2c 100644
--- a/kubernetes/sdnc/charts/dmaap-listener/values.yaml
+++ b/kubernetes/sdnc/charts/dmaap-listener/values.yaml
@@ -63,6 +63,9 @@
ingress:
enabled: false
+service:
+ name: dmaap-listener
+
resources: {}
#resources:
# limits:
diff --git a/kubernetes/sdnc/charts/sdnc-portal/templates/service.yaml b/kubernetes/sdnc/charts/sdnc-portal/templates/service.yaml
index 2d67c1f..2976287 100644
--- a/kubernetes/sdnc/charts/sdnc-portal/templates/service.yaml
+++ b/kubernetes/sdnc/charts/sdnc-portal/templates/service.yaml
@@ -15,7 +15,7 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ include "common.fullname" . }}
+ name: {{ include "common.servicename" . }}
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
@@ -39,12 +39,12 @@
{{if eq .Values.service.type "NodePort" -}}
- port: {{ .Values.service.externalPort }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
- name: {{ .Values.service.name }}
+ name: {{ .Values.service.portName }}
{{- else -}}
- port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
- name: {{ .Values.service.name }}
+ name: {{ .Values.service.portName }}
{{- end}}
selector:
app: {{ include "common.name" . }}
- release: {{ .Release.Name }}
\ No newline at end of file
+ release: {{ .Release.Name }}
diff --git a/kubernetes/sdnc/charts/sdnc-portal/values.yaml b/kubernetes/sdnc/charts/sdnc-portal/values.yaml
index 3b38889..ffc8959 100644
--- a/kubernetes/sdnc/charts/sdnc-portal/values.yaml
+++ b/kubernetes/sdnc/charts/sdnc-portal/values.yaml
@@ -63,6 +63,7 @@
service:
type: NodePort
name: sdnc-portal
+ portName: sdnc-portal
internalPort: 8843
externalPort: 8843
nodePort: "01"
diff --git a/kubernetes/sdnc/charts/ueb-listener/templates/service.yaml b/kubernetes/sdnc/charts/ueb-listener/templates/service.yaml
index a76592e..b2b34d0 100644
--- a/kubernetes/sdnc/charts/ueb-listener/templates/service.yaml
+++ b/kubernetes/sdnc/charts/ueb-listener/templates/service.yaml
@@ -15,7 +15,7 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ include "common.fullname" . }}
+ name: {{ include "common.servicename" . }}
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
diff --git a/kubernetes/sdnc/charts/ueb-listener/values.yaml b/kubernetes/sdnc/charts/ueb-listener/values.yaml
index b862633..d04ba09 100644
--- a/kubernetes/sdnc/charts/ueb-listener/values.yaml
+++ b/kubernetes/sdnc/charts/ueb-listener/values.yaml
@@ -61,6 +61,9 @@
initialDelaySeconds: 10
periodSeconds: 10
+service:
+ name: ueb-listener
+
ingress:
enabled: false
diff --git a/kubernetes/sdnc/templates/service.yaml b/kubernetes/sdnc/templates/service.yaml
index 487368e..586144b 100644
--- a/kubernetes/sdnc/templates/service.yaml
+++ b/kubernetes/sdnc/templates/service.yaml
@@ -15,7 +15,7 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ include "common.fullname" . }}
+ name: {{ include "common.servicename" . }}
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
@@ -41,19 +41,19 @@
- port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
- name: "{{ .Values.service.name }}-8282"
+ name: "{{ .Values.service.portName }}-8282"
- port: {{ .Values.service.externalPort2 }}
targetPort: {{ .Values.service.internalPort2 }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
- name: "{{ .Values.service.name }}-8202"
+ name: "{{ .Values.service.portName }}-8202"
- port: {{ .Values.service.externalPort3 }}
targetPort: {{ .Values.service.internalPort3 }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }}
- name: "{{ .Values.service.name }}-8280"
+ name: "{{ .Values.service.portName }}-8280"
{{- else -}}
- port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
- name: {{ .Values.service.name }}
+ name: {{ .Values.service.portName }}
{{- end}}
selector:
app: {{ include "common.name" . }}
@@ -62,7 +62,7 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ .Values.service.name }}-cluster
+ name: {{ .Values.service.portName }}-cluster
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
@@ -71,7 +71,7 @@
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
ports:
- - name: "{{ .Values.service.name }}-cluster-port"
+ - name: "{{ .Values.service.portName }}-cluster-port"
port: {{ .Values.service.clusterPort }}
clusterIP: None
selector:
@@ -85,17 +85,17 @@
apiVersion: v1
kind: Service
metadata:
- name: sdnhost-{{ include "common.fullname" . }}-0
+ name: sdnhost-{{ include "common.servicename" . }}-0
namespace: {{ .Release.Namespace }}
labels:
statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
spec:
ports:
- - name: {{ include "common.fullname" . }}-0-port-{{ .Values.service.internalPort4 }}
+ - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }}
port: {{ .Values.service.clusterPort2 }}
targetPort: {{ .Values.service.internalPort4 }}
nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort4 }}
- - name: {{ include "common.fullname" . }}-0-port-{{ .Values.service.internalPort }}
+ - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }}
port: {{ .Values.service.clusterPort3 }}
targetPort: {{ .Values.service.internalPort }}
nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort1 }}
@@ -108,17 +108,17 @@
apiVersion: v1
kind: Service
metadata:
- name: sdnhost-{{ include "common.fullname" . }}-1
+ name: sdnhost-{{ include "common.servicename" . }}-1
namespace: {{ .Release.Namespace }}
labels:
statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1
spec:
ports:
- - name: {{ include "common.fullname" . }}-1-port-{{ .Values.service.internalPort4 }}
+ - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }}
port: {{ .Values.service.clusterPort2 }}
targetPort: {{ .Values.service.internalPort4 }}
nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort5 }}
- - name: {{ include "common.fullname" . }}-1-port-{{ .Values.service.internalPort }}
+ - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }}
port: {{ .Values.service.clusterPort3 }}
targetPort: {{ .Values.service.internalPort }}
nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort2 }}
@@ -131,23 +131,21 @@
apiVersion: v1
kind: Service
metadata:
- name: sdnhost-{{ include "common.fullname" . }}-2
+ name: sdnhost-{{ include "common.servicename" . }}-2
namespace: {{ .Release.Namespace }}
labels:
statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
spec:
ports:
- - name: {{ include "common.fullname" . }}-2-port-{{ .Values.service.internalPort4 }}
+ - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort4 }}
port: {{ .Values.service.clusterPort2 }}
targetPort: {{ .Values.service.internalPort4 }}
nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort6 }}
- - name: {{ include "common.fullname" . }}-2-port-{{ .Values.service.internalPort }}
+ - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }}
port: {{ .Values.service.clusterPort3 }}
targetPort: {{ .Values.service.internalPort }}
nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort3 }}
type: NodePort
selector:
statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2
----
{{ end }}
-
diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml
index 8b4055e..55eaf2b 100644
--- a/kubernetes/sdnc/templates/statefulset.yaml
+++ b/kubernetes/sdnc/templates/statefulset.yaml
@@ -23,7 +23,7 @@
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
- serviceName: "{{ .Values.service.name }}-cluster"
+ serviceName: {{ include "common.servicename" . }}-cluster
replicas: {{ .Values.replicaCount }}
podManagementPolicy: Parallel
template:
diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml
index 6360d37..e3cd8ae 100644
--- a/kubernetes/sdnc/values.yaml
+++ b/kubernetes/sdnc/values.yaml
@@ -90,6 +90,7 @@
dbServiceName: sdnc-dbhost
dbRootPassword: openECOMP1.0
service:
+ name: sdnc-dgbuilder
nodePort: "03"
# default number of instances
@@ -114,7 +115,7 @@
service:
type: NodePort
name: sdnc
- #targetPort
+ portName: sdnc
internalPort: 8181
internalPort2: 8101
internalPort3: 8080