Skip to content

Feat: support tracking binaryData in CM and stringData in Secret#1781

Open
MengjiaLiang wants to merge 1 commit into
fluxcd:mainfrom
MengjiaLiang:main
Open

Feat: support tracking binaryData in CM and stringData in Secret#1781
MengjiaLiang wants to merge 1 commit into
fluxcd:mainfrom
MengjiaLiang:main

Conversation

@MengjiaLiang

Copy link
Copy Markdown

Currently, Flagger does not support creating/tracking/promoting the binaryData in a configmap and the stringData in a secret.
This change tries to support these scenarios.

Signed-off-by: MengjiaLiang <mengjia.liang@uipath.com>
@Arman17Babaei

Copy link
Copy Markdown

@aryan9600 @stefanprodan
I think this MR makes sense. I also am troubling with binaryData in configmaps.
Has there been any new developments on the matter?

@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 to be feature gated via a cli flag to avoid unwanted canary runs when users upgrade to a version with this patch.

// getFullDataFromSecret fetches both data and stringData in the secret
func (ct *ConfigTracker) getFullDataFromSecret(secret corev1.Secret) map[string]string {
fullData := make(map[string]string)
maps.Copy(fullData, secret.StringData)

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.

stringData in a secret is a write only field. the data written through this field is returned in data on reads, which is already used to calculate the checksum

@Arman17Babaei

Copy link
Copy Markdown

Thanks @aryan9600
I applied your comments in a new PR #1929
Would be glad if you could take a look

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