argo-cd
argo-cd copied to clipboard
feat(action): add restart action for cluster-api CRDs
This PR adds restart action for cluster-api CRDs in a similar way to apps/Deployment.
Supported CRDs:
- cluster.x-k8s.io/MachineDeployment
- controlplane.cluster.x-k8s.io/KubeadmControlPlane
Cluster-api supports rollout action for some CRDs by updating .spec.rolloutAfter or using clusterctl CLI (see cluster-api docs). This concept of rollout is similar to using kubectl CLI or restart action of ArgoCD when restarting apps/Deployment. So with this feature enabled, users can restart their own workload kubernetes nodes by using restart action of ArgoCD rather than clusterctl CLI.
Checklist:
- [ ] Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
- [ ] The title of the PR states what changed and the related issues number (used for the release note).
- [x] The title of the PR conforms to the Toolchain Guide
- [ ] I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
- [ ] I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
- [ ] Does this PR require documentation updates?
- [ ] I've updated documentation as required by this PR.
- [x] I have signed off all my commits as required by DCO
- [x] I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
- [ ] My build is green (troubleshooting builds).
- [ ] My new feature complies with the feature status guidelines.
- [x] I have added a brief description of why this PR is necessary and/or what this PR solves.
- [ ] Optional. My organization is added to USERS.md.
- [ ] Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 49.26%. Comparing base (
7fe1263) to head (c05cd6b). Report is 47 commits behind head on master.
:exclamation: Current head c05cd6b differs from pull request most recent head a95be2c. Consider uploading reports for the commit a95be2c to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #16865 +/- ##
==========================================
- Coverage 49.57% 49.26% -0.31%
==========================================
Files 273 274 +1
Lines 48314 48138 -176
==========================================
- Hits 23951 23716 -235
- Misses 22000 22078 +78
+ Partials 2363 2344 -19
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi, can somebody review this PR? 👀
@crenshaw-dev Hi, can you please review this PR?