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