Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metadata key for holding an arbitrary identification token #544

Merged
merged 1 commit into from
May 4, 2023
Merged

Add metadata key for holding an arbitrary identification token #544

merged 1 commit into from
May 4, 2023

Conversation

matheuscscp
Copy link
Contributor

@matheuscscp matheuscscp commented Apr 30, 2023

@hiddeco
Copy link
Member

hiddeco commented May 4, 2023

Have discussed this more with @darkowlzz. How we think this should work is that it would introduce a new token key. The value of this key can be arbitrary (e.g. the generation of an object, checksum of a set of configuration values, or even a base64 encoded string representing the values as a whole).

This would cover for the alternative approach I documented in fluxcd/notification-controller#518 (comment), while allowing the source-controller to make use of this as well which hasn't a "checksum" concept but rather a reflection of observed values in full.

@matheuscscp
Copy link
Contributor Author

@hiddeco nice! That's indeed much better. Would the revision be included in this token, or kept as a separate thing as it is today?

@hiddeco
Copy link
Member

hiddeco commented May 4, 2023

That's up to the emitting controller to decide, the notification-controller should just consume it as part of the key that handles rate limiting.

@matheuscscp
Copy link
Contributor Author

That's up to the emitting controller to decide, the notification-controller should just consume it as part of the key that handles rate limiting.

Yep my question is specifically about what to do on the notification-controller side. Right now it includes the revision key from the event metadata in the rate limiting key. My question is: are we gonna replace the use of the revision key there, or just add the new one?

@hiddeco
Copy link
Member

hiddeco commented May 4, 2023

We would use both, as they represent different things (source being used versus declarative configuration).

@matheuscscp matheuscscp changed the title Add event metadata key for config checksum Add metadata key for holding an arbitrary identification token May 4, 2023
@matheuscscp
Copy link
Contributor Author

@hiddeco I updated the PR 👌

@hiddeco
Copy link
Member

hiddeco commented May 4, 2023

@stefanprodan @darkowlzz please take a look.

Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

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

LGTM!

Please rebase and also maybe update the PR description to not accidentally close fluxcd/helm-controller#678 as I think that requires changes in helm-controller like in fluxcd/helm-controller#681 .

apis/event/v1beta1/metadata.go Show resolved Hide resolved
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
@matheuscscp
Copy link
Contributor Author

LGTM!

Please rebase and also maybe update the PR description to not accidentally close fluxcd/helm-controller#678 as I think that requires changes in helm-controller like in fluxcd/helm-controller#681 .

@darkowlzz I updated the PR description, please let me know if it works

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants