diff --git a/alertmanager/argocd.yaml b/alertmanager/argocd.yaml index 0b4f9ac..14bc3a2 100644 --- a/alertmanager/argocd.yaml +++ b/alertmanager/argocd.yaml @@ -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 diff --git a/goldilocks/helm-values.yaml b/goldilocks/helm-values.yaml index 6fdd85a..5718862 100644 --- a/goldilocks/helm-values.yaml +++ b/goldilocks/helm-values.yaml @@ -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 diff --git a/kube-state-metrics/helm-values.yaml b/kube-state-metrics/helm-values.yaml index e517bee..6807665 100644 --- a/kube-state-metrics/helm-values.yaml +++ b/kube-state-metrics/helm-values.yaml @@ -3,6 +3,10 @@ fullnameOverride: kube-state-metrics +# replicaCount: 1 (default) +# Note: kube-state-metrics는 stateless이지만, 여러 replica는 동일한 메트릭을 중복 생성하므로 +# 단일 replica로 실행하는 것이 권장됩니다. + resources: requests: cpu: 15m diff --git a/loki/helm-values.yaml b/loki/helm-values.yaml index e31efc5..0695433 100644 --- a/loki/helm-values.yaml +++ b/loki/helm-values.yaml @@ -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: diff --git a/vpa/helm-values.yaml b/vpa/helm-values.yaml index b4715bf..221ffa6 100644 --- a/vpa/helm-values.yaml +++ b/vpa/helm-values.yaml @@ -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