Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Log warning re not applying resource by namespace #2034

Merged
merged 2 commits into from
May 13, 2019
Merged

Conversation

squaremo
Copy link
Member

@squaremo squaremo commented May 9, 2019

We log when a resource in a manifest is dropped from sync because it's
marked as ignored; would also help troubleshooting if we log when a
resource is dropped because it's not in the allowed namespaces.

Fixes #2012.

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

I am a bit concerned about the amount of log entries this will generate for setups where people have a monolith and exclude resources based upon namespace filtering (and not path basis). But it looks technically alright to me.

@hiddeco hiddeco added this to the v1.12.3 milestone May 9, 2019
@squaremo
Copy link
Member Author

@hiddeco I changed it so it logs all the excluded resources in one line, if there are any. Can you have a quick log and make sure you're still happy with it?

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

👍 much better, thanks Michael

We log when a resource in a manifest is dropped from sync because it's
marked as ignored; would also help troubleshooting if we log when a
resource is dropped because it's not in the allowed namespaces.
Logging all excluded resources may be quite noisy. Instead, collect
the IDs of excluded resources and log once (or no times, if there
aren't any).
@squaremo squaremo merged commit eb9aedd into master May 13, 2019
@squaremo squaremo deleted the log-ignored-by-sync branch May 13, 2019 13:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better logging when a resource does not apply due to k8s-allow-namespace filtering
2 participants