Skip to content

Provide a way to relabel controllers and their pods #36897

Closed
@0xmichalis

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

Metadata

Assignees

No one assigned

    Labels

    area/workload-api/replicasetlifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/backlogHigher priority than priority/awaiting-more-evidence.sig/appsCategorizes an issue or PR as relevant to SIG Apps.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions