Merge "[DMAAP] DMaaP ServiceMesh compatibility"
[oom.git] / kubernetes / vid / templates / service.yaml
index 3d1097f..e62f64d 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License
+*/}}
 
 apiVersion: v1
 kind: Service
@@ -20,7 +22,7 @@ metadata:
   labels:
     app: {{ include "common.name" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
+    release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 spec:
   type: {{ .Values.service.type }}
@@ -36,4 +38,25 @@ spec:
     {{- end}}
   selector:
     app: {{ include "common.name" . }}
-    release: {{ .Release.Name }}
+    release: {{ include "common.release" . }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.servicename" . }}-http
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ include "common.release" . }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ include "common.release" . }}
+  ports:
+    - name: {{ .Values.service.portName }}-http
+      port: {{ .Values.service.externalHttpPort }}
+      targetPort: {{ .Values.service.internalHttpPort }}
+      protocol: TCP