minio/helm/minio/templates/console-service.yaml

46 lines
1.8 KiB
YAML
Raw Normal View History

2023-04-17 08:04:15 +02:00
{{ $scheme := .Values.tls.enabled | ternary "https" "http" }}
2021-08-21 04:00:54 +05:30
apiVersion: v1
kind: Service
metadata:
name: {{ template "minio.fullname" . }}-console
labels:
app: {{ template "minio.name" . }}
chart: {{ template "minio.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
2023-04-17 08:04:15 +02:00
{{- if .Values.consoleService.annotations }}
annotations: {{- toYaml .Values.consoleService.annotations | nindent 4 }}
{{- end }}
2021-08-21 04:00:54 +05:30
spec:
type: {{ .Values.consoleService.type }}
{{- if and (eq .Values.consoleService.type "ClusterIP") .Values.consoleService.clusterIP }}
2021-08-21 04:00:54 +05:30
clusterIP: {{ .Values.consoleService.clusterIP }}
2023-04-17 08:04:15 +02:00
{{- end }}
{{- if or (eq .Values.consoleService.type "LoadBalancer") (eq .Values.consoleService.type "NodePort") }}
externalTrafficPolicy: {{ .Values.consoleService.externalTrafficPolicy | quote }}
{{- end }}
{{- if and (eq .Values.consoleService.type "LoadBalancer") .Values.consoleService.loadBalancerSourceRanges }}
loadBalancerSourceRanges: {{ .Values.consoleService.loadBalancerSourceRanges }}
{{ end }}
{{- if and (eq .Values.consoleService.type "LoadBalancer") (not (empty .Values.consoleService.loadBalancerIP)) }}
loadBalancerIP: {{ .Values.consoleService.loadBalancerIP }}
2023-04-17 08:04:15 +02:00
{{- end }}
2021-08-21 04:00:54 +05:30
ports:
- name: {{ $scheme }}
port: {{ .Values.consoleService.port }}
protocol: TCP
2023-04-17 08:04:15 +02:00
{{- if (and (eq .Values.consoleService.type "NodePort") ( .Values.consoleService.nodePort)) }}
2021-08-21 04:00:54 +05:30
nodePort: {{ .Values.consoleService.nodePort }}
2023-04-17 08:04:15 +02:00
{{- else }}
targetPort: {{ .Values.minioConsolePort }}
2023-04-17 08:04:15 +02:00
{{- end }}
{{- if .Values.consoleService.externalIPs }}
2021-08-21 04:00:54 +05:30
externalIPs:
2023-04-17 08:04:15 +02:00
{{- range $i , $ip := .Values.consoleService.externalIPs }}
- {{ $ip }}
{{- end }}
{{- end }}
2021-08-21 04:00:54 +05:30
selector:
app: {{ template "minio.name" . }}
release: {{ .Release.Name }}