samba-in-kubernetes / samba-operator

An operator for a Samba as a service on PVCs in kubernetes
Apache License 2.0
103 stars 24 forks source link

How to configure node selector if using a mixed K8S #283

Closed RonnyRen closed 1 year ago

RonnyRen commented 1 year ago

Hi All, Our Kubernetes cluster is mixed with Linux nodes and Windows nodes, After deploying samba-operator successfully, I created a SMBShare, the new deployment was running on a Windows node and error happened. I have to change the node selector to a Linux node and then it is running, I also need to update PVC if default storage class uses local-path provisioner. I didn't find anything related to this in the document, how can I run it in mixed cluster? Could you please give some suggestion? Thanks in advance.

Thanks, Ronny

phlogistonjohn commented 1 year ago

Thank you for the report. Unfortunately, that is not something we've implemented yet.

We should probably default our deplyments/etc to always request linux nodes. I also have plans to add more advanced node selection/affinity/etc rules to the SmbCommonConfig.

I'll try to look into this soon, thanks!

phlogistonjohn commented 1 year ago

@RonnyRen I just pushed a new pr - #291 - to implement this using settings in our SmbCommonConfig CR. Even if you don't read Go, the last patch adds a doc update. Feel free to take a look and let us know if this meets your use case. Thanks!