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" |
| 73 | {{ if .Values.global.aafEnabled }} |
| 74 | port: {{ .Values.service.externalPort }} |
| 75 | targetPort: {{ .Values.service.internalPort }} |
| 76 | {{- else -}} |
| 77 | port: {{ .Values.service.internalPort4 }} |
| 78 | target: {{ .Values.service.internalPort4 }} |
| 79 | {{ end }} |
| 80 | - name: "{{ .Values.service.portName }}-karaf" |
| 81 | port: {{ .Values.service.externalPort2 }} |
| 82 | targetPort: {{ .Values.service.internalPort2 }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 83 | selector: |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 84 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 85 | app.kubernetes.io/instance: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 86 | --- |
| 87 | apiVersion: v1 |
| 88 | kind: Service |
| 89 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 90 | name: {{ .Values.service.portName }}-cluster |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 91 | namespace: {{ include "common.namespace" . }} |
| 92 | labels: |
| 93 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 94 | release: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 95 | annotations: |
| 96 | service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" |
| 97 | spec: |
| 98 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 99 | - name: "{{ .Values.service.portName }}-cluster-port" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 100 | port: {{ .Values.service.clusterPort }} |
| 101 | clusterIP: None |
| 102 | selector: |
Alexander Dehn | 9b797d6 | 2020-04-21 09:53:50 +0000 | [diff] [blame] | 103 | app.kubernetes.io/name: {{ include "common.name" . }} |
| 104 | app.kubernetes.io/instance: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 105 | sessionAffinity: None |
| 106 | type: ClusterIP |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 107 | |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 108 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 109 | --- |
| 110 | apiVersion: v1 |
| 111 | kind: Service |
| 112 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 113 | name: sdnhost-{{ include "common.servicename" . }}-0 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 114 | namespace: {{ .Release.Namespace }} |
| 115 | labels: |
| 116 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 117 | spec: |
| 118 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 119 | - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 120 | port: {{ .Values.service.clusterPort2 }} |
| 121 | targetPort: {{ .Values.service.internalPort4 }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 122 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort4 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 123 | - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 124 | port: {{ .Values.service.clusterPort3 }} |
| 125 | targetPort: {{ .Values.service.internalPort }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 126 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 127 | type: NodePort |
| 128 | selector: |
| 129 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 130 | {{ end }} |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 131 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 132 | --- |
| 133 | apiVersion: v1 |
| 134 | kind: Service |
| 135 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 136 | name: sdnhost-{{ include "common.servicename" . }}-1 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 137 | namespace: {{ .Release.Namespace }} |
| 138 | labels: |
| 139 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 |
| 140 | spec: |
| 141 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 142 | - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 143 | port: {{ .Values.service.clusterPort2 }} |
| 144 | targetPort: {{ .Values.service.internalPort4 }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 145 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort5 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 146 | - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 147 | port: {{ .Values.service.clusterPort3 }} |
| 148 | targetPort: {{ .Values.service.internalPort }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 149 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 150 | type: NodePort |
| 151 | selector: |
| 152 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 |
| 153 | {{ end }} |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 154 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 155 | --- |
| 156 | apiVersion: v1 |
| 157 | kind: Service |
| 158 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 159 | name: sdnhost-{{ include "common.servicename" . }}-2 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 160 | namespace: {{ .Release.Namespace }} |
| 161 | labels: |
| 162 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 |
| 163 | spec: |
| 164 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 165 | - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort4 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 166 | port: {{ .Values.service.clusterPort2 }} |
| 167 | targetPort: {{ .Values.service.internalPort4 }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 168 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort6 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 169 | - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 170 | port: {{ .Values.service.clusterPort3 }} |
| 171 | targetPort: {{ .Values.service.internalPort }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 172 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 173 | type: NodePort |
| 174 | selector: |
| 175 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 176 | {{ end }} |