Closed Qwerios closed 5 years ago
yes, also think that would be better to recover in case of complete node failure.
Added a template
parameter to the pod spec, so now possible to set anti affinity policy for example:
---
apiVersion: "streaming.nats.io/v1alpha1"
kind: "NatsStreamingCluster"
metadata:
name: "example-stan-anti"
spec:
size: 3
natsSvc: "example-nats"
# Define Custom Pod Spec
template:
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: stan_cluster
operator: In
values:
- example-stan-anti
topologyKey: kubernetes.io/hostname
Assuming this will become available with a new release. Checked the current master deployment.yaml and it is pointing to the current version I have. Will monitor this repo and its docs for when it becomes available.
I noticed after running the operator that sometimes the streaming pods would end up on the same node. I prefer spreading pods across multiple nodes in case of a rare node failure.
This is the yaml I usually add to either my deployment or pod yamls:
Is this something that could be of use for the operator?