Merge "Add missing naming policy for vFW_NextGen"
[oom.git] / kubernetes / policy / charts / drools / templates / service.yaml
index 4335f7c..221063b 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,7 +16,7 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ include "common.fullname" . }}
+  name: {{ include "common.servicename" . }}
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
@@ -28,14 +29,14 @@ spec:
     {{if eq .Values.service.type "NodePort" -}}
     - port: {{ .Values.service.externalPort }}
       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-      name: {{ .Values.service.name }}-{{ .Values.service.externalPort }}
+      name: {{ .Values.service.portName }}-{{ .Values.service.externalPort }}
     - port: {{ .Values.service.externalPort2 }}
       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
-      name: {{ .Values.service.name }}-{{ .Values.service.externalPort2 }}
+      name: {{ .Values.service.portName }}-{{ .Values.service.externalPort2 }}
     {{- else -}}
-    - port: {{ .Values.service.type.externalPort }}
-      targetPort: {{ .Values.service.type.internalPort }}
-      name: {{ .Values.service.name }}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.portName }}
     {{- end}}
   selector:
     app: {{ include "common.name" . }}