FEAT(observability): enable HA with replica 2 and soft anti-affinity
- Add replicaCount: 2 to goldilocks, vpa, alertmanager - Add replicas: 2 to loki singleBinary - Add soft pod anti-affinity for node distribution - Keep kube-state-metrics at replica 1 to prevent duplicate metrics FIX(loki): revert to replica 1 for Single Binary mode - Single Binary mode cannot run more than 1 replica without object storage - Remove affinity configuration for single replica - Keep filesystem storage backend
This commit is contained in:
@@ -65,7 +65,7 @@ spec:
|
||||
repository: ghcr.io/prymitive/karma
|
||||
tag: v0.122
|
||||
|
||||
replicaCount: 1
|
||||
replicaCount: 2
|
||||
|
||||
resources:
|
||||
requests:
|
||||
@@ -82,6 +82,16 @@ spec:
|
||||
- name: ALERTMANAGER_URI
|
||||
value: "http://alertmanager.alertmanager.svc.cluster.local:9093"
|
||||
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: karma
|
||||
topologyKey: kubernetes.io/hostname
|
||||
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Dashboard configuration
|
||||
dashboard:
|
||||
enabled: true
|
||||
replicaCount: 1
|
||||
replicaCount: 2
|
||||
|
||||
resources:
|
||||
requests:
|
||||
@@ -52,3 +52,15 @@ controller:
|
||||
vpa:
|
||||
# Set to false since we're installing VPA separately
|
||||
enabled: false
|
||||
|
||||
# Affinity - Soft Anti-Affinity to spread pods across nodes
|
||||
dashboard:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: goldilocks
|
||||
topologyKey: kubernetes.io/hostname
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
fullnameOverride: kube-state-metrics
|
||||
|
||||
# replicaCount: 1 (default)
|
||||
# Note: kube-state-metrics는 stateless이지만, 여러 replica는 동일한 메트릭을 중복 생성하므로
|
||||
# 단일 replica로 실행하는 것이 권장됩니다.
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 15m
|
||||
|
||||
@@ -37,6 +37,7 @@ deploymentMode: SingleBinary
|
||||
|
||||
singleBinary:
|
||||
replicas: 1
|
||||
# Note: Single Binary mode cannot run more than 1 replica without object storage backend
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 5Gi # Reduced from 10Gi to save storage
|
||||
@@ -47,6 +48,7 @@ singleBinary:
|
||||
memory: 462Mi
|
||||
limits:
|
||||
memory: 462Mi
|
||||
# Note: Affinity not needed for single replica
|
||||
|
||||
# Disable components not needed in single binary mode
|
||||
backend:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# Recommender - recommends resource requests based on historical usage
|
||||
recommender:
|
||||
enabled: true
|
||||
replicaCount: 1
|
||||
replicaCount: 2
|
||||
|
||||
resources:
|
||||
requests:
|
||||
@@ -25,3 +25,15 @@ admissionController:
|
||||
|
||||
# Optional: Configure default VPA behavior
|
||||
# metrics-server should be installed in the cluster
|
||||
|
||||
# Affinity - Soft Anti-Affinity to spread pods across nodes
|
||||
recommender:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app: vpa-recommender
|
||||
topologyKey: kubernetes.io/hostname
|
||||
|
||||
Reference in New Issue
Block a user