mate
mate copied to clipboard
Allow watching on a namespace
Add a flag to enable watching on a certain k8s namespace (e.g. --watch-namespace="test-namespace" [defaults to watching all namespaces]). This should be useful for testing and possible customisation
Sounds good to me.
How about making it similar to how kubectl
works for a familiar feel?
-
./mate
- runs for
default
namespace
- runs for
-
./mate --namespace foo --namespace bar
- runs for
foo
andbar
namespace
- runs for
-
./mate --all-namespaces
- runs for all namespaces
hmm, in order to have a testing instance with --namespace mate-test
you would also need to run the main instance on all namespaces but mate-test
, which wouldn't work with my proposal.
Yeah, it is a good idea to be explicit here about what default namespaces are watched and probably use default namespace.
IMO it should not have both --watch
and --ignore
namespaces and attempt to prevent users from shooting in their foot. In my mind this feature is primarily for testing mate or limiting its scope, and mate should not guarantee safe behaviour in case of another instance running with different configuration. At the end of the day, no one prevents users from running two deployments of mate with different --kubernetes-format
and make a mess :)
I think a better approach is to go the route the nginx
ingress took, which is to use an annotation to control which services the ingress controller watches: https://github.com/kubernetes/ingress/tree/master/controllers/nginx#running-multiple-ingress-controllers
I've made a suggestion about this here: https://github.com/zalando-incubator/mate/issues/90