aboutsummaryrefslogtreecommitdiff
path: root/script/helm/garage/templates/service.yaml
blob: 3721887227484837a1e29a145b3fad86baf5063f (plain) (blame)
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
apiVersion: v1
kind: Service
metadata:
  name: {{ include "garage.fullname" . }}
  labels:
    {{- include "garage.labels" . | nindent 4 }}
spec:
  type: {{ .Values.service.type }}
  ports:
    - port: {{ .Values.service.s3.api.port }}
      targetPort: 3900
      protocol: TCP
      name: s3-api
    - port: {{ .Values.service.s3.web.port }}
      targetPort: 3902
      protocol: TCP
      name: s3-web
  selector:
    {{- include "garage.selectorLabels" . | nindent 4 }}
{{- if .Values.monitoring.metrics.enabled }}
---
apiVersion: v1
kind: Service
metadata:
  name: {{ include "garage.fullname" . }}-metrics
  labels:
    {{- include "garage.labels" . | nindent 4 }}
  annotations:
    prometheus.io/scrape: "true"
spec:
  type: ClusterIP
  clusterIP: None
  ports:
    - port: 3903
      targetPort: 3903
      protocol: TCP
      name: metrics
  selector:
    {{- include "garage.selectorLabels" . | nindent 4 }}
{{- end }}