Provide a way to relabel controllers and their pods #36897
Closed
Description
Currently, the deployment controller relabels replica sets and pods when it needs to adopt a replica set for a deployment. It would be more convenient to have a replica set endpoint that would force the replica set controller to do all the relabeling (change pod template labels, update old pods, change selector). The implementation should be similar to how the rollback spec works for Deployments.
It would help:
- users that want to change their selectors but have no good way to relabel old pods. We are adding
kubectl set selector
in Add new command "kubectl set selector" #28949 enabled only for services. Eventually, we could enable it for controllers by using the new endpoint. - in dropping the pod update permission from the deployment controller and move any logic around pods one level down to replica sets (deployments should operate only on replica sets).
@kubernetes/api-review-team @kubernetes/sig-api-machinery @ncdc @liggitt @bgrant0607