RichardSufliarsky commented on issue #502:
URL: 
https://github.com/apache/apisix-helm-chart/issues/502#issuecomment-1460459031

   @tao12345666333 if you deploy to _dev-apisix_ namespace and just enable 
serviceMonitor, it will create it in _dev-apisix_ namespace with spec like this:
   ```spec:
     endpoints:
       - interval: 15s
         path: /apisix/prometheus/metrics
         scheme: http
         targetPort: prometheus
     namespaceSelector:
       matchNames:
         - dev-apisix
   ```
   But if you deploy to _dev-apisix_ namespace and enable serviceMonitor with 
namespace specified (e. g. _monitoring_), then it will create it in namespace 
_monitoring_ (which is correct) but will also specify namespace _monitoring_ in 
the _namespaceSelector_, but this is wrong as it needs to be _dev-apisix_ as 
gateway is running in that namespace:
   ```spec:
     endpoints:
       - interval: 15s
         path: /apisix/prometheus/metrics
         scheme: http
         targetPort: prometheus
     namespaceSelector:
       matchNames:
         - monitoring ### ERROR - should be dev-apisix
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to