From 861bb04d25fa0578577e847b61cf5d3a6f73a8c9 Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Mon, 19 May 2025 15:38:41 +0200 Subject: [PATCH] fix(deployment): Bind pod on master db node --- manifests/deployment.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/manifests/deployment.yaml b/manifests/deployment.yaml index 49f99c4..79f4eb8 100644 --- a/manifests/deployment.yaml +++ b/manifests/deployment.yaml @@ -13,6 +13,20 @@ spec: labels: app: dawarich spec: + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExection: + - labelSelector: + matchExpressions: + - key: cnpg.io/cluster + operator: In + values: + - dawarich-db + - key: cnpg.io/instanceRole + operator: In + values: + - primary + topologyKey: "kubernetes.io/hostname" containers: - name: dawarich image: freikin/dawarich:0.26.3