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 squaremo force-pushed the log-ignored-by-sync branch from cd1816e to a9c6fc1 Compare May 13, 2019 09:28
@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

@squaremo squaremo force-pushed the log-ignored-by-sync branch from a9c6fc1 to f42ab75 Compare May 13, 2019 09:51
squaremo added 2 commits May 13, 2019 11:05
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 force-pushed the log-ignored-by-sync branch from f42ab75 to c3f0fe2 Compare May 13, 2019 10:05
@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