Basically if we have a RedisCluster{Name: Foo, Namespace: Bar} and another one RedisCluster{Name: Foo, Namespace: Baz}, the controller will attempt to manage their combined pods together.
// GetRedisClusterPods return list of Pod attached to a RedisCluster
func (p *RedisClusterControl) GetRedisClusterPods(redisCluster *rapi.RedisCluster) ([]*kapiv1.Pod, error) {
selector, err := CreateRedisClusterLabelSelector(redisCluster)
if err != nil {
return nil, err
}
return p.PodLister.List(selector)
}
I don't see any reference to namespace in the selector itself, or here. So my best guess is that this function is returning all redis pods across the 2 example namespaces.
Basically if we have a RedisCluster{Name: Foo, Namespace: Bar} and another one RedisCluster{Name: Foo, Namespace: Baz}, the controller will attempt to manage their combined pods together.
Source of this might be here: https://github.com/AmadeusITGroup/Redis-Operator/blob/b165194f4f4c56843815e664eae5342714a9ce9d/pkg/controller/pod/control.go#L58
I don't see any reference to namespace in the selector itself, or here. So my best guess is that this function is returning all redis pods across the 2 example namespaces.