Enable https port
[it/dep.git] / nonrtric / helm / policymanagementservice / templates / service.yaml
index 211ffdf..2358692 100644 (file)
@@ -26,11 +26,19 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   ports:
-  - name: http
-    protocol: TCP
-    port: {{ include "common.serviceport.policymanagementservice.http" . }}
-    targetPort: {{ include "common.serviceport.policymanagementservice.http" . }}
+    {{if eq .Values.policymanagementservice.service.allowHttp true -}}
+    - name: {{ index .Values.policymanagementservice.service.httpName }}
+      port: {{ .Values.policymanagementservice.service.internalPort1 }}
+      targetPort: {{ .Values.policymanagementservice.service.targetPort1 }}
+      nodePort: {{ .Values.policymanagementservice.service.externalPort1 }}
+      protocol: TCP
+    {{- end }}
+    - name: {{ index .Values.policymanagementservice.service.httpsName }}
+      port: {{ .Values.policymanagementservice.service.internalPort2 }}
+      targetPort: {{ .Values.policymanagementservice.service.targetPort2 }}
+      nodePort: {{ .Values.policymanagementservice.service.externalPort2 }}
+      protocol: TCP
   selector:
-    app: nonrtric-{{ include "common.name.policymanagementservice" . }}
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }}
     release: {{ .Release.Name }}
-  type: ClusterIP
+  type: NodePort