blob: 26607c9645af61d8577325739b4104adb8d0a2a7 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#
{{- if .Values.components.tubemqServer }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "inlong.fullname" . }}-{{ .Values.tubemqMaster.component }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "inlong.commonLabels" . | nindent 4 }}
component: {{ .Values.tubemqMaster.component }}
annotations:
{{- toYaml .Values.tubemqMaster.service.annotations | nindent 4 }}
spec:
type: {{ .Values.tubemqMaster.service.type }}
{{- if and (eq .Values.tubemqMaster.service.type "ClusterIP") .Values.tubemqMaster.service.clusterIP }}
clusterIP: {{ .Values.tubemqMaster.service.clusterIP }}
{{- end }}
ports:
- name: mstr-web-port
protocol: TCP
port: {{ .Values.tubemqMaster.ports.webPort }}
targetPort: 8080
{{- if and (eq .Values.tubemqMaster.service.type "NodePort") .Values.tubemqMaster.service.webNodePort }}
nodePort: {{ .Values.tubemqMaster.service.webNodePort }}
{{- end }}
- name: mstr-help-port
protocol: TCP
port: {{ .Values.tubemqMaster.ports.helpPort }}
targetPort: 9001
- name: mstr-rpc-port
protocol: TCP
port: {{ .Values.tubemqMaster.ports.rpcPort }}
targetPort: 8715
{{- if and (eq .Values.tubemqMaster.service.type "LoadBalancer") .Values.tubemqMaster.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.tubemqMaster.service.loadBalancerIP }}
{{- end }}
{{- if and (eq .Values.tubemqMaster.service.type "ExternalName") .Values.tubemqMaster.service.externalName }}
externalName: {{ .Values.tubemqMaster.service.externalName }}
{{- end }}
{{- if .Values.tubemqMaster.service.externalIPs }}
externalIPs:
{{- toYaml .Values.tubemqMaster.service.externalIPs | nindent 4 }}
{{- end }}
selector:
{{- include "inlong.matchLabels" . | nindent 4 }}
component: {{ .Values.tubemqMaster.component }}
{{- end }}