Add v1 service endpoints for MultiCloud components
[oom.git] / kubernetes / multicloud / charts / multicloud-vio / templates / service.yaml
index e837497..b34cbec 100644 (file)
@@ -1,5 +1,6 @@
 {{/*
 # 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.
@@ -17,7 +18,7 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: {{ .Values.service.name }}
+  name: {{ include "common.servicename" . }}
   namespace: {{ include "common.namespace" . }}
   labels:
     app: {{ include "common.name" . }}
@@ -33,18 +34,26 @@ metadata:
       "protocol": "REST",
       "port": "{{ .Values.service.externalPort }}",
       "visualRange": "1"
+    },
+    {
+      "serviceName": "multicloud-vio",
+      "version": "v1",
+      "url": "/api/multicloud-vio/v1",
+      "protocol": "REST",
+      "port": "{{ .Values.service.externalPort }}",
+      "visualRange": "1"
     }
     ]'
 spec:
   ports:
   {{if eq .Values.service.type "NodePort" -}}
-  - name: http-{{ .Values.service.name }}
-    port: {{ .Values.service.externalPort }}
+  - port: {{ .Values.service.externalPort }}
     nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+    name: {{ .Values.service.portName }}
   {{- else -}}
   - port: {{ .Values.service.externalPort }}
     targetPort: {{ .Values.service.internalPort }}
-    name: http-{{ .Values.service.name }}
+    name: {{ .Values.service.portName }}
   {{- end}}
   selector:
     app: {{ include "common.name" . }}