Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 1 | {{/* |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 2 | # Copyright © 2017 Amdocs, Bell Canada |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 3 | # Copyright © 2020 highstreet technologies GmbH |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 16 | */}} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 17 | |
| 18 | apiVersion: v1 |
| 19 | kind: Service |
| 20 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 21 | name: {{ include "common.servicename" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 22 | namespace: {{ include "common.namespace" . }} |
| 23 | labels: |
| 24 | app: {{ include "common.name" . }} |
| 25 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 26 | release: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 27 | heritage: {{ .Release.Service }} |
| 28 | annotations: |
| 29 | msb.onap.org/service-info: '[ |
| 30 | { |
| 31 | "serviceName": "sdnc", |
| 32 | "version": "v1", |
| 33 | "url": "/", |
| 34 | "protocol": "REST", |
| 35 | "port": "{{ .Values.service.externalPort }}", |
| 36 | "visualRange":"1", |
| 37 | "path": "/" |
| 38 | } |
| 39 | ]' |
| 40 | spec: |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 41 | type: NodePort |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 42 | ports: |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 43 | - name: "{{ .Values.service.portName }}-restconf" |
Agarwal, Ruchira (ra1926) | ec7c75e | 2019-10-01 17:36:24 +0000 | [diff] [blame] | 44 | {{ if not .Values.global.aafEnabled }} |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 45 | port: {{ .Values.service.externalPort }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 46 | targetPort: {{ .Values.service.internalPort }} |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 47 | {{- else -}} |
| 48 | port: {{ .Values.service.externalPort4 }} |
| 49 | targetPort: {{ .Values.service.internalPort4 }} |
| 50 | {{ end }} |
| 51 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }} |
Jakub Latusek | 44a4b7e | 2020-09-25 10:47:01 +0200 | [diff] [blame] | 52 | {{ if .Values.config.sdnr.enabled }} |
| 53 | sessionAffinity: ClientIP |
| 54 | {{ end }} |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 55 | selector: |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 56 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 57 | app.kubernetes.io/instance: {{ include "common.release" . }} |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 58 | --- |
| 59 | apiVersion: v1 |
| 60 | kind: Service |
| 61 | metadata: |
| 62 | name: "{{ .Values.service.name }}-oam" |
| 63 | namespace: {{ include "common.namespace" . }} |
| 64 | labels: |
| 65 | app: {{ include "common.name" . }} |
| 66 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 67 | release: {{ include "common.release" . }} |
| 68 | heritage: {{ .Release.Service }} |
| 69 | spec: |
| 70 | type: ClusterIP |
| 71 | ports: |
| 72 | - name: "{{ .Values.service.portName }}-restconf-alt" |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 73 | port: {{ .Values.service.externalPort }} |
| 74 | targetPort: {{ .Values.service.internalPort }} |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 75 | - name: "{{ .Values.service.portName }}-karaf" |
| 76 | port: {{ .Values.service.externalPort2 }} |
| 77 | targetPort: {{ .Values.service.internalPort2 }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 78 | selector: |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 79 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 80 | app.kubernetes.io/instance: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 81 | --- |
| 82 | apiVersion: v1 |
| 83 | kind: Service |
| 84 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 85 | name: {{ .Values.service.portName }}-cluster |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 86 | namespace: {{ include "common.namespace" . }} |
| 87 | labels: |
| 88 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 89 | release: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 90 | annotations: |
| 91 | service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" |
| 92 | spec: |
| 93 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 94 | - name: "{{ .Values.service.portName }}-cluster-port" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 95 | port: {{ .Values.service.clusterPort }} |
| 96 | clusterIP: None |
| 97 | selector: |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 98 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 99 | app.kubernetes.io/instance: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 100 | sessionAffinity: None |
| 101 | type: ClusterIP |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 102 | |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 103 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 104 | --- |
| 105 | apiVersion: v1 |
| 106 | kind: Service |
| 107 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 108 | name: sdnhost-{{ include "common.servicename" . }}-0 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 109 | namespace: {{ .Release.Namespace }} |
| 110 | labels: |
| 111 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 112 | spec: |
| 113 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 114 | - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 115 | port: {{ .Values.service.clusterPort2 }} |
| 116 | targetPort: {{ .Values.service.internalPort4 }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 117 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort4 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 118 | - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 119 | port: {{ .Values.service.clusterPort3 }} |
| 120 | targetPort: {{ .Values.service.internalPort }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 121 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 122 | type: NodePort |
| 123 | selector: |
| 124 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 125 | {{ end }} |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 126 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 127 | --- |
| 128 | apiVersion: v1 |
| 129 | kind: Service |
| 130 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 131 | name: sdnhost-{{ include "common.servicename" . }}-1 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 132 | namespace: {{ .Release.Namespace }} |
| 133 | labels: |
| 134 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 |
| 135 | spec: |
| 136 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 137 | - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 138 | port: {{ .Values.service.clusterPort2 }} |
| 139 | targetPort: {{ .Values.service.internalPort4 }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 140 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort5 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 141 | - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 142 | port: {{ .Values.service.clusterPort3 }} |
| 143 | targetPort: {{ .Values.service.internalPort }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 144 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 145 | type: NodePort |
| 146 | selector: |
| 147 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 |
| 148 | {{ end }} |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 149 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 150 | --- |
| 151 | apiVersion: v1 |
| 152 | kind: Service |
| 153 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 154 | name: sdnhost-{{ include "common.servicename" . }}-2 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 155 | namespace: {{ .Release.Namespace }} |
| 156 | labels: |
| 157 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 |
| 158 | spec: |
| 159 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 160 | - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort4 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 161 | port: {{ .Values.service.clusterPort2 }} |
| 162 | targetPort: {{ .Values.service.internalPort4 }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 163 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort6 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 164 | - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 165 | port: {{ .Values.service.clusterPort3 }} |
| 166 | targetPort: {{ .Values.service.internalPort }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 167 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 168 | type: NodePort |
| 169 | selector: |
| 170 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 171 | {{ end }} |
demskeq8 | 2785466 | 2021-04-08 14:49:47 +0200 | [diff] [blame] | 172 | |
| 173 | {{ if .Values.config.sdnr.netconfCallHome.enabled }} |
| 174 | --- |
| 175 | apiVersion: v1 |
| 176 | kind: Service |
| 177 | metadata: |
| 178 | name: {{ include "common.servicename" . }}-callhome |
| 179 | namespace: {{ include "common.namespace" . }} |
| 180 | labels: |
| 181 | app: {{ include "common.name" . }} |
| 182 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 183 | release: {{ include "common.release" . }} |
| 184 | heritage: {{ .Release.Service }} |
| 185 | spec: |
| 186 | type: NodePort |
| 187 | ports: |
| 188 | - name: "{{ .Values.service.portName }}-callhome" |
| 189 | port: {{ .Values.service.callHomePort }} |
| 190 | targetPort: {{ .Values.service.callHomePort }} |
| 191 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.callHomeNodePort }} |
| 192 | selector: |
| 193 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 194 | app.kubernetes.io/instance: {{ include "common.release" . }} |
| 195 | {{ end }} |