Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-5035

OCP on GCP tag matching is to generic

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 2024-June-07
    • None
    • Data Pipeline
    • None
    • 1
    • False
    • None
    • False

      After investigating some dependencies in PNT data we have come to the conclusion that our tag matching strategy is too generic. This means we end up matching on tags that we shouldn't be matching on incorrectly inflating/attributing costs based on bad tagging strategies.

       

      This is because we turn the tag/labels key/values into a single string then match any partials within it. For Example this sql `strpos(lower(aws.tags), 'test') != 0 AND strpos(lower(aws.tags), lower(ocp.namespace)) != 0` will false positive match on the following if the ocp.namespace happens to be astro, dreno or gast.

      `{"app":"astro","cluster":"dreno","environment":"gast","namespace":"fake"}`

      This is because firstly we match on `namespace` then secondly we match any ocp.namespace in the entire string. When in reality we should only be matching on the namespace value of `fake`

       

      This also means if you have multiple clusters and each of which have a crossover with any of these tag values matching namespace name, the cost for the resource is wrongly applied to each cluster, thus not only wrongly attributing cost but also duplicating costs across clusters.

            rhn-support-lcouzens Luke Couzens
            rhn-support-lcouzens Luke Couzens
            Eva Šebestová Eva Šebestová
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: