X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=helm%2Fdbaasha%2Ftemplates%2Fannounce-service.yaml;fp=helm%2Fdbaasha%2Ftemplates%2Fannounce-service.yaml;h=3352ffb1a6891338fed038037fbf3b98db97339d;hb=85c6e9479b4c1ade37cf21387e1c8b42838b2efc;hp=0000000000000000000000000000000000000000;hpb=282e7af25ec053ae6d1c5a399c91c2c323f705cd;p=ric-plt%2Fric-dep.git diff --git a/helm/dbaasha/templates/announce-service.yaml b/helm/dbaasha/templates/announce-service.yaml new file mode 100644 index 0000000..3352ffb --- /dev/null +++ b/helm/dbaasha/templates/announce-service.yaml @@ -0,0 +1,52 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ +{{- $fullName := include "common.fullname.dbaasha" . }} +{{- $podName := include "common.statefulsetname.dbaasha" . }} +{{- $appName := include "common.name.dbaasha" . }} +{{- $platformName := include "common.namespace.platform" . }} +{{- $replicas := int .Values.dbaasha.replicas }} +{{- $redisPort := include "common.serviceport.dbaasha.redis" .}} +{{- $sentinelPort := include "common.serviceport.dbaasha.sentinel" .}} +{{- $root := . }} +{{- range $i := until $replicas }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ $fullName }}-announce-{{ $i }} + labels: + app: {{ $platformName }}-{{ $appName }} + chart: {{ $root.Chart.Name }}-{{ $root.Chart.Version | replace "+" "_" }} + release: {{ $root.Release.Name }} + heritage: {{ $root.Release.Service }} +spec: + publishNotReadyAddresses: true + type: ClusterIP + ports: + - name: server + port: {{ $redisPort }} + protocol: TCP + targetPort: redis + - name: sentinel + port: {{ $sentinelPort }} + protocol: TCP + targetPort: sentinel + selector: + release: {{ $root.Release.Name }} + app: {{ $platformName }}-{{ $appName }} + "statefulset.kubernetes.io/pod-name": {{ $podName }}-server-{{ $i }} +{{- end }}