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
|
repository: ghcr.io/prymitive/karma
|
||||||
tag: v0.122
|
tag: v0.122
|
||||||
|
|
||||||
replicaCount: 1
|
replicaCount: 2
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
@@ -82,6 +82,16 @@ spec:
|
|||||||
- name: ALERTMANAGER_URI
|
- name: ALERTMANAGER_URI
|
||||||
value: "http://alertmanager.alertmanager.svc.cluster.local:9093"
|
value: "http://alertmanager.alertmanager.svc.cluster.local:9093"
|
||||||
|
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- weight: 100
|
||||||
|
podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: karma
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Dashboard configuration
|
# Dashboard configuration
|
||||||
dashboard:
|
dashboard:
|
||||||
enabled: true
|
enabled: true
|
||||||
replicaCount: 1
|
replicaCount: 2
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
@@ -52,3 +52,15 @@ controller:
|
|||||||
vpa:
|
vpa:
|
||||||
# Set to false since we're installing VPA separately
|
# Set to false since we're installing VPA separately
|
||||||
enabled: false
|
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
|
fullnameOverride: kube-state-metrics
|
||||||
|
|
||||||
|
# replicaCount: 1 (default)
|
||||||
|
# Note: kube-state-metrics는 stateless이지만, 여러 replica는 동일한 메트릭을 중복 생성하므로
|
||||||
|
# 단일 replica로 실행하는 것이 권장됩니다.
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 15m
|
cpu: 15m
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ deploymentMode: SingleBinary
|
|||||||
|
|
||||||
singleBinary:
|
singleBinary:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
# Note: Single Binary mode cannot run more than 1 replica without object storage backend
|
||||||
persistence:
|
persistence:
|
||||||
enabled: true
|
enabled: true
|
||||||
size: 5Gi # Reduced from 10Gi to save storage
|
size: 5Gi # Reduced from 10Gi to save storage
|
||||||
@@ -47,6 +48,7 @@ singleBinary:
|
|||||||
memory: 462Mi
|
memory: 462Mi
|
||||||
limits:
|
limits:
|
||||||
memory: 462Mi
|
memory: 462Mi
|
||||||
|
# Note: Affinity not needed for single replica
|
||||||
|
|
||||||
# Disable components not needed in single binary mode
|
# Disable components not needed in single binary mode
|
||||||
backend:
|
backend:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Recommender - recommends resource requests based on historical usage
|
# Recommender - recommends resource requests based on historical usage
|
||||||
recommender:
|
recommender:
|
||||||
enabled: true
|
enabled: true
|
||||||
replicaCount: 1
|
replicaCount: 2
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
@@ -25,3 +25,15 @@ admissionController:
|
|||||||
|
|
||||||
# Optional: Configure default VPA behavior
|
# Optional: Configure default VPA behavior
|
||||||
# metrics-server should be installed in the cluster
|
# 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