Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-19739

PolicyTools cli doesn't recognize the skipObject function

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • ACM 2.13.3
    • ACM 2.13.0
    • GRC
    • None
    • GRC Sprint 2025-07, GRC Sprint 2025-09
    • Important
    • None

      When running policytools template-resolver against a template that uses `skipObject` an error is returned.

       

      $ policytools template-resolver ./skipobject.yml 
      E0403 11:02:16.014654 3152203 templates.go:653] error parsing template string - complianceType: musthave
        objectDefinition:
          apiVersion: v1
          data:
            date: {{ now }}
            skip: {{ skipObject }}
          kind: ConfigMap
          metadata:
            name: test
            namespace: test
      ,
       template str - complianceType: musthave
        objectDefinition:
          apiVersion: v1
          data:
            date: {{ now }}
            skip: {{ skipObject }}
          kind: ConfigMap
          metadata:
            name: test
            namespace: test
      ,
       error: template: tmpl:6: function "skipObject" not defined
      error processing templates: failed to process the templates: failed to parse the template JSON string - complianceType: musthave
        objectDefinition:
          apiVersion: v1
          data:
            date: {{ now }}
            skip: {{ skipObject }}
          kind: ConfigMap
          metadata:
            name: test
            namespace: test
      : template: tmpl:6: function "skipObject" not defined

              rh-ee-dhaiduce Dale Haiducek
              rhn-support-bjarvis Brian Jarvis
              Derek Ho Derek Ho
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: