[ONAP-wide] Replace .Release.Name with common.release
[oom.git] / kubernetes / sdc / charts / sdc-wfd-fe / templates / service.yaml
index 68e7f32..96e1c0a 100644 (file)
@@ -1,5 +1,5 @@
-# Copyright © 2018 Amdocs, Bell Canada
-#
+# Copyright © 2018 ZTE
+# Modifications Copyright © 2018 AT&T, Amdocs, Bell Canada
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -20,7 +20,7 @@ metadata:
   labels:
     app: {{ include "common.name" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
+    release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
   annotations:
     msb.onap.org/service-info: '[
@@ -29,7 +29,7 @@ metadata:
           "version": "v1",
           "url": "/",
           "protocol": "UI",
-          "port": "{{ .Values.service.internalPort }}",
+          "port": "{{ .Values.service.internalPort2 }}",
           "visualRange":"0|1"
       }
       ]'
@@ -37,14 +37,14 @@ spec:
   type: {{ .Values.service.type }}
   ports:
     {{if eq .Values.service.type "NodePort" -}}
-    - port: {{ .Values.service.internalPort }}
+    - port: {{ template "wfd-fe.internalPort" . }}
       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-      name: {{ .Values.service.portName | default "http" }}
+      name: {{ .Values.service.portName  }}
     {{- else -}}
-    - port: {{ .Values.service.externalPort }}
-      targetPort: {{ .Values.service.internalPort }}
-      name: {{ .Values.service.portName | default "http" }}
+    - port:  {{ if .Values.config.isHttpsEnabled }}{{ .Values.service.externalPort2 }}{{ else }}{{ .Values.service.externalPort }}{{ end }}
+      targetPort: {{ template "wfd-fe.internalPort" . }}
+      name: {{ .Values.service.portName }}
     {{- end}}
   selector:
     app: {{ include "common.name" . }}
-    release: {{ .Release.Name }}
+    release: {{ include "common.release" . }}