Files
sa-charts/elasticsearch/templates/master-svc.yaml
marsal wang de34586660 es mongodb
2021-12-24 15:55:52 +08:00

28 lines
1.2 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ include "elasticsearch.master.fullname" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: master
annotations: {{ include "common.tplvalues.render" ( dict "value" .Values.master.service.annotations "context" $) | nindent 4 }}
spec:
type: {{ .Values.master.service.type | quote }}
{{- if and (eq .Values.master.service.type "LoadBalancer") (not (empty .Values.master.service.loadBalancerIP)) }}
loadBalancerIP: {{ .Values.master.service.loadBalancerIP }}
{{- end }}
publishNotReadyAddresses: true
ports:
- name: http
port: 9200
targetPort: http
- name: tcp-transport
port: {{ .Values.master.service.port }}
targetPort: transport
{{- if and (or (eq .Values.master.service.type "NodePort") (eq .Values.master.service.type "LoadBalancer")) (not (empty .Values.master.service.nodePort)) }}
nodePort: {{ .Values.master.service.nodePort }}
{{- else if eq .Values.master.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: master