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: |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 41 | type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }} |
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" |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 44 | port: {{ .Values.service.externalPort }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 45 | targetPort: {{ .Values.service.internalPort }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 46 | {{ if not (include "common.ingressEnabled" .) }} |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 47 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 48 | {{ end }} |
Jakub Latusek | 44a4b7e | 2020-09-25 10:47:01 +0200 | [diff] [blame] | 49 | {{ if .Values.config.sdnr.enabled }} |
demskeq8 | 95bf73a | 2023-05-09 12:31:07 +0000 | [diff] [blame^] | 50 | - name: "{{ .Values.service.portName }}-sdnrwebsocket" |
| 51 | port: {{ .Values.service.sdnrWebsocketPort | default "8182" }} |
| 52 | targetPort: {{ .Values.service.sdnrWebsocketPort }} |
Jakub Latusek | 44a4b7e | 2020-09-25 10:47:01 +0200 | [diff] [blame] | 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: |
AndrewLamb | 7709c17 | 2023-05-12 15:37:14 +0100 | [diff] [blame] | 111 | app: sdnhost-{{ include "common.name" . }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 112 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 113 | spec: |
| 114 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 115 | - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 116 | port: {{ .Values.service.clusterPort3 }} |
| 117 | targetPort: {{ .Values.service.internalPort }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 118 | {{ if not (include "common.ingressEnabled" .) }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 119 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 120 | {{ end }} |
| 121 | type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 122 | selector: |
| 123 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 124 | {{ end }} |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 125 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 126 | --- |
| 127 | apiVersion: v1 |
| 128 | kind: Service |
| 129 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 130 | name: sdnhost-{{ include "common.servicename" . }}-1 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 131 | namespace: {{ .Release.Namespace }} |
| 132 | labels: |
AndrewLamb | 7709c17 | 2023-05-12 15:37:14 +0100 | [diff] [blame] | 133 | app: sdnhost-{{ include "common.name" . }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 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.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 138 | port: {{ .Values.service.clusterPort3 }} |
| 139 | targetPort: {{ .Values.service.internalPort }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 140 | {{ if not (include "common.ingressEnabled" .) }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 141 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 142 | {{ end }} |
| 143 | type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 144 | selector: |
| 145 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 |
| 146 | {{ end }} |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 147 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 148 | --- |
| 149 | apiVersion: v1 |
| 150 | kind: Service |
| 151 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 152 | name: sdnhost-{{ include "common.servicename" . }}-2 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 153 | namespace: {{ .Release.Namespace }} |
| 154 | labels: |
AndrewLamb | 7709c17 | 2023-05-12 15:37:14 +0100 | [diff] [blame] | 155 | app: sdnhost-{{ include "common.name" . }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 156 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 |
| 157 | spec: |
| 158 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 159 | - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 160 | port: {{ .Values.service.clusterPort3 }} |
| 161 | targetPort: {{ .Values.service.internalPort }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 162 | {{ if not (include "common.ingressEnabled" .) }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 163 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 164 | {{ end }} |
| 165 | type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 166 | selector: |
| 167 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 168 | {{ end }} |
demskeq8 | 2785466 | 2021-04-08 14:49:47 +0200 | [diff] [blame] | 169 | |
| 170 | {{ if .Values.config.sdnr.netconfCallHome.enabled }} |
| 171 | --- |
| 172 | apiVersion: v1 |
| 173 | kind: Service |
| 174 | metadata: |
| 175 | name: {{ include "common.servicename" . }}-callhome |
| 176 | namespace: {{ include "common.namespace" . }} |
| 177 | labels: |
| 178 | app: {{ include "common.name" . }} |
| 179 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 180 | release: {{ include "common.release" . }} |
| 181 | heritage: {{ .Release.Service }} |
| 182 | spec: |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 183 | type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }} |
demskeq8 | 2785466 | 2021-04-08 14:49:47 +0200 | [diff] [blame] | 184 | ports: |
| 185 | - name: "{{ .Values.service.portName }}-callhome" |
| 186 | port: {{ .Values.service.callHomePort }} |
| 187 | targetPort: {{ .Values.service.callHomePort }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 188 | {{ if not (include "common.ingressEnabled" .) }} |
demskeq8 | 2785466 | 2021-04-08 14:49:47 +0200 | [diff] [blame] | 189 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.callHomeNodePort }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 190 | {{ end }} |
demskeq8 | 2785466 | 2021-04-08 14:49:47 +0200 | [diff] [blame] | 191 | selector: |
| 192 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 193 | app.kubernetes.io/instance: {{ include "common.release" . }} |
demskeq8 | 95bf73a | 2023-05-09 12:31:07 +0000 | [diff] [blame^] | 194 | {{ end }} |