-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add force-sync-by-replace annotation option #5175
Conversation
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5175 +/- ##
==========================================
+ Coverage 22.88% 22.90% +0.02%
==========================================
Files 416 416
Lines 44607 44690 +83
==========================================
+ Hits 10208 10238 +30
- Misses 33607 33660 +53
Partials 792 792 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a comment fix is needed, and the other seems good.
@@ -137,6 +139,32 @@ func (a *applier) ReplaceManifest(ctx context.Context, manifest Manifest) error | |||
return err | |||
} | |||
|
|||
// ReplaceManifest uses kubectl to replace the given manifests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] ReplaceManifest -> ForceReplaceManifest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 05f4d15
Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
* Add test for force-sync-by-replace Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev> * Add ForceReplaceManifest methods Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev> * Add force-sync-by-replace handling Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev> * Fix the godoc comment Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev> --------- Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev> Signed-off-by: pipecd-bot <pipecd.dev@gmail.com>
* Add test for force-sync-by-replace * Add ForceReplaceManifest methods * Add force-sync-by-replace handling * Fix the godoc comment --------- Signed-off-by: Shinnosuke Sawada-Dazai <shin@warashi.dev> Signed-off-by: pipecd-bot <pipecd.dev@gmail.com> Co-authored-by: Shinnosuke Sawada-Dazai <shin@warashi.dev>
What this PR does / why we need it:
Add an option to replace the Kubernetes resources forcefully.
Which issue(s) this PR fixes:
Fixes #5174
Does this PR introduce a user-facing change?:
Yes
How are users affected by this change:
Users can replace resources forcefully.
This allows users to run the k8s job each time deployment occurs.
Is this breaking change: No
How to migrate (if breaking change): N/A