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 |
| 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. |
Krzysztof Opasiak | ab7a6bb | 2020-03-24 03:30:51 +0100 | [diff] [blame] | 15 | */}} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 16 | |
| 17 | apiVersion: v1 |
| 18 | kind: Service |
| 19 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 20 | name: {{ include "common.servicename" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 21 | namespace: {{ include "common.namespace" . }} |
| 22 | labels: |
| 23 | app: {{ include "common.name" . }} |
| 24 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 25 | release: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 26 | heritage: {{ .Release.Service }} |
| 27 | annotations: |
| 28 | msb.onap.org/service-info: '[ |
| 29 | { |
| 30 | "serviceName": "sdnc", |
| 31 | "version": "v1", |
| 32 | "url": "/", |
| 33 | "protocol": "REST", |
| 34 | "port": "{{ .Values.service.externalPort }}", |
| 35 | "visualRange":"1", |
| 36 | "path": "/" |
| 37 | } |
| 38 | ]' |
| 39 | spec: |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 40 | type: NodePort |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 41 | ports: |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 42 | - name: "{{ .Values.service.portName }}-restconf" |
Agarwal, Ruchira (ra1926) | ec7c75e | 2019-10-01 17:36:24 +0000 | [diff] [blame] | 43 | {{ if not .Values.global.aafEnabled }} |
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 }} |
Dan Timoney | 7c29ad0 | 2020-03-17 11:41:16 -0400 | [diff] [blame] | 46 | {{- else -}} |
| 47 | port: {{ .Values.service.externalPort4 }} |
| 48 | targetPort: {{ .Values.service.internalPort4 }} |
| 49 | {{ end }} |
| 50 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }} |
| 51 | selector: |
| 52 | app: {{ include "common.name" . }} |
| 53 | release: {{ include "common.release" . }} |
| 54 | --- |
| 55 | apiVersion: v1 |
| 56 | kind: Service |
| 57 | metadata: |
| 58 | name: "{{ .Values.service.name }}-oam" |
| 59 | namespace: {{ include "common.namespace" . }} |
| 60 | labels: |
| 61 | app: {{ include "common.name" . }} |
| 62 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 63 | release: {{ include "common.release" . }} |
| 64 | heritage: {{ .Release.Service }} |
| 65 | spec: |
| 66 | type: ClusterIP |
| 67 | ports: |
| 68 | - name: "{{ .Values.service.portName }}-restconf-alt" |
| 69 | {{ if .Values.global.aafEnabled }} |
| 70 | port: {{ .Values.service.externalPort }} |
| 71 | targetPort: {{ .Values.service.internalPort }} |
| 72 | {{- else -}} |
| 73 | port: {{ .Values.service.internalPort4 }} |
| 74 | target: {{ .Values.service.internalPort4 }} |
| 75 | {{ end }} |
| 76 | - name: "{{ .Values.service.portName }}-karaf" |
| 77 | port: {{ .Values.service.externalPort2 }} |
| 78 | targetPort: {{ .Values.service.internalPort2 }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 79 | selector: |
| 80 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 81 | release: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 82 | --- |
| 83 | apiVersion: v1 |
| 84 | kind: Service |
| 85 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 86 | name: {{ .Values.service.portName }}-cluster |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 87 | namespace: {{ include "common.namespace" . }} |
| 88 | labels: |
| 89 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 90 | release: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 91 | annotations: |
| 92 | service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" |
| 93 | spec: |
| 94 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 95 | - name: "{{ .Values.service.portName }}-cluster-port" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 96 | port: {{ .Values.service.clusterPort }} |
| 97 | clusterIP: None |
| 98 | selector: |
| 99 | app: {{ include "common.name" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 100 | release: {{ include "common.release" . }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 101 | sessionAffinity: None |
| 102 | type: ClusterIP |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 103 | |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 104 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 105 | --- |
| 106 | apiVersion: v1 |
| 107 | kind: Service |
| 108 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 109 | name: sdnhost-{{ include "common.servicename" . }}-0 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 110 | namespace: {{ .Release.Namespace }} |
| 111 | labels: |
| 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.internalPort4 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 116 | port: {{ .Values.service.clusterPort2 }} |
| 117 | targetPort: {{ .Values.service.internalPort4 }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 118 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort4 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 119 | - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 120 | port: {{ .Values.service.clusterPort3 }} |
| 121 | targetPort: {{ .Values.service.internalPort }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 122 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 123 | type: NodePort |
| 124 | selector: |
| 125 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 126 | {{ end }} |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 127 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 128 | --- |
| 129 | apiVersion: v1 |
| 130 | kind: Service |
| 131 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 132 | name: sdnhost-{{ include "common.servicename" . }}-1 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 133 | namespace: {{ .Release.Namespace }} |
| 134 | labels: |
| 135 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 |
| 136 | spec: |
| 137 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 138 | - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 139 | port: {{ .Values.service.clusterPort2 }} |
| 140 | targetPort: {{ .Values.service.internalPort4 }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 141 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort5 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 142 | - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 143 | port: {{ .Values.service.clusterPort3 }} |
| 144 | targetPort: {{ .Values.service.internalPort }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 145 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort2 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 146 | type: NodePort |
| 147 | selector: |
| 148 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 |
| 149 | {{ end }} |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 150 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 151 | --- |
| 152 | apiVersion: v1 |
| 153 | kind: Service |
| 154 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 155 | name: sdnhost-{{ include "common.servicename" . }}-2 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 156 | namespace: {{ .Release.Namespace }} |
| 157 | labels: |
| 158 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 |
| 159 | spec: |
| 160 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 161 | - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort4 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 162 | port: {{ .Values.service.clusterPort2 }} |
| 163 | targetPort: {{ .Values.service.internalPort4 }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 164 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort6 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 165 | - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 166 | port: {{ .Values.service.clusterPort3 }} |
| 167 | targetPort: {{ .Values.service.internalPort }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 168 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort3 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 169 | type: NodePort |
| 170 | selector: |
| 171 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 172 | {{ end }} |