Files
m3db-vke-setup/05-m3coordinator.yaml
2026-03-31 08:28:16 -04:00

118 lines
3.4 KiB
YAML

##############################################################################
# M3 Coordinator — Deployment
# Stateless query/write layer — Prometheus remote_write & remote_read target
# This is what Grafana and Prometheus talk to (replaces Mimir endpoints)
##############################################################################
apiVersion: apps/v1
kind: Deployment
metadata:
name: m3coordinator
namespace: m3db
labels:
app.kubernetes.io/name: m3coordinator
app.kubernetes.io/part-of: m3db
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: m3coordinator
template:
metadata:
labels:
app.kubernetes.io/name: m3coordinator
app.kubernetes.io/part-of: m3db
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "7203"
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- m3coordinator
topologyKey: kubernetes.io/hostname
containers:
- name: m3coordinator
image: quay.io/m3db/m3coordinator:v1.5.0
imagePullPolicy: IfNotPresent
args:
- "-f"
- "/etc/m3coordinator/m3coordinator.yml"
ports:
- containerPort: 7201
name: api
protocol: TCP
- containerPort: 7203
name: metrics
protocol: TCP
volumeMounts:
- name: config
mountPath: /etc/m3coordinator
- name: cache-dir
mountPath: /var/lib/m3kv
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: "1"
memory: 2Gi
livenessProbe:
httpGet:
path: /api/v1/services/m3db/health
port: 7201
initialDelaySeconds: 15
periodSeconds: 10
readinessProbe:
httpGet:
path: /api/v1/services/m3db/health
port: 7201
initialDelaySeconds: 10
periodSeconds: 5
volumes:
- name: config
configMap:
name: m3coordinator-config
- name: cache-dir
emptyDir: {}
---
##############################################################################
# M3 Coordinator Service
# Endpoints for Prometheus remote_write / remote_read / Grafana
#
# remote_write → http://m3coordinator.m3db.svc.cluster.local:7201/api/v1/prom/remote/write
# remote_read → http://m3coordinator.m3db.svc.cluster.local:7201/api/v1/prom/remote/read
# query (Grafana Prometheus datasource) → http://m3coordinator.m3db.svc.cluster.local:7201
##############################################################################
apiVersion: v1
kind: Service
metadata:
name: m3coordinator
namespace: m3db
labels:
app.kubernetes.io/name: m3coordinator
app.kubernetes.io/part-of: m3db
spec:
type: ClusterIP
ports:
- name: api
port: 7201
targetPort: 7201
protocol: TCP
- name: metrics
port: 7203
targetPort: 7203
protocol: TCP
selector:
app.kubernetes.io/name: m3coordinator