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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks, I used []binary instead

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

added

@codecov-commenter

codecov-commenter commented Jun 26, 2026

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 29.90%. Comparing base (61582f7) to head (fd7ed6b).
⚠️ Report is 10 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%   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.
📢 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.

@aryan9600 aryan9600 left a comment

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 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 :)

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