mirror of
https://github.com/bitnami/charts.git
synced 2026-03-06 06:58:50 +08:00
31 lines
1.3 KiB
YAML
31 lines
1.3 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "common.names.fullname" . }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
|
app.kubernetes.io/component: %%COMPONENT_NAME%%
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
type: {{ .Values.service.type }}
|
|
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
|
|
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
|
|
{{- end }}
|
|
{{ if eq .Values.service.type "LoadBalancer" }}
|
|
loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }}
|
|
{{ end }}
|
|
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
|
|
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
|
{{- end }}
|
|
ports:
|
|
- name: %%PORT_NAME%%
|
|
port: foo
|
|
protocol: bar
|
|
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
|
app.kubernetes.io/component: %%COMPONENT_NAME%%
|