blob: 1a0143f9aebf5710e1cae378304f9fe9ffdcee74 [file] [log] [blame]
Jakub Latusek67f4e8d2020-10-21 13:36:29 +02001{{/*
econwar28266fa2019-03-05 16:39:00 +00002# Copyright © 2017 Amdocs, Bell Canada
3#
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 Latusek67f4e8d2020-10-21 13:36:29 +020015*/}}
econwar28266fa2019-03-05 16:39:00 +000016
17apiVersion: v1
18kind: Service
19metadata:
Jakub Latuseka5f11d92020-09-24 17:13:22 +020020 name: {{ default "dmaap-dr-prov" .Values.global.dmaapDrProvName }}
econwar28266fa2019-03-05 16:39:00 +000021 namespace: {{ include "common.namespace" . }}
22 labels:
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010025 release: {{ include "common.release" . }}
econwar28266fa2019-03-05 16:39:00 +000026 heritage: {{ .Release.Service }}
27 annotations:
28 service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
29 msb.onap.org/service-info: '[
30 {
efiacor7b9a0872019-08-28 21:20:22 +000031 "serviceName": "{{ .Values.global.dmaapDrProvName }}",
econwar28266fa2019-03-05 16:39:00 +000032 "version": "v1",
33 "url": "/",
34 "protocol": "REST",
efiacor7b9a0872019-08-28 21:20:22 +000035 "port": "{{ .Values.global.dmaapDrProvExtPort2 }}",
econwar28266fa2019-03-05 16:39:00 +000036 "visualRange":"1"
37 }
38 ]'
39
40spec:
efiacor7b9a0872019-08-28 21:20:22 +000041 type: {{ .Values.config.dmaapDrProv.servicetype }}
econwar28266fa2019-03-05 16:39:00 +000042 ports:
efiacore62958b2019-09-27 16:54:36 +010043 {{- if eq .Values.config.dmaapDrProv.servicetype "NodePort" -}}
efiacor16669c52019-05-14 09:10:20 +000044 {{- if .Values.global.allow_http }}
efiacor7b9a0872019-08-28 21:20:22 +000045 - port: {{ .Values.global.dmaapDrProvExtPort }}
46 targetPort: {{ .Values.config.dmaapDrProv.internalPort }}
47 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.config.dmaapDrProv.nodePort }}
48 name: {{ .Values.config.dmaapDrProv.portName }}
efiacor16669c52019-05-14 09:10:20 +000049 {{- end}}
efiacor7b9a0872019-08-28 21:20:22 +000050 - port: {{ .Values.global.dmaapDrProvExtPort2 }}
51 targetPort: {{ .Values.config.dmaapDrProv.internalPort2 }}
52 nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.config.dmaapDrProv.nodePort2 }}
53 name: {{ .Values.config.dmaapDrProv.portName }}2
econwar28266fa2019-03-05 16:39:00 +000054 {{- else -}}
efiacor7b9a0872019-08-28 21:20:22 +000055 - port: {{ .Values.global.dmaapDrProvExtPort }}
56 targetPort: {{ .Values.config.dmaapDrProv.internalPort }}
57 name: {{ .Values.config.dmaapDrProv.portName }}
58 - port: {{ .Values.global.dmaapDrProvExtPort2 }}
59 targetPort: {{ .Values.config.dmaapDrProv.internalPort2 }}
60 name: {{ .Values.config.dmaapDrProv.portName }}2
econwar28266fa2019-03-05 16:39:00 +000061 {{- end}}
62 selector:
63 app: {{ include "common.name" . }}
Jakub Latusek67f4e8d2020-10-21 13:36:29 +020064 release: {{ include "common.release" . }}