mirror of https://github.com/helm/helm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
{{- if .Values.service.annotations }}
|
|
annotations:
|
|
{{ toYaml .Values.service.annotations | indent 4 }}
|
|
{{- end }}
|
|
labels:
|
|
app: {{ template "name" . }}
|
|
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
|
heritage: {{ .Release.Service }}
|
|
release: {{ .Release.Name }}
|
|
name: {{ template "fullname" . }}
|
|
spec:
|
|
# Provides options for the service so chart users have the full choice
|
|
type: "{{ .Values.service.type }}"
|
|
clusterIP: "{{ .Values.service.clusterIP }}"
|
|
{{- if .Values.service.externalIPs }}
|
|
externalIPs:
|
|
{{ toYaml .Values.service.externalIPs | indent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.service.loadBalancerIP }}
|
|
loadBalancerIP: "{{ .Values.service.loadBalancerIP }}"
|
|
{{- end }}
|
|
{{- if .Values.service.loadBalancerSourceRanges }}
|
|
loadBalancerSourceRanges:
|
|
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
port: {{ .Values.service.port }}
|
|
protocol: TCP
|
|
targetPort: http
|
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
|
|
nodePort: {{ .Values.service.nodePort }}
|
|
{{- end }}
|
|
selector:
|
|
app: {{ template "name" . }}
|
|
release: {{ .Release.Name }}
|