mirror of
https://github.com/minio/minio.git
synced 2025-02-21 10:32:30 -05:00
46 lines
1.8 KiB
YAML
46 lines
1.8 KiB
YAML
{{ $scheme := .Values.tls.enabled | ternary "https" "http" }}
|
|
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 }}
|
|
{{- if .Values.consoleService.annotations }}
|
|
annotations: {{- toYaml .Values.consoleService.annotations | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
type: {{ .Values.consoleService.type }}
|
|
{{- if and (eq .Values.consoleService.type "ClusterIP") .Values.consoleService.clusterIP }}
|
|
clusterIP: {{ .Values.consoleService.clusterIP }}
|
|
{{- 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 }}
|
|
{{- end }}
|
|
ports:
|
|
- name: {{ $scheme }}
|
|
port: {{ .Values.consoleService.port }}
|
|
protocol: TCP
|
|
{{- if (and (eq .Values.consoleService.type "NodePort") ( .Values.consoleService.nodePort)) }}
|
|
nodePort: {{ .Values.consoleService.nodePort }}
|
|
{{- else }}
|
|
targetPort: {{ .Values.minioConsolePort }}
|
|
{{- end }}
|
|
{{- if .Values.consoleService.externalIPs }}
|
|
externalIPs:
|
|
{{- range $i , $ip := .Values.consoleService.externalIPs }}
|
|
- {{ $ip }}
|
|
{{- end }}
|
|
{{- end }}
|
|
selector:
|
|
app: {{ template "minio.name" . }}
|
|
release: {{ .Release.Name }}
|