blob: 3a2861668781b2d064edae9bf87cc644176560e7 [file] [log] [blame]
Jakub Latusekdf233a82020-10-21 13:36:29 +02001{{/*
Lusheng Ji32c36bd2018-05-14 10:04:49 -04002#============LICENSE_START========================================================
BorislavGe904ab22018-04-03 16:55:55 +03003# ================================================================================
4# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
Durgpal7ad40692018-08-03 07:28:36 +00005# Modifications Copyright © 2018 Amdocs, Bell Canada
BorislavGe904ab22018-04-03 16:55:55 +03006# ================================================================================
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=========================================================
Jakub Latusekdf233a82020-10-21 13:36:29 +020019*/}}
BorislavGe904ab22018-04-03 16:55:55 +030020
21apiVersion: v1
22kind: Service
23metadata:
24 name: {{ include "common.servicename" . }}
25 namespace: {{ include "common.namespace" . }}
26 labels:
27 app: {{ include "common.name" . }}
28 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010029 release: {{ include "common.release" . }}
BorislavGe904ab22018-04-03 16:55:55 +030030 heritage: {{ .Release.Service }}
31spec:
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" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010045 release: {{ include "common.release" . }}
BorislavGe904ab22018-04-03 16:55:55 +030046{{ if .Values.dcae_ns}}
47---
48# Make consul visible inside DCAE component namespace under a well-known name
49apiVersion: v1
50kind: Service
51metadata:
52 name: consul
53 namespace: {{ .Values.dcae_ns }}
54spec:
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
59apiVersion: v1
60kind: Service
61metadata:
62 name: {{ include "common.servicename" . }}
63 namespace: {{ .Values.dcae_ns }}
64spec:
65 type: ExternalName
66 externalName: {{ .Values.service.name }}.{{ include "common.namespace" . }}.svc.cluster.local
67{{ end }}
Lusheng Ji98f947e2018-04-30 12:03:37 -040068---
Jack Lucasd801f792018-04-27 22:20:33 +000069# Provide alternate name for consul in common namespace to support CM plugin discovery
70apiVersion: v1
71kind: Service
72metadata:
73 name: consul
74 namespace: {{ include "common.namespace" . }}
75spec:
76 type: ExternalName
77 externalName: {{ .Values.config.address.consul.host }}.{{ include "common.namespace" . }}.svc.cluster.local
78---