traefik / mesh

Traefik Mesh - Simpler Service Mesh
https://traefik.io/traefik-mesh
Apache License 2.0
2.03k stars 141 forks source link

Support include/select namespaces in controller #620

Closed kernel164 closed 4 years ago

kernel164 commented 4 years ago

Bug Report

I see lot of activities in controller logs. Why is controller trying to access ingress namespace or any other namespaces?

I see ignoreNamespaces option in helm chart. is it possible to have includeNamespaces/selectNamespaces so that I can define which namespaces maesh should pick up?

Output of controller log: (1.2.0)

maesh-controller-5cd7d56465-2cfv2 maesh-controller 2020-05-31T05:47:07.224836129Z time="2020-05-31T05:47:07Z" level=error msg="Could not update mesh service: unable to update service \"maesh-nginx-ingress-controller-default-backend-6d61657368-ingress\": unable to get shadow service \"maesh-nginx-ingress-controller-default-backend-6d61657368-ingress\": service \"maesh-nginx-ingress-controller-default-backend-6d61657368-ingress\" not found"
maesh-controller-5cd7d56465-2cfv2 maesh-controller 2020-05-31T05:47:07.257586633Z time="2020-05-31T05:47:07Z" level=error msg="Could not update mesh service: unable to update service \"maesh-prometheus-operator-kube-state-metrics-6d61657368-monitoring\": unable to get shadow service \"maesh-prometheus-operator-kube-state-metrics-6d61657368-monitoring\": service \"maesh-prometheus-operator-kube-state-metrics-6d61657368-monitoring\" not found"
maesh-controller-5cd7d56465-2cfv2 maesh-controller 2020-05-31T05:47:09.545985318Z time="2020-05-31T05:47:09Z" level=error msg="Could not update mesh service: unable to update service \"maesh-prometheus-operator-prometheus-node-exporter-6d61657368-monitoring\": unable to get shadow service \"maesh-prometheus-operator-prometheus-node-exporter-6d61657368-monitoring\": service \"maesh-prometheus-operator-prometheus-node-exporter-6d61657368-monitoring\" not found"
maesh-controller-5cd7d56465-2cfv2 maesh-controller 2020-05-31T05:52:07.33331752Z time="2020-05-31T05:52:07Z" level=error msg="Could not update mesh service: unable to update service \"maesh-prometheus-operator-kube-state-metrics-6d61657368-monitoring\": unable to get shadow service \"maesh-prometheus-operator-kube-state-metrics-6d61657368-monitoring\": service \"maesh-prometheus-operator-kube-state-metrics-6d61657368-monitoring\" not found"
maesh-controller-5cd7d56465-2cfv2 maesh-controller 2020-05-31T05:52:09.546040152Z time="2020-05-31T05:52:09Z" level=error msg="Could not update mesh service: unable to update service \"maesh-prometheus-operator-prometheus-node-exporter-6d61657368-monitoring\": unable to get shadow service \"maesh-prometheus-operator-prometheus-node-exporter-6d61657368-monitoring\": service \"maesh-prometheus-operator-prometheus-node-exporter-6d61657368-monitoring\" not found"
maesh-controller-5cd7d56465-2cfv2 maesh-controller 2020-05-31T05:52:10.746485066Z time="2020-05-31T05:52:10Z" level=error msg="Could not update mesh service: unable to update service \"maesh-nginx-ingress-controller-default-backend-6d61657368-ingress\": unable to get shadow service \"maesh-nginx-ingress-controller-default-backend-6d61657368-ingress\": service \"maesh-nginx-ingress-controller-default-backend-6d61657368-ingress\" not found"
maesh-controller-5cd7d56465-2cfv2 maesh-controller 2020-05-31T05:57:07.239403518Z time="2020-05-31T05:57:07Z" level=error msg="Could not update mesh service: unable to update service \"maesh-prometheus-operator-kube-state-metrics-6d61657368-monitoring\": unable to get shadow service \"maesh-prometheus-operator-kube-state-metrics-6d61657368-monitoring\": service \"maesh-prometheus-operator-kube-state-metrics-6d61657368-monitoring\" not found"
maesh-controller-5cd7d56465-2cfv2 maesh-controller 2020-05-31T05:57:08.746571376Z time="2020-05-31T05:57:08Z" level=error msg="Could not update mesh service: unable to update service \"maesh-prometheus-operator-prometheus-node-exporter-6d61657368-monitoring\": unable to get shadow service \"maesh-prometheus-operator-prometheus-node-exporter-6d61657368-monitoring\": service \"maesh-prometheus-operator-prometheus-node-exporter-6d61657368-monitoring\" not found"
maesh-controller-5cd7d56465-2cfv2 maesh-controller 2020-05-31T05:57:09.94668693Z time="2020-05-31T05:57:09Z" level=error msg="Could not update mesh service: unable to update service \"maesh-nginx-ingress-controller-default-backend-6d61657368-ingress\": unable to get shadow service \"maesh-nginx-ingress-controller-default-backend-6d61657368-ingress\": service \"maesh-nginx-ingress-controller-default-backend-6d61657368-ingress\" not found"

What is your environment & configuration (arguments, provider, platform, ...)?

EKS k8s 1.16 maesh 1.2.0

jspdown commented 4 years ago

In order for Maesh to discover services and SMI resources, it listens for change events in every namespace except the one specified in the ignoreNamespaces option and kube-system.

I would also be in favour of providing a new option in which we could specify exactly which namespace we would like to listen on. Adding this won't be a breaking change and would allow operators to control accurately Maesh scope.

@kevinpollet, @SantoDE WDYT?

SantoDE commented 4 years ago

Agreed :-)

kevinpollet commented 4 years ago

👍