Support topologySpreadConstraints for SGCluster
Problem to solve
Support topologySpreadConstraints
in the SGCluster
custom resource.
Proposal
Proposed section to map to .spec.template.spec.topologySpreadConstraints
section of generated StatefulSet
:
apiVersion: stackgres.io/v1
kind: SGCluster
spec:
pods:
scheduling:
topologySpreadConstraints: [ <object> ] # the same as https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#topologyspreadconstraint-v1-core
Acceptance Criteria
-
Implement the change in the SGCluster CRD -
Implement the change in the REST API -
Tests -
Documentation