|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-worker-headless
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-worker-headless
|
|
|
|
{{- include "dolphinscheduler.common.labels" . | nindent 4 }}
|
|
|
|
{{- if .Values.worker.service.annotations }}
|
|
|
|
annotations: {{- toYaml .Values.worker.service.annotations | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
clusterIP: "None"
|
|
|
|
ports:
|
|
|
|
- port: 1234
|
|
|
|
targetPort: worker-port
|
|
|
|
protocol: TCP
|
|
|
|
name: worker-port
|
|
|
|
- port: 1235
|
|
|
|
targetPort: actuator-port
|
|
|
|
protocol: TCP
|
|
|
|
name: actuator-port
|
|
|
|
selector:
|
|
|
|
{{- include "dolphinscheduler.worker.labels" . | nindent 4 }}
|
|
|
|
|
|
|
|
---
|
|
|
|
{{- if .Values.worker.service.serviceMonitor.enabled }}
|
|
|
|
apiVersion: monitoring.coreos.com/v1
|
|
|
|
kind: ServiceMonitor
|
|
|
|
metadata:
|
|
|
|
name: {{ include "dolphinscheduler.fullname" . }}-worker
|
|
|
|
namespace: {{ .Release.Namespace }}
|
|
|
|
labels:
|
|
|
|
{{- include "dolphinscheduler.common.labels" . | nindent 4 }}
|
|
|
|
{{- if .Values.worker.service.serviceMonitor.labels }}
|
|
|
|
{{- toYaml .Values.worker.service.serviceMonitor.labels | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.worker.service.serviceMonitor.annotations }}
|
|
|
|
annotations: {{- toYaml .Values.worker.service.serviceMonitor.annotations | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
namespaceSelector:
|
|
|
|
matchNames:
|
|
|
|
- {{ .Values.worker.service.serviceMonitor.namespace | default .Release.Namespace }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-worker-headless
|
|
|
|
{{- include "dolphinscheduler.common.labels" . | nindent 6 }}
|
|
|
|
endpoints:
|
|
|
|
- scheme: http
|
|
|
|
targetPort: actuator-port
|
|
|
|
path: {{ .Values.worker.service.serviceMonitor.path }}
|
|
|
|
interval: {{ .Values.worker.service.serviceMonitor.interval }}
|
|
|
|
{{- end }}
|