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

ImagePolicy resources not reconciled by watched cross-namespace ImageRepositories the refer #195

Closed
relu opened this issue Nov 11, 2021 · 0 comments · Fixed by #196
Closed
Assignees
Labels
bug Something isn't working

Comments

@relu
Copy link
Member

relu commented Nov 11, 2021

I think you might have namespaces of the ImageRepository and ImagePolicy backwards - assuming your GitRepository and ImageUpdateAutomation objects are in the flux-system namespace, then the ImagePolicy should also be in the flux-system namespace and the ImageRepository should be in the "app" namespace.

But even after making that change I am having an issue with the ImagePolicy not reconciling the image tags that the ImageRepository is pulling. After playing around with it for a while, I noticed that restarting the image reflector controller will cause the cross namespace ImagePolicy to be reconciled exactly once, but any new tags pushed to the image repository are completely ignored. Looking through the image reflector controller logs (level=debug) I confirmed that the controller will only reconcile ImagePolicy objects using cross namespace references shortly after the controller starts up and then completely ignores them unlike the ImagePolicy objects that are NOT using the cross namespace references. I'm thinking either the documentation is missing something extremely crucial in order to get this to work or there is a bug. Also I apologize in advance for not sharing the logs as they are work related.

Originally posted by @e-dang in fluxcd/flux2#1958 (comment)

@relu relu self-assigned this Nov 11, 2021
@relu relu added the bug Something isn't working label Nov 11, 2021
relu added a commit that referenced this issue Nov 11, 2021
Cross-namespace ImageRepository resources should trigger reconciles for
ImagePolicies that refer to them. Previously, this was only done for
resources in the same namespace.

Fixes #195

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
relu added a commit that referenced this issue Nov 11, 2021
Cross-namespace ImageRepository resources should trigger reconciles for
ImagePolicies that refer to them. Previously, this was only done for
resources in the same namespace.

Fixes #195

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
relu added a commit that referenced this issue Nov 11, 2021
Cross-namespace ImageRepository resources should trigger reconciles for
ImagePolicies that refer to them. Previously, this was only done for
resources in the same namespace.

Fixes #195

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
tomhuang12 pushed a commit to tomhuang12/image-reflector-controller that referenced this issue Jan 5, 2022
Cross-namespace ImageRepository resources should trigger reconciles for
ImagePolicies that refer to them. Previously, this was only done for
resources in the same namespace.

Fixes fluxcd#195

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant