From 415180048a5f43a25581538a96910cb4ca57e6c4 Mon Sep 17 00:00:00 2001 From: Michael Banck Date: Wed, 21 Jul 2021 08:35:51 +0200 Subject: [PATCH] Add selector to StatefulSet definition (#2011) This adds the `selector` to the Patroni Kubernetes StatefulSet spec Without it, one gets errors like ``` error: error validating "patroni_k8s.yaml": error validating data: ValidationError(StatefulSet.spec): missing required field "selector" in io.k8s.api.apps.v1.StatefulSetSpec; if you choose to ignore these errors, turn validation off with --validate=false ``` (as mentioned in #1867) --- kubernetes/patroni_k8s.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kubernetes/patroni_k8s.yaml b/kubernetes/patroni_k8s.yaml index 71d03c53..9d34893c 100644 --- a/kubernetes/patroni_k8s.yaml +++ b/kubernetes/patroni_k8s.yaml @@ -20,6 +20,10 @@ metadata: spec: replicas: 3 serviceName: *cluster_name + selector: + matchLabels: + application: patroni + cluster-name: *cluster_name template: metadata: labels: