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 }} |
| 50 | sessionAffinity: ClientIP |
| 51 | {{ end }} |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 52 | selector: |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 53 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 54 | app.kubernetes.io/instance: {{ include "common.release" . }} |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 55 | --- |
| 56 | apiVersion: v1 |
| 57 | kind: Service |
| 58 | metadata: |
| 59 | name: "{{ .Values.service.name }}-oam" |
| 60 | namespace: {{ include "common.namespace" . }} |
| 61 | labels: |
| 62 | app: {{ include "common.name" . }} |
| 63 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 64 | release: {{ include "common.release" . }} |
| 65 | heritage: {{ .Release.Service }} |
| 66 | spec: |
| 67 | type: ClusterIP |
| 68 | ports: |
| 69 | - name: "{{ .Values.service.portName }}-restconf-alt" |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 70 | port: {{ .Values.service.externalPort }} |
| 71 | targetPort: {{ .Values.service.internalPort }} |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 72 | - name: "{{ .Values.service.portName }}-karaf" |
| 73 | port: {{ .Values.service.externalPort2 }} |
| 74 | targetPort: {{ .Values.service.internalPort2 }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 75 | selector: |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 76 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 77 | app.kubernetes.io/instance: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 78 | --- |
| 79 | apiVersion: v1 |
| 80 | kind: Service |
| 81 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 82 | name: {{ .Values.service.portName }}-cluster |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 83 | namespace: {{ include "common.namespace" . }} |
| 84 | labels: |
| 85 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 86 | release: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 87 | annotations: |
| 88 | service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" |
| 89 | spec: |
| 90 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 91 | - name: "{{ .Values.service.portName }}-cluster-port" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 92 | port: {{ .Values.service.clusterPort }} |
| 93 | clusterIP: None |
| 94 | selector: |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 95 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 96 | app.kubernetes.io/instance: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 97 | sessionAffinity: None |
| 98 | type: ClusterIP |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 99 | |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 100 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 101 | --- |
| 102 | apiVersion: v1 |
| 103 | kind: Service |
| 104 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 105 | name: sdnhost-{{ include "common.servicename" . }}-0 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 106 | namespace: {{ .Release.Namespace }} |
| 107 | labels: |
| 108 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 109 | spec: |
| 110 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 111 | - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 112 | port: {{ .Values.service.clusterPort3 }} |
| 113 | targetPort: {{ .Values.service.internalPort }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 114 | {{ if not (include "common.ingressEnabled" .) }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 115 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 116 | {{ end }} |
| 117 | type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 118 | selector: |
| 119 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 120 | {{ end }} |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 121 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 122 | --- |
| 123 | apiVersion: v1 |
| 124 | kind: Service |
| 125 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 126 | name: sdnhost-{{ include "common.servicename" . }}-1 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 127 | namespace: {{ .Release.Namespace }} |
| 128 | labels: |
| 129 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 |
| 130 | spec: |
| 131 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 132 | - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 133 | port: {{ .Values.service.clusterPort3 }} |
| 134 | targetPort: {{ .Values.service.internalPort }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 135 | {{ if not (include "common.ingressEnabled" .) }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 136 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 137 | {{ end }} |
| 138 | type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 139 | selector: |
| 140 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 |
| 141 | {{ end }} |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 142 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 143 | --- |
| 144 | apiVersion: v1 |
| 145 | kind: Service |
| 146 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 147 | name: sdnhost-{{ include "common.servicename" . }}-2 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 148 | namespace: {{ .Release.Namespace }} |
| 149 | labels: |
| 150 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 |
| 151 | spec: |
| 152 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 153 | - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 154 | port: {{ .Values.service.clusterPort3 }} |
| 155 | targetPort: {{ .Values.service.internalPort }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 156 | {{ if not (include "common.ingressEnabled" .) }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 157 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 158 | {{ end }} |
| 159 | type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 160 | selector: |
| 161 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 162 | {{ end }} |
demskeq8 | 2785466 | 2021-04-08 14:49:47 +0200 | [diff] [blame] | 163 | |
| 164 | {{ if .Values.config.sdnr.netconfCallHome.enabled }} |
| 165 | --- |
| 166 | apiVersion: v1 |
| 167 | kind: Service |
| 168 | metadata: |
| 169 | name: {{ include "common.servicename" . }}-callhome |
| 170 | namespace: {{ include "common.namespace" . }} |
| 171 | labels: |
| 172 | app: {{ include "common.name" . }} |
| 173 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 174 | release: {{ include "common.release" . }} |
| 175 | heritage: {{ .Release.Service }} |
| 176 | spec: |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 177 | type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}NodePort{{ end }} |
demskeq8 | 2785466 | 2021-04-08 14:49:47 +0200 | [diff] [blame] | 178 | ports: |
| 179 | - name: "{{ .Values.service.portName }}-callhome" |
| 180 | port: {{ .Values.service.callHomePort }} |
| 181 | targetPort: {{ .Values.service.callHomePort }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 182 | {{ if not (include "common.ingressEnabled" .) }} |
demskeq8 | 2785466 | 2021-04-08 14:49:47 +0200 | [diff] [blame] | 183 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.callHomeNodePort }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 184 | {{ end }} |
demskeq8 | 2785466 | 2021-04-08 14:49:47 +0200 | [diff] [blame] | 185 | selector: |
| 186 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 187 | app.kubernetes.io/instance: {{ include "common.release" . }} |
Andreas Geissler | 2af5079 | 2023-03-27 17:11:27 +0200 | [diff] [blame] | 188 | {{ end }} |