Feat: support tracking binaryData in CM#1929
Conversation
Signed-off-by: MengjiaLiang <mengjia.liang@uipath.com>
Signed-off-by: Arman Babaei <292arma@gmail.com>
Signed-off-by: Arman Babaei <292arma@gmail.com>
Signed-off-by: Arman Babaei <292arma@gmail.com>
|
|
||
| if ct.TrackBinaryData { | ||
| for k, v := range config.BinaryData { | ||
| data[k] = string(v) |
There was a problem hiding this comment.
using a string to store binary data is not ideal. any invalid utf-8 chars is replaced with \ufffd. this could to lead the same checksum being generated for different binary data.
go playground: https://go.dev/play/p/aK0c8PId3Nv
There was a problem hiding this comment.
Thanks, I used []binary instead
| enableLeaderElection bool | ||
| leaderElectionNamespace string | ||
| enableConfigTracking bool | ||
| enableConfigBinaryDataTracking bool |
There was a problem hiding this comment.
this needs to be exposed in the helm chart as well
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1929 +/- ##
==========================================
- Coverage 30.00% 29.90% -0.10%
==========================================
Files 288 288
Lines 18455 18623 +168
==========================================
+ Hits 5537 5569 +32
- Misses 12189 12325 +136
Partials 729 729 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
this needs documentation as well. could you updatecharts/flagger/README.md and the Canary target section in docs/gitbook/how-it-works.md?
also you'll need to rebase all your work in a single commit, sign it off, rebase against main and then force push :)
Currently, Flagger does not support creating/tracking/promoting the binaryData in a configmap.
This change tries to support these scenarios under a new feature flag
enable-config-binary-data-tracking.This resolves the comments in #1781