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.
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
{{- if .Values.service.annotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml .Values.service.annotations | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
labels:
|
|
|
|
app.kubernetes.io/name: {{ template "nginx.name" . }}
|
|
|
|
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
|
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
|
|
name: {{ template "nginx.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 | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.service.loadBalancerIP }}
|
|
|
|
loadBalancerIP: "{{ .Values.service.loadBalancerIP }}"
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.service.loadBalancerSourceRanges }}
|
|
|
|
loadBalancerSourceRanges:
|
|
|
|
{{- toYaml .Values.service.loadBalancerSourceRanges | nindent 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.kubernetes.io/name: {{ template "nginx.name" . }}
|
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|