Uploaded image for project: 'Cluster Observability Operator'
  1. Cluster Observability Operator
  2. COO-471

ThanosQuerier.spec.namespaceSelector takes no effect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • 1.0.0
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      The issue should exist  in all coo versions

      Reproduce steps:

      Install COO and apply two yaml manifest in the attachment

      ns-coo.yaml ns1-coo.yaml

      Actual results

       

      % oc -n ns-coo get deploy thanos-querier-example-thanos -oyaml 
      ....
          spec:
            containers:
            - args:
              - query
              - --log.format=logfmt
              - --query.replica-label=prometheus_replica
              - --query.auto-downsampling
              - --endpoint=dnssrv+_grpc._tcp.multi-ns-thanos-sidecar.ns-coo.svc.cluster.local
       
      % oc -n ns-coo exec deploy/thanos-querier-example-thanos -- curl -k 'http://thanos-querier-example-thanos.ns-coo.svc:10902/api/v1/query?' --data-urlencode 'query=version' | jq 
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100   397  100   384  100    13  64000   2166 --:--:-- --:--:-- --:--:-- 66166
      {
        "status": "success",
        "data": {
          "resultType": "vector",
          "result": [
            {
              "metric": {
                "__name__": "version",
                "endpoint": "web",
                "instance": "10.129.2.20:8080",
                "job": "prometheus-coo-example-app",
                "namespace": "ns-coo",
                "pod": "prometheus-coo-example-app-5d8cd498c7-c4gz5",
                "prometheus": "ns-coo/multi-ns",
                "service": "prometheus-coo-example-app",
                "version": "v0.4.2"
              },
              "value": [
                1728394973.310,
                "1"
              ]
            }
          ],
          "analysis": {}
        }
       
      

       

       ^^ 

       

      % oc -n ns1-coo get deploy thanos-querier-example-thanos -oyaml 
      ....
          spec:
            containers:
            - args:
              - query
              - --log.format=logfmt
              - --query.replica-label=prometheus_replica
              - --query.auto-downsampling
              - --endpoint=dnssrv+_grpc._tcp.multi-ns-thanos-sidecar.ns1-coo.svc.cluster.local
      
      % oc -n ns1-coo exec deploy/thanos-querier-example-thanos -- curl -k 'http://thanos-querier-example-thanos.ns1-coo.svc:10902/api/v1/query?' --data-urlencode 'query=version' | jq
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100   399  100   386  100    13  64333   2166 --:--:-- --:--:-- --:--:-- 66500
      {
        "status": "success",
        "data": {
          "resultType": "vector",
          "result": [
            {
              "metric": {
                "__name__": "version",
                "endpoint": "web",
                "instance": "10.128.2.16:8080",
                "job": "prometheus-coo-example-app",
                "namespace": "ns1-coo",
                "pod": "prometheus-coo-example-app-5d8cd498c7-7bxw6",
                "prometheus": "ns1-coo/multi-ns",
                "service": "prometheus-coo-example-app",
                "version": "v0.4.2"
              },
              "value": [
                1728394929.370,
                "1"
              ]
            }
          ],
          "analysis": {}
        }
      } 

      Expected results: thanosquerier under ns1-coo can query data from monitoringstack in both namespaces ns-coo and ns1-coo

       

        1. ns1-coo.yaml
          2 kB
        2. ns-coo.yaml
          2 kB

              jfajersk@redhat.com Jan Fajerski
              hongyli@redhat.com Hongyan Li
              Hongyan Li Hongyan Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: