Jakub Latusek | d8eaff6 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Copyright © 2018 ZTE |
| 3 | # Modifications Copyright © 2018 AT&T, Amdocs, Bell Canada |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
Jakub Latusek | d8eaff6 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 15 | */}} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 16 | |
| 17 | apiVersion: v1 |
| 18 | kind: Service |
| 19 | metadata: |
| 20 | name: {{ include "common.servicename" . }} |
| 21 | namespace: {{ include "common.namespace" . }} |
| 22 | labels: |
| 23 | app: {{ include "common.name" . }} |
| 24 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 25 | release: {{ include "common.release" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 26 | heritage: {{ .Release.Service }} |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 27 | annotations: |
| 28 | msb.onap.org/service-info: '[ |
| 29 | { |
| 30 | "serviceName": "wf-gui", |
| 31 | "version": "v1", |
| 32 | "url": "/", |
| 33 | "protocol": "UI", |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 34 | "port": "{{ .Values.service.internalPort2 }}", |
priyanshu | 3af9db6 | 2018-08-16 16:23:52 +0530 | [diff] [blame] | 35 | "visualRange":"0|1" |
| 36 | } |
| 37 | ]' |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 38 | spec: |
| 39 | type: {{ .Values.service.type }} |
| 40 | ports: |
| 41 | {{if eq .Values.service.type "NodePort" -}} |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 42 | - port: {{ template "wfd-fe.internalPort" . }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 43 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 44 | name: {{ .Values.service.portName }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 45 | {{- else -}} |
IlanaP | c80bff9 | 2019-11-18 21:10:08 +0200 | [diff] [blame] | 46 | - port: {{ if .Values.config.isHttpsEnabled }}{{ .Values.service.externalPort2 }}{{ else }}{{ .Values.service.externalPort }}{{ end }} |
| 47 | targetPort: {{ template "wfd-fe.internalPort" . }} |
| 48 | name: {{ .Values.service.portName }} |
priyanshua | 1b06139 | 2018-05-29 12:50:14 +0530 | [diff] [blame] | 49 | {{- end}} |
| 50 | selector: |
| 51 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 52 | release: {{ include "common.release" . }} |