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