Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replica set with same names(id's) for redis-enterprise-operator in different namespaces #174

Open
saiharshitachava opened this issue May 27, 2021 · 8 comments

Comments

@saiharshitachava
Copy link

We have this rec installed on our kube cluster in two different namespaces but when we the replica set name of redis-enterprise-operator deployment..the rs names are same even the ID's ..IS this by design?

@laurentdroin
Copy link
Contributor

Hi,

I have just seen this on a customer deployment, and while I found it strange, I am not sure it would cause an issue. You will probably notice this for other replicasets as well.
What Kubernetes distribution are you using?

@saiharshitachava
Copy link
Author

@laurentdroin 1.16.7

We have lot of rs running in cluster no other rs have identical id's

@laurentdroin
Copy link
Contributor

@saiharshitachava What "flavor" of k8s is it? Openshift? Rancher? GKE?

@saiharshitachava
Copy link
Author

Its open source cluster

@laurentdroin
Copy link
Contributor

I was looking into it and it's possible that the ID used comes from the "pod-template-hash". And so it's possible that if different RS have the same contents, they will have the same ID. I am checking this.
I don't imagine it would cause any issue though.

@saiharshitachava
Copy link
Author

sure @laurentdroin please update the thread if you find something

@laurentdroin
Copy link
Contributor

From https://kubernetes.io/docs/concepts/workloads/controllers/_print/

Notice that the name of the ReplicaSet is always formatted as [DEPLOYMENT-NAME]-[RANDOM-STRING]. The random string is randomly generated and uses the pod-template-hash as a seed.

and

The pod-template-hash label is added by the Deployment controller to every ReplicaSet that a Deployment creates or adopts.
This label ensures that child ReplicaSets of a Deployment do not overlap. It is generated by hashing the PodTemplate of the ReplicaSet and using the resulting hash as the label value that is added to the ReplicaSet selector, Pod template labels, and in any existing Pods that the ReplicaSet might have.

So it should be all good.

@laurentdroin
Copy link
Contributor

In my case, the "RANDOM-STRING" seems to be the pod template hash, and not a random number using that hash as the seed so I am still not completely sure what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants