-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Validate no replicationController overlap. #2210
Comments
Hmm, fierce fighting. I'll take a look. |
cc @davidopp |
Since I'm working on refactoring replication controller to use generic etcd, is this something we want for v1? |
related #11990 to clarify the current state of things |
fyi #35298 |
I think overlapping controllers is an obsolete topic with the introduction of owner references in 1.6. |
My understanding is that ControllerRef was about protecting the system if the user creates overlapping controllers, but we still don't want the user to do that. If that's the case, we may still want to consider some mechanism for discouraging it. |
@enisoc seems kubectl still only uses selector to find matching pods, result in confusing outputs $ kubectl describe rs replicaset-2
Name: replicaset-2
Namespace: default
Selector: environment=prod
Labels: environment=prod
Annotations: <none>
Replicas: 2 current / 2 desired
Pods Status: 3 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
Labels: environment=prod
Containers:
created-from-replicaset:
Image: nginx
Port:
Environment: <none>
Mounts: <none>
Volumes: <none>
Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
5m 5m 1 replicaset-controller Normal SuccessfulCreate Created pod: replicaset-2-39szb
5m 5m 1 replicaset-controller Normal SuccessfulCreate Created pod: replicaset-2-470jr It reports three running pods (another one being managed via another controller with the same selector), should we add more option while listing? options := metav1.ListOptions{LabelSelector: selector.String()} |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
ownerReferences is the solution to this. |
What happens when you make two replication controllers with the same selector, and different number of replicas? Do they battle it out, killing and starting pods.
Consider a validation that makes sure that selectors are disjoint.
@bgrant0607 assures me that this is possible, and that the label/selector semantics are carefully crafted to make just this sort of check possible.
The text was updated successfully, but these errors were encountered: