12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- apiVersion: v1
- kind: Service
- metadata:
- name: {{ include "dolphinscheduler.fullname" . }}-api
- labels:
- app.kubernetes.io/name: {{ include "dolphinscheduler.fullname" . }}-api
- {{- include "dolphinscheduler.common.labels" . | nindent 4 }}
- {{- if and (eq .Values.api.service.type "LoadBalancer") .Values.api.service.annotations }}
- annotations:
- {{- range $key, $value := .Values.api.service.annotations }}
- {{ $key }}: {{ $value | quote }}
- {{- end }}
- {{- end }}
- spec:
- type: {{ .Values.api.service.type }}
- {{- if and (eq .Values.api.service.type "ClusterIP") .Values.api.service.clusterIP }}
- clusterIP: {{ .Values.api.service.clusterIP }}
- {{- end }}
- ports:
- - port: 12345
- targetPort: api-port
- {{- if and (eq .Values.api.service.type "NodePort") .Values.api.service.nodePort }}
- nodePort: {{ .Values.api.service.nodePort }}
- {{- end }}
- protocol: TCP
- name: api-port
- - port: 25333
- targetPort: python-api-port
- {{- if and (eq .Values.api.service.type "NodePort") .Values.api.service.nodePort }}
- nodePort: {{ .Values.api.service.nodePort }}
- {{- end }}
- protocol: TCP
- name: python-api-port
- {{- if .Values.api.service.externalIPs }}
- externalIPs:
- {{- toYaml .Values.api.service.externalIPs | nindent 4 }}
- {{- end }}
- {{- if and (eq .Values.api.service.type "ExternalName") .Values.api.service.externalName }}
- externalName: {{ .Values.api.service.externalName }}
- {{- end }}
- {{- if and (eq .Values.api.service.type "LoadBalancer") .Values.api.service.loadBalancerIP }}
- loadBalancerIP: {{ .Values.api.service.loadBalancerIP }}
- {{- end }}
- selector:
- {{- include "dolphinscheduler.api.labels" . | nindent 4 }}
|