From fd1548c70c5b6971bf6cd02811bc954c9e5f7f08 Mon Sep 17 00:00:00 2001 From: Mayne0213 Date: Thu, 8 Jan 2026 12:46:58 +0900 Subject: [PATCH] FEAT(applications): enable HA with replica 2 and soft anti-affinity - Add replicaCount: 2 to docusaurus, headlamp, homer, mas, umami - Add soft pod anti-affinity for node distribution - Enable high availability across multiple nodes --- docusaurus/helm-values.yaml | 11 +++++++++++ headlamp/helm-values.yaml | 13 ++++++++++++- homer/helm-values.yaml | 11 +++++++++++ mas/helm-values.yaml | 11 +++++++++++ umami/helm-values.yaml | 13 ++++++++++++- 5 files changed, 57 insertions(+), 2 deletions(-) diff --git a/docusaurus/helm-values.yaml b/docusaurus/helm-values.yaml index 6ceed30..152b746 100644 --- a/docusaurus/helm-values.yaml +++ b/docusaurus/helm-values.yaml @@ -3,6 +3,7 @@ controllers: main: + replicaCount: 2 annotations: docusaurus/source-hash: "2024-12-30-v1" initContainers: @@ -55,6 +56,16 @@ controllers: port: 80 initialDelaySeconds: 5 periodSeconds: 5 + # Affinity - Soft Anti-Affinity to spread pods across nodes + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: docusaurus + topologyKey: kubernetes.io/hostname service: main: diff --git a/headlamp/helm-values.yaml b/headlamp/helm-values.yaml index f3c5cc5..c361b04 100644 --- a/headlamp/helm-values.yaml +++ b/headlamp/helm-values.yaml @@ -1,6 +1,6 @@ # Headlamp Helm Values -replicaCount: 1 +replicaCount: 2 image: registry: ghcr.io @@ -52,3 +52,14 @@ config: name: headlamp-oidc extraArgs: - -oidc-skip-tls-verify + +# Affinity - Soft Anti-Affinity to spread pods across nodes +affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: headlamp + topologyKey: kubernetes.io/hostname diff --git a/homer/helm-values.yaml b/homer/helm-values.yaml index 938ba92..31c219b 100644 --- a/homer/helm-values.yaml +++ b/homer/helm-values.yaml @@ -3,6 +3,7 @@ controllers: main: + replicaCount: 2 initContainers: copy-homer-files: image: @@ -39,6 +40,16 @@ controllers: memory: 100Mi limits: memory: 150Mi + # Affinity - Soft Anti-Affinity to spread pods across nodes + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: homer + topologyKey: kubernetes.io/hostname service: main: diff --git a/mas/helm-values.yaml b/mas/helm-values.yaml index 1430600..aae4cfd 100644 --- a/mas/helm-values.yaml +++ b/mas/helm-values.yaml @@ -12,6 +12,7 @@ serviceAccount: controllers: main: + replicaCount: 2 strategy: RollingUpdate rollingUpdate: unavailable: 0 @@ -76,6 +77,16 @@ controllers: port: 8000 initialDelaySeconds: 0 periodSeconds: 5 + # Affinity - Soft Anti-Affinity to spread pods across nodes + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: mas + topologyKey: kubernetes.io/hostname service: main: diff --git a/umami/helm-values.yaml b/umami/helm-values.yaml index 199dbdc..f2c8c9c 100644 --- a/umami/helm-values.yaml +++ b/umami/helm-values.yaml @@ -44,7 +44,7 @@ resources: limits: memory: 576Mi -replicaCount: 1 +replicaCount: 2 # Autoscaling autoscaling: @@ -77,3 +77,14 @@ readinessProbe: port: 3000 initialDelaySeconds: 0 periodSeconds: 5 + +# Affinity - Soft Anti-Affinity to spread pods across nodes +affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: umami + topologyKey: kubernetes.io/hostname