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 "+" "_" }} |
| 23 | release: {{ .Release.Name }} |
| 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 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 43 | name: "{{ .Values.service.portName }}-8282" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 44 | - port: {{ .Values.service.externalPort2 }} |
| 45 | targetPort: {{ .Values.service.internalPort2 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 46 | name: "{{ .Values.service.portName }}-8202" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 47 | - port: {{ .Values.service.externalPort3 }} |
| 48 | targetPort: {{ .Values.service.internalPort3 }} |
| 49 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 50 | name: "{{ .Values.service.portName }}-8280" |
jmac | a68f4cb | 2018-05-10 22:44:19 +0000 | [diff] [blame] | 51 | - port: {{ .Values.service.externalPort4 }} |
| 52 | targetPort: {{ .Values.service.internalPort4 }} |
| 53 | nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }} |
| 54 | name: "{{ .Values.service.portName }}-8443" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 55 | {{- else -}} |
| 56 | - port: {{ .Values.service.externalPort }} |
| 57 | targetPort: {{ .Values.service.internalPort }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 58 | name: {{ .Values.service.portName }} |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 59 | {{- end}} |
| 60 | selector: |
| 61 | app: {{ include "common.name" . }} |
| 62 | release: {{ .Release.Name }} |
| 63 | --- |
| 64 | apiVersion: v1 |
| 65 | kind: Service |
| 66 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 67 | name: {{ .Values.service.portName }}-cluster |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 68 | namespace: {{ include "common.namespace" . }} |
| 69 | labels: |
| 70 | app: {{ include "common.name" . }} |
| 71 | release: {{ .Release.Name }} |
| 72 | annotations: |
| 73 | service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" |
| 74 | spec: |
| 75 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 76 | - name: "{{ .Values.service.portName }}-cluster-port" |
jmac | 065e2ce | 2018-03-29 01:18:02 +0000 | [diff] [blame] | 77 | port: {{ .Values.service.clusterPort }} |
| 78 | clusterIP: None |
| 79 | selector: |
| 80 | app: {{ include "common.name" . }} |
| 81 | release: {{ .Release.Name }} |
| 82 | sessionAffinity: None |
| 83 | type: ClusterIP |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 84 | |
Trevor Tait | 567ff1e | 2018-05-01 16:20:54 -0400 | [diff] [blame] | 85 | {{ if .Values.config.geoEnabled }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 86 | --- |
| 87 | apiVersion: v1 |
| 88 | kind: Service |
| 89 | metadata: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 90 | name: sdnhost-{{ include "common.servicename" . }}-0 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 91 | namespace: {{ .Release.Namespace }} |
| 92 | labels: |
| 93 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 94 | spec: |
| 95 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 96 | - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 97 | port: {{ .Values.service.clusterPort2 }} |
| 98 | targetPort: {{ .Values.service.internalPort4 }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 99 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort4 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 100 | - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 101 | port: {{ .Values.service.clusterPort3 }} |
| 102 | targetPort: {{ .Values.service.internalPort }} |
jmac | 0e4f717 | 2018-09-07 18:06:43 +0000 | [diff] [blame] | 103 | nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.geoNodePort1 }} |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 104 | type: NodePort |
| 105 | selector: |
| 106 | statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 |
| 107 | {{ end }} |
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" . }}-1 |
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" . }}-1 |
| 117 | spec: |
| 118 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 119 | - name: {{ .Values.service.portName }}-1-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.geoNodePort5 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 123 | - name: {{ .Values.service.portName }}-1-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.geoNodePort2 }} |
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" . }}-1 |
| 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" . }}-2 |
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" . }}-2 |
| 140 | spec: |
| 141 | ports: |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 142 | - name: {{ .Values.service.portName }}-2-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.geoNodePort6 }} |
BorislavG | 1ffbd99 | 2018-04-24 07:56:27 +0000 | [diff] [blame] | 146 | - name: {{ .Values.service.portName }}-2-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.geoNodePort3 }} |
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" . }}-2 |
Mohammadreza Pasandideh | b756fb7 | 2018-04-03 10:06:45 -0400 | [diff] [blame] | 153 | {{ end }} |