mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
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)
This commit is contained in:
@@ -20,6 +20,10 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
serviceName: *cluster_name
|
serviceName: *cluster_name
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
application: patroni
|
||||||
|
cluster-name: *cluster_name
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
Reference in New Issue
Block a user