Add helm chart for nonrtric-gateway
[it/dep.git] / nonrtric / helm / policymanagementservice / templates / service.yaml
index f7bde7c..6d820e2 100644 (file)
@@ -26,11 +26,17 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   ports:
-  - name: {{ .Values.policymanagementservice.service.name }}
-    protocol: TCP
-    port: {{ .Values.policymanagementservice.service.internalPort }}
-    nodePort: {{ .Values.policymanagementservice.service.externalPort }}
+    {{if eq .Values.policymanagementservice.service.allowHttp true -}}
+    - name: {{ index .Values.policymanagementservice.service.httpName }}
+      port: {{ .Values.policymanagementservice.service.internalPort1 }}
+      targetPort: {{ .Values.policymanagementservice.service.targetPort1 }}
+      protocol: TCP
+    {{- end }}
+    - name: {{ index .Values.policymanagementservice.service.httpsName }}
+      port: {{ .Values.policymanagementservice.service.internalPort2 }}
+      targetPort: {{ .Values.policymanagementservice.service.targetPort2 }}
+      protocol: TCP
   selector:
     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }}
     release: {{ .Release.Name }}
-  type: NodePort
+  type: ClusterIP