38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
{{- $args := dict "ctx" $ "component" "store-gateway" "memberlist" true -}}
|
|
{{- $zonesMap := include "mimir.zoneAwareReplicationMap" $args | fromYaml -}}
|
|
{{- range $zoneName, $rolloutZone := $zonesMap }}
|
|
{{- with $ -}}
|
|
{{- $_ := set $args "rolloutZoneName" $zoneName -}}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "mimir.resourceName" $args }}
|
|
labels:
|
|
{{- include "mimir.labels" $args | nindent 4 }}
|
|
{{- if and $zoneName .Values.store_gateway.zoneAwareReplication.migration.enabled }}
|
|
# Prevent scraping PODs via this service during migration as the original non zone-aware service already scrapes all PODs and you get duplicate metrics.
|
|
prometheus.io/service-monitor: "false"
|
|
{{- end }}
|
|
{{- with .Values.store_gateway.service.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
annotations:
|
|
{{- toYaml .Values.store_gateway.service.annotations | nindent 4 }}
|
|
namespace: {{ .Release.Namespace | quote }}
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: {{ include "mimir.serverHttpListenPort" . }}
|
|
protocol: TCP
|
|
name: http-metrics
|
|
targetPort: http-metrics
|
|
- port: {{ include "mimir.serverGrpcListenPort" . }}
|
|
protocol: TCP
|
|
name: grpc
|
|
targetPort: grpc
|
|
selector:
|
|
{{- include "mimir.selectorLabels" $args | nindent 4 }}
|
|
|
|
---
|
|
{{ end }}
|
|
{{ end }} |