flagger
flagger copied to clipboard
Use `Patch` instead of `Update` for Deployment scaling
This should avoid frequent "Operation cannot be fulfilled" errors from polluting Canary resource events and logs.
Codecov Report
Attention: Patch coverage is 66.66667%
with 3 lines
in your changes are missing coverage. Please review.
Project coverage is 34.09%. Comparing base (
5e6815d
) to head (553184b
). Report is 1 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
pkg/canary/deployment_controller.go | 66.66% | 3 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1634 +/- ##
==========================================
- Coverage 34.10% 34.09% -0.01%
==========================================
Files 282 282
Lines 20557 20554 -3
==========================================
- Hits 7011 7008 -3
Misses 12616 12616
Partials 930 930
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@aryan9600 I pushed an attempt to solve that for the DS controller, but I'm not convinced it's the right way to go. Since we don't have a replicas
field on the DaemonSet, we're working with the nodeSelector
instead. Because that's a map, the only options to patch are via StrategicMerge (nullifying the values) or JSONPatch.
okay, then lets keep that out of this PR. we can look into it outside of here.
Cool. I've removed the commit with the changes to the DS controller and we can revisit it in a separate PR.
1 small question here, can we have multiple fields that can be patched with a single command? Like if replicas and labels both need to be patched. I couldn't find it anywhere.