Jakub Latusek | df233a8 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 1 | {{/* |
Lusheng Ji | 32c36bd | 2018-05-14 10:04:49 -0400 | [diff] [blame] | 2 | #============LICENSE_START======================================================== |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 3 | # ================================================================================ |
| 4 | # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. |
Durgpal | 7ad4069 | 2018-08-03 07:28:36 +0000 | [diff] [blame] | 5 | # Modifications Copyright © 2018 Amdocs, Bell Canada |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 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========================================================= |
Jakub Latusek | df233a8 | 2020-10-21 13:36:29 +0200 | [diff] [blame] | 19 | */}} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 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 "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 29 | release: {{ include "common.release" . }} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 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" . }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 45 | release: {{ include "common.release" . }} |
BorislavG | e904ab2 | 2018-04-03 16:55:55 +0300 | [diff] [blame] | 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 }} |
Lusheng Ji | 98f947e | 2018-04-30 12:03:37 -0400 | [diff] [blame] | 68 | --- |
Jack Lucas | d801f79 | 2018-04-27 22:20:33 +0000 | [diff] [blame] | 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 | --- |