aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/deploy/minio/templates/service.yaml
blob: 0799b287e9c1bafc7d4ec776b7f7dc120095c62e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
apiVersion: v1
kind: Service
metadata:
  name: {{ template "minio.fullname" . }}
  labels:
    app: {{ template "minio.name" . }}
    chart: {{ template "minio.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
{{- if .Values.service.annotations }}
  annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{- end }}
spec:
{{- if (or (eq .Values.service.type "ClusterIP" "") (empty .Values.service.type)) }}
  {{- if eq .Values.mode "distributed" }}
  clusterIP: None
  {{- else }}
  type: ClusterIP
  {{- end }}
  {{- if not (empty .Values.service.clusterIP) }}
  clusterIP: {{ .Values.service.clusterIP }}
  {{end}}
{{- else if eq .Values.service.type "LoadBalancer" }}
  type: {{ .Values.service.type }}
  loadBalancerIP: {{ default "" .Values.service.loadBalancerIP }}
{{- else }}
  type: {{ .Values.service.type }}
{{- end }}
  ports:
    - name: service
      port: 9000
      targetPort: {{ .Values.service.port }}
      protocol: TCP
{{- if (and (eq .Values.service.type "NodePort") ( .Values.service.nodePort)) }}
      nodePort: {{ .Values.service.nodePort }}
{{- end}}
{{- if .Values.service.externalIPs }}
  externalIPs:
{{- range $i , $ip := .Values.service.externalIPs }}
  - {{ $ip }}
{{- end }}
{{- end }}
  selector:
    app: {{ template "minio.name" . }}
    release: {{ .Release.Name }}