-
Notifications
You must be signed in to change notification settings - Fork 712
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
Filter by Kubernetes Namespaces #1386
Conversation
Per f2f discussion, (a) sounds better. |
Blocked on #1371 |
603aa7b
to
23fdf47
Compare
@tomwilkie probably worth having a look at this. It is still showing the wrong node-count for services (it's showing the pod node count), but... |
Also, we should filter out delete pods/services when figuring out the available namespaces. |
5427a26
to
64c9ff6
Compare
@tomwilkie, ptal |
return r.rendererForTopology(mux.Vars(req)["topology"], values, rpt) | ||
} | ||
|
||
func captureReporter(rep Reporter, f reportRenderHandler) CtxHandlerFunc { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
func(n report.Node) bool { | ||
// Drop deleted or empty pods | ||
state, ok := n.Latest.Lookup(kubernetes.PodState) | ||
return HasChildren(report.Container)(n) && (!ok || state != kubernetes.StateDeleted) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
3371060
to
2d7df7c
Compare
2d7df7c
to
0e70f70
Compare
LGTM (assuming green) |
Fixes #1340
Won't really work in multitenant, as the topologyRegistry shouldn't
change. We need to apply it transiently on each call, on a per-report
basis.
Options are:
a) replace topologyRegistry.walk() with topologyRegistry.Topologies(),
and then modify them, in renderTopologies.
b) make APITopologyDesc.Options a func(report.Report)
[]APITopologyOptionGroup, and call that from renderTopologies.
@tomwilkie, any thoughts? preferences?