Skip to content

Feat: support tracking binaryData in CM#1929

Open
Arman17Babaei wants to merge 6 commits into
fluxcd:mainfrom
Arman17Babaei:main
Open

Feat: support tracking binaryData in CM#1929
Arman17Babaei wants to merge 6 commits into
fluxcd:mainfrom
Arman17Babaei:main

Conversation

@Arman17Babaei

Copy link
Copy Markdown

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

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>
Comment thread pkg/canary/config_tracker.go Outdated

if ct.TrackBinaryData {
for k, v := range config.BinaryData {
data[k] = string(v)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread cmd/flagger/main.go
enableLeaderElection bool
leaderElectionNamespace string
enableConfigTracking bool
enableConfigBinaryDataTracking bool

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be exposed in the helm chart as well

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 30.03%. Comparing base (61582f7) to head (29c33c0).
⚠️ Report is 4 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1929      +/-   ##
==========================================
+ Coverage   30.00%   30.03%   +0.03%     
==========================================
  Files         288      288              
  Lines       18455    18464       +9     
==========================================
+ Hits         5537     5546       +9     
  Misses      12189    12189              
  Partials      729      729              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants