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

Better logging when a resource does not apply due to k8s-allow-namespace filtering #2012

Closed
davidkarlsen opened this issue May 6, 2019 · 1 comment · Fixed by #2034
Closed
Labels
enhancement UX In pursuit of a delightful user experience

Comments

@davidkarlsen
Copy link
Contributor

Describe the feature
I scratched my head for some time when I saw a resource being handled by flux - but could not find it in the k8s ap:

[et2448@Davids-Work-MacBook-Pro ~ (⎈ |icp-global-context:kube-system)]$ kubectl -n devops logs flux-devops-5c4fbc4f8-rk9l6  |grep -i kube-eagle
ts=2019-05-06T00:14:41.985654952Z caller=daemon.go:627 component=daemon event="Sync: 25e67c1, kube-eagle:helmrelease/kube-eagle" logupstream=true
ts=2019-05-06T00:18:19.617252849Z caller=daemon.go:627 component=daemon event="Sync: 40efa2a, kube-eagle:helmrelease/kube-eagle" logupstream=true
[et2448@Davids-Work-MacBook-Pro ~ (⎈ |icp-global-context:kube-system)]$ 

which was due to the resource being put into a namespace not in k8s-allow-namespace - it would be nice if such a case would be logged more clearly to make the user aware of that.

Expected behavior
Log at warning level, "resource not applied due to no match in k8s-allow-namespace filter"

@hiddeco hiddeco added enhancement UX In pursuit of a delightful user experience labels May 6, 2019
@squaremo
Copy link
Member

squaremo commented May 9, 2019

The downside might be that it causes a lot of log noise, since it's likely that such a situation could persist for some time until someone noticed. If it's bundled into a single line report, perhaps not too bad:

component=sync success_count=42 errored={foo, bar} ignored={eagle}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement UX In pursuit of a delightful user experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants