feat: implement rollback for deployments - #155
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a deployment rollback feature in Orbit, allowing users to revert any Kubernetes Deployment to its previous revision directly from the context menu in the UI.
Changes
find_rollback_replicasetto identify the previous revision from owned ReplicaSets based ondeployment.kubernetes.io/revisionannotations.clean_template_for_rollbackto sanitize the pod template spec by stripping ephemeral hash labels (pod-template-hash).rollback_deploymentto patch the Deployment spec template with the target ReplicaSet's template.rollback_deploymentand wired therollbackDeploymentevent in the dispatch router.rollbackDeploymentAPI wrapper inkubernetesService.ts.useWorkloadActions.ts.core/engine/src/kubernetes/workloads.rsforfind_rollback_replicasetandclean_template_for_rollback.Files Changed
core/engine/src/kubernetes/workloads.rscore/engine/src/ipc/handlers/workloads.rscore/engine/src/ipc/handlers/mod.rssrc/services/kubernetesService.tssrc/composables/useWorkloadActions.tsTesting
cargo test --package orbit-engine) passing.vue-tsc --buildandcargo checkwith 0 errors.eslint . --fix --max-warnings 0.npm run buildsucceeds without issues.Related Issues
None