kubeasz/manifests/es-cluster/elasticsearch/templates/client-svc.yaml

40 lines
1.1 KiB
YAML

apiVersion: v1
kind: Service
metadata:
labels:
app: {{ template "elasticsearch.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: "{{ .Values.client.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "elasticsearch.client.fullname" . }}
{{- if .Values.client.serviceAnnotations }}
annotations:
{{ toYaml .Values.client.serviceAnnotations | indent 4 }}
{{- end }}
spec:
ports:
- name: http
port: 9200
targetPort: 9200
nodePort: 29200
- name: tcp
port: 9300
targetPort: 9300
nodePort: 29300
selector:
app: {{ template "elasticsearch.name" . }}
component: "{{ .Values.client.name }}"
release: {{ .Release.Name }}
type: {{ .Values.client.serviceType }}
{{- if .Values.client.loadBalancerIP }}
loadBalancerIP: "{{ .Values.client.loadBalancerIP }}"
{{- end }}
{{if .Values.client.loadBalancerSourceRanges}}
loadBalancerSourceRanges:
{{range $rangeList := .Values.client.loadBalancerSourceRanges}}
- {{ $rangeList }}
{{end}}
{{end}}