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