mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-12 23:36:52 +00:00
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "garage.fullname" . }}
|
|
labels:
|
|
{{- include "garage.labels" . | nindent 4 }}
|
|
{{- with .Values.service.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
type: {{ .Values.service.type }}
|
|
ports:
|
|
- port: {{ .Values.service.s3.api.port }}
|
|
targetPort: {{ include "garage.portFromBindAddr" .Values.garage.s3.api.bindAddr | int }}
|
|
protocol: TCP
|
|
name: s3-api
|
|
- port: {{ .Values.service.s3.web.port }}
|
|
targetPort: {{ include "garage.portFromBindAddr" .Values.garage.s3.web.bindAddr | int }}
|
|
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: {{ include "garage.portFromBindAddr" .Values.garage.admin.apiBindAddr | int }}
|
|
targetPort: {{ include "garage.portFromBindAddr" .Values.garage.admin.apiBindAddr | int }}
|
|
protocol: TCP
|
|
name: metrics
|
|
selector:
|
|
{{- include "garage.selectorLabels" . | nindent 4 }}
|
|
{{- end }}
|