Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-45226

ZTP - $pipelines in ClusterLogForwarder source-cr is not replaced in generated policy, causing policy fails to apply

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Undefined Undefined
    • None
    • 4.14
    • GitOps ZTP
    • None
    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      Group policy fails to apply with the following error:
      
      iolation - clusterlogforwarders [instance] in namespace
              openshift-logging is missing, and cannot be created, reason: `ClusterLogForwarder.logging.openshift.io
              "instance" is invalid: spec.pipelines[0]: Invalid value: "string": spec.pipelines[0]
              in body must be of type object: "string"`
      
      
      Generated object-definition for CLF in group policy looks like the following. 
      
              object-templates:
              - complianceType: musthave
                objectDefinition:
                  apiVersion: logging.openshift.io/v1
                  kind: ClusterLogForwarder
                  metadata:
                    name: instance
                    namespace: openshift-logging
                  spec:
                    outputs:
                    - name: kafka-output
                      type: kafka
                      url: tcp://$kafka-server:9092/endpoint
                    pipelines:
                    - $pipelines
      
      spec.pipelines[0] in generated policy should have been like this: 
      https://github.com/openshift-kni/cnf-features-deploy/blob/release-4.14/ztp/gitops-subscriptions/argocd/example/policygentemplates/group-du-sno-ranGen.yaml#L26-L37 
      
      
      

      Version-Release number of selected component (if applicable):

      ZTP site generator image: latest 4.14 from brew
      Spoke OCP: 4.14.z, CLO: 5.8
      
      

      How reproducible:

          100%

      Steps to Reproduce:

          1. attempt to apply du profile using default ZTP source-crs and PGT examples 
          2.
          3.
          

      Actual results:

          ClusterLogForwarder CR fails to apply

      Expected results:

          Du profile applied successfully

      Additional info:

          

              sahasan@redhat.com Sabbir Hasan
              rhn-support-yliu1 Yang Liu
              Dwaine Gonyier Dwaine Gonyier
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: