dgraph-operator-archive
dgraph-operator-archive copied to clipboard
k8s: add pod affinity term to dgraph component pods
To test out the anti-affinity specification you can run a trial cluster using kind.
$ kind create cluster
Run dgraph-operator with the configured kubeconfig
$ ./dgraph-operator --kubecfg-path ~/.kube/config
Create test cluster from the provided test manifests
# To configure dummy persistence volumes for zero and alpha.
$ kubectl apply -f tests/manifests/pv.yaml
$ kubectl apply -f tests/manifests/valid-dgraph-cluster-without-ratel.yaml
Check the stateful set configuration for the configured pod anti affinities.
$ kubectl get statefulsets
NAME READY AGE
xxxx-dgraph-test-cluster-alpha 3/3 29m
xxxx-dgraph-test-cluster-zero 3/3 29m
$ kubectl get statefulsets xxxx-dgraph-test-cluster-zero -o yaml | grep -n7 affinity
This YAML configuration will show the affinities configured for statefulsets pods similar to that of dgraph-ha kubernetes configuration
Hey Daniel! I have updated the pull request description.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.