From bd62af64cf7f673850b1d4d120614240d89eff5a Mon Sep 17 00:00:00 2001 From: Quirin Vetterl <140174674+qrnvttrl@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:09:41 +0200 Subject: [PATCH] increase ipam resilience (#98) --- charts/metal-control-plane/Chart.yaml | 2 +- .../metal-control-plane/templates/ipam.yaml | 23 +++++++++++++++++++ charts/metal-control-plane/values.yaml | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/charts/metal-control-plane/Chart.yaml b/charts/metal-control-plane/Chart.yaml index 871c2fd..8a133b7 100644 --- a/charts/metal-control-plane/Chart.yaml +++ b/charts/metal-control-plane/Chart.yaml @@ -3,4 +3,4 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for deploying the metal control plane in K8s name: metal-control-plane -version: 0.4.3 +version: 0.4.4 diff --git a/charts/metal-control-plane/templates/ipam.yaml b/charts/metal-control-plane/templates/ipam.yaml index 69a16d5..b79d427 100644 --- a/charts/metal-control-plane/templates/ipam.yaml +++ b/charts/metal-control-plane/templates/ipam.yaml @@ -4,6 +4,7 @@ kind: Deployment metadata: name: ipam spec: + replicas: {{ .Values.ipam.replicas }} selector: matchLabels: app: ipam @@ -16,6 +17,18 @@ spec: prometheus.io/path: /metrics prometheus.io/port: '2112' spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - ipam + topologyKey: kubernetes.io/hostname containers: - name: ipam args: @@ -71,3 +84,13 @@ spec: targetPort: 2112 selector: app: ipam +--- +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: ipam-pdb +spec: + minAvailable: 2 + selector: + matchLabels: + app: ipam \ No newline at end of file diff --git a/charts/metal-control-plane/values.yaml b/charts/metal-control-plane/values.yaml index 09d6682..2a138ed 100644 --- a/charts/metal-control-plane/values.yaml +++ b/charts/metal-control-plane/values.yaml @@ -126,6 +126,7 @@ metal_api: release_version: "" ipam: + replicas: 2 grpc_server_endpoint: "0.0.0.0:9090" log_level: "info" db_host: ""