[CASSANDRA] Change values to makre Cassandra instances more stable
[oom.git] / kubernetes / dcaegen2 / components / dcae-cloudify-manager / templates / service.yaml
1 {{/*
2 #============LICENSE_START========================================================
3 # ================================================================================
4 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
5 # Modifications Copyright © 2018 Amdocs, Bell Canada
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #     http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END=========================================================
19 */}}
20
21 apiVersion: v1
22 kind: Service
23 metadata:
24   name: {{ include "common.servicename" . }}
25   namespace: {{ include "common.namespace" . }}
26   labels:
27     app: {{ include "common.name" . }}
28     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
29     release: {{ include "common.release" . }}
30     heritage: {{ .Release.Service }}
31 spec:
32   type: {{ .Values.service.type }}
33   ports:
34     {{if eq .Values.service.type "NodePort" -}}
35     - port: {{ .Values.service.externalPort }}
36       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
37       name: {{ .Values.service.name }}
38     {{- else -}}
39     - port: {{ .Values.service.externalPort }}
40       targetPort: {{ .Values.service.internalPort }}
41       name: {{ .Values.service.name }}
42     {{- end}}
43   selector:
44     app: {{ include "common.name" . }}
45     release: {{ include "common.release" . }}
46 {{ if .Values.dcae_ns}}
47 ---
48 # Make consul visible inside DCAE component namespace under a well-known name
49 apiVersion: v1
50 kind: Service
51 metadata:
52   name: consul
53   namespace: {{ .Values.dcae_ns }}
54 spec:
55   type: ExternalName
56   externalName: {{ .Values.config.address.consul.host }}.{{ include "common.namespace" . }}.svc.cluster.local
57 ---
58 # Make Cloudify Manager visible inside DCAE component namespace under a well-known name
59 apiVersion: v1
60 kind: Service
61 metadata:
62   name: {{ include "common.servicename" . }}
63   namespace: {{ .Values.dcae_ns }}
64 spec:
65   type: ExternalName
66   externalName: {{ .Values.service.name }}.{{ include "common.namespace" . }}.svc.cluster.local
67 {{ end }}
68 ---
69 # Provide alternate name for consul in common namespace to support CM plugin discovery
70 apiVersion: v1
71 kind: Service
72 metadata:
73   name: consul
74   namespace: {{ include "common.namespace" . }}
75 spec:
76   type: ExternalName
77   externalName: {{ .Values.config.address.consul.host }}.{{ include "common.namespace" . }}.svc.cluster.local
78 ---