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

Receiver webhooks revert apiVersion of ImageRepository to v1alpha1 #328

Closed
au2001 opened this issue Feb 15, 2022 · 0 comments · Fixed by #435
Closed

Receiver webhooks revert apiVersion of ImageRepository to v1alpha1 #328

au2001 opened this issue Feb 15, 2022 · 0 comments · Fixed by #435

Comments

@au2001
Copy link

au2001 commented Feb 15, 2022

The webhook server has a hardcoded map of apiVersions for a few resources
here.

Version v1beta1 of image.toolkit.fluxcd.io (including ImageRepository) has been
released in June of last year. But this hardcoded version has not been updated
since.

Because of this, sending a webhook to a Receiver with a target resource of kind
ImageRepository without an explicit apiVersion, reverts it to apiVersion
image.toolkit.fluxcd.io/v1alpha1. This breaks its reconciliation forever if any
incompatible configuration is used (e.g. accessFrom).

A solution is to bump this hardcoded version to the current latest. This
results in a breaking change for notification-controller and is a shortsighted
solution IMHO.
Instead, could the apiVersion be left untouched during the patch by matching
resources only based on the provided metadata (kind, name and namespace)?

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 a pull request may close this issue.

1 participant