Closed therapy-lf closed 2 years ago
Unfortunately we've designed it to run with one operator per namespace. You can propose an argument that would change the behavior in the case of an operator that would handle it at the cluster level but you would need to ensure that there is a kuttl test that validates the expected behavior
@therapy-lf did you see my comment ?
Closing this issue as I didn't get any feedback so far
Bug Report
What did you do? If the operator is running with cluster scope it can't properly resolve pod hostnames in other namespaces.
What did you expect to see? Pod
hostname
should contain namespace(e.g.cassandra-<rack>.<cluster-name>.<namespace>
instead ofcassandra-<rack>.<cluster-name>
).What did you see instead? Under which circumstances? Pods are running but it seems the operator couldn't fetch information about the clusters/racks:
Environment
casskop version: 2.1.0
go version: go1.17.8
Kubernetes version information: 1.22.7
Kubernetes cluster kind: k3s
Cassandra version: 4.0.0
Possible Solution Here in: https://github.com/cscetbon/casskop/blob/a66f86eeca832876281b40b5d3ed820b4599a361/pkg/k8s/util.go#L210-L212
pod.Spec.Subdomain
will not include namespace suffix. Add an ability to handle cluster scope by adding namespace suffix to pod hostname in case it's running not in the operator's namespace.Additional context We're trying to launch multiple cassandra clusters in their namespaces but want to avoid overhead on running operators in each namespace, moreover, they might conflict with each other.