I would like to rollback the deployment to a particular revision( rollout history) using client-go(6.0.0) library of k8s. I created a deployment using workload API object apps/v1beta2 . Seems in apps/v1beta2 there is no ".spec.rollbackTo options". Where can i find the options to rollback to particular revision using client-go(6.0.0) library.
/cc @janetkuo
Ref my previous response in https://github.com/kubernetes/kubernetes/pull/59970#discussion_r169758147:
Because apps/v1 endpoint doesn't support .spec.rollbackTo, you'll need to implement the logic yourself:
The rollback logic currently lives in Deployment controller code, which still uses extensions/v1beta1 Deployment client:
https://github.com/kubernetes/kubernetes/blob/17fec00b8915dbffac40b9eb481516a66092ef3e/pkg/controller/deployment/rollback.go#L30-L69
Note that we _didn't_ remove rollback support because it should be done client-side. We removed rollback because we wanted to change how it's implemented server-side (i.e. with extensions/v1beta1 API, the Deployment controller mutates DeploymentSpec during rollback) and wanted to revisit it in the future. If we didn't remove rollback in apps/v1, it'd be very difficult to make that change in the future.
Does it means the struct DeploymentRollback and RollbackConfig is no more needed or existing? @janetkuo
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
@fejta-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue with/reopen.
Mark the issue as fresh with/remove-lifecycle rotten.Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Most helpful comment
Ref my previous response in https://github.com/kubernetes/kubernetes/pull/59970#discussion_r169758147:
Because
apps/v1endpoint doesn't support.spec.rollbackTo, you'll need to implement the logic yourself:The rollback logic currently lives in Deployment controller code, which still uses extensions/v1beta1 Deployment client:
https://github.com/kubernetes/kubernetes/blob/17fec00b8915dbffac40b9eb481516a66092ef3e/pkg/controller/deployment/rollback.go#L30-L69
Note that we _didn't_ remove rollback support because it should be done client-side. We removed rollback because we wanted to change how it's implemented server-side (i.e. with extensions/v1beta1 API, the Deployment controller mutates DeploymentSpec during rollback) and wanted to revisit it in the future. If we didn't remove rollback in apps/v1, it'd be very difficult to make that change in the future.