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

RFE limit Lookup template with labels

XMLWordPrintable

    • RFE Use labels for template Lookup function
    • False
    • None
    • False
    • Green
    • To Do
    • ACM-1215 - ACM Advanced features in Templatized Policies
    • ACM-1215ACM Advanced features in Templatized Policies
    • 0% To Do, 0% In Progress, 100% Done

      Epic Goal

      As a user creating policies I would like to use the lookup function to return objects based on labels.  Currently the lookup will return all objects of a given type , however there isn't a way to limit what is returned. 

      Kubernetes uses labels as a selector, the lookup function should also allow this

      Why is this important?

      Would make it easier to create policies using the new raw template function.

      Scenarios

      Allow using lookup template with z-n number of labels specified.

      {{- range $tst := (lookup "v1" "Pod" "" "").items }}
      {{- range $tst := (lookup "v1" "Pod" "" "" "env=dev").items }}
      {{- range $tst := (lookup "v1" "Pod" "" "" "env in (uat,production)").items }}
      {{- range $tst := (lookup "v1" "Pod" "" "" "appversion=2" "env in (uat,production)").items }}
      

      Acceptance Criteria

      ...

      Dependencies (internal and external)

      1. ...

      Previous Work (Optional):

      1. ...

      Open questions:

      1. ...

      Done Checklist

      • CI - CI is running, tests are automated and merged.
      • Release Enablement <link to Feature Enablement Presentation>
      • DEV - Upstream code and tests merged: <link to meaningful PR or GitHub
        Issue>
      • DEV - Upstream documentation merged: <link to meaningful PR or GitHub
        Issue>
      • DEV - Downstream build attached to advisory: <link to errata>
      • QE - Test plans in Polarion: <link or reference to Polarion>
      • QE - Automated tests merged: <link or reference to automated tests>
      • DOC - Downstream documentation merged: <link to meaningful PR>

              rhn-support-cstark Christian Stark
              rhn-support-bjarvis Brian Jarvis
              Derek Ho Derek Ho
              Christian Stark Christian Stark
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: