-
Epic
-
Resolution: Done
-
Major
-
ACM 2.7.Z
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)
- ...
Previous Work (Optional):
- ...
Open questions:
- ...
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>