Beispiel #1
0
// kubernetesFilters generates the current kubernetes filters based on the
// available k8s topologies.
func kubernetesFilters(namespaces ...string) APITopologyOptionGroup {
	options := APITopologyOptionGroup{ID: "namespace", Default: "all"}
	for _, namespace := range namespaces {
		if namespace == "default" {
			options.Default = namespace
		}
		options.Options = append(options.Options, APITopologyOption{namespace, namespace, render.IsNamespace(namespace)})
	}
	options.Options = append(options.Options, APITopologyOption{"all", "All Namespaces", nil})
	return options
}
Beispiel #2
0
func filterNonKubeSystem(renderer render.Renderer) render.Renderer {
	return render.MakeFilter(render.Complement(render.IsNamespace("kube-system")), renderer)
}