Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • OnGres Inc.OnGres Inc.
  • StackGresStackGres
  • Issues
  • #598

Add node affinity support for SG pods

Problem to solve

Some users might need more complex methods to schelude pods that what can't be done using node selectors (see #184 (closed))

Proposal

Add to SGCluster in the scheduling property of the pods a node affinity property.

apiVersion: stackgres.io/v1beta1
kind: SGCluster
spec:
  pods:
    scheduling:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: kubernetes.io/e2e-az-name
            operator: In
            values:
            - e2e-az1
            - e2e-az2

This new node affinity should to all stackgres pods that contains a database node.

Links / references

  • https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
Edited Jun 10, 2021 by Xavier Sierra
Assignee
Assign to
Time tracking