Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-3423

resource customizations for kinds with no Group are generated incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • 1.10.0
    • Operator
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • GITOPS Sprint 3246

      Description of problem:

      **

      Defining a health check with resourceHealthChecks for APIs like PersistentVolumeClaim just has a Kind and no group results in the following being generated in argocd-cm which does not work:
      resource.customizations.health._PersistentVolumeClaim: |
       
      I think however this needs to be generated as follows without the underscore:
      resource.customizations.health.PersistentVolumeClaim: |

       

      Workaround
      Previously `spec.resourceCustomizations` was still supported, so users could use that as a workaround, however with GitOps v1.10.0 we removed support for that method, so users have no workaround anymore 

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      1. In the Argo CD Spec define a resourceHealthCheck for an object with no group, for example:

      resourceHealthChecks:

      • kind: PersistentVolumeClaim
        check: |
        hs = {}
        if obj.status ~= nil then
        if obj.status.phase ~= nil then
        if obj.status.phase == "Pending" then
        hs.status = "Healthy"
        hs.message = obj.status.phase
        return hs
        end
        if obj.status.phase == "Bound" then
        hs.status = "Healthy"
        hs.message = obj.status.phase
        return hs
        end
        end
        end
        hs.status = "Progressing"
        hs.message = "Waiting for PVC"
        return hs

        Actual results:

      cm entry is generated as
      resource.customizations.health._PersistentVolumeClaim: |

       

      Expected results:

      The generated value in argocd-cm should not include the prefix underscore.

      Reproducibility (Always/Intermittent/Only Once):

      Acceptance criteria: 

       

      Definition of Done:

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

       

       *

              jrao@redhat.com Jaideep Rao
              jrao@redhat.com Jaideep Rao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: