mirror of
https://github.com/bitnami/charts.git
synced 2026-03-01 06:58:20 +08:00
24 lines
944 B
YAML
24 lines
944 B
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "node.fullname" . }}
|
|
labels: {{- include "node.labels" . | nindent 4 }}
|
|
{{- if .Values.service.annotations }}
|
|
annotations: {{- include "node.tplValue" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
type: {{ .Values.service.type }}
|
|
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }}
|
|
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
|
{{- end }}
|
|
ports:
|
|
- name: http
|
|
port: {{ .Values.service.port }}
|
|
targetPort: http
|
|
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort)) }}
|
|
nodePort: {{ .Values.service.nodePort }}
|
|
{{- else if eq .Values.service.type "ClusterIP" }}
|
|
nodePort: null
|
|
{{- end }}
|
|
selector: {{- include "node.matchLabels" . | nindent 4 }}
|