-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create a library of helper functions that make working with pepr easier #415
feat: create a library of helper functions that make working with pepr easier #415
Conversation
✅ Deploy Preview for pepr-docs canceled.
|
…t-make-working-with-pepr-easier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the test, like the function, but this would be even cleaner on the PeprValidationRequest
. Overall great work
sorry missed your comment about flexibility in the PR.. I'm not sure I am following what you mean though. Can you elaborate " keep the flexibility of pulling the module-helpers into a separate module in the future"? Thanks! This feels very coupled to the The important element on this is to maintain parody with our Fluent API, |
Btw, we ended up needing it in mutate & validate: https://github.com/defenseunicorns/uds-core/blob/common-pepr/src/policies/common.ts#L23 |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pepr](https://togithub.com/defenseunicorns/pepr) | [`0.18.1` -> `0.21.1`](https://renovatebot.com/diffs/npm/pepr/0.18.1/0.21.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pepr/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pepr/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pepr/0.18.1/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pepr/0.18.1/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [typescript](https://www.typescriptlang.org/) ([source](https://togithub.com/Microsoft/TypeScript)) | [`5.2.2` -> `5.3.3`](https://renovatebot.com/diffs/npm/typescript/5.2.2/5.3.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/typescript/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typescript/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typescript/5.2.2/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typescript/5.2.2/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>defenseunicorns/pepr (pepr)</summary> ### [`v0.21.1`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.21.1) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.21.0...v0.21.1) #### What's Changed - chore: bump the production-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/455](https://togithub.com/defenseunicorns/pepr/pull/455) **Full Changelog**: defenseunicorns/pepr@v0.21.0...v0.21.1 ### [`v0.21.0`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.21.0) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.20.3...v0.21.0) #### What's Changed - feat: add resourceVersion tracking for watches & better watch recovery by [@​jeff-mccoy](https://togithub.com/jeff-mccoy) in [https://github.com/defenseunicorns/pepr/pull/453](https://togithub.com/defenseunicorns/pepr/pull/453) - chore: bump the production-dependencies group with 2 updates by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/452](https://togithub.com/defenseunicorns/pepr/pull/452) **Full Changelog**: defenseunicorns/pepr@v0.20.3...v0.21.0 ### [`v0.20.3`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.20.3) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.20.2...v0.20.3) #### What's Changed - fix: bind debug logs to fluent-client watch log handler by [@​jeff-mccoy](https://togithub.com/jeff-mccoy) in [https://github.com/defenseunicorns/pepr/pull/450](https://togithub.com/defenseunicorns/pepr/pull/450) **Full Changelog**: defenseunicorns/pepr@v0.20.2...v0.20.3 ### [`v0.20.2`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.20.2) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.20.1...v0.20.2) #### What's Changed - chore: bump actions/upload-artifact from 3.1.3 to 4.0.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/442](https://togithub.com/defenseunicorns/pepr/pull/442) - chore: bump the prom-client version by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/443](https://togithub.com/defenseunicorns/pepr/pull/443) - chore: bump actions/setup-node from 4.0.0 to 4.0.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/446](https://togithub.com/defenseunicorns/pepr/pull/446) - chore: bump the production-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/448](https://togithub.com/defenseunicorns/pepr/pull/448) - chore: bump the development-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/447](https://togithub.com/defenseunicorns/pepr/pull/447) - chore: update peer deps (not updated by dependabot) by [@​jeff-mccoy](https://togithub.com/jeff-mccoy) in [https://github.com/defenseunicorns/pepr/pull/449](https://togithub.com/defenseunicorns/pepr/pull/449) **Full Changelog**: defenseunicorns/pepr@v0.20.1...v0.20.2 ### [`v0.20.1`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.20.1) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.19.0...v0.20.1) #### What's Changed - chore: spelling by [@​cmwylie19](https://togithub.com/cmwylie19) in [https://github.com/defenseunicorns/pepr/pull/441](https://togithub.com/defenseunicorns/pepr/pull/441) **Full Changelog**: defenseunicorns/pepr@v0.20.0...v0.20.1 ### [`v0.19.0`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.19.0) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.18.1...v0.19.0) #### Features - feat: add pepr monitor command by [@​jeff-mccoy](https://togithub.com/jeff-mccoy) in [https://github.com/defenseunicorns/pepr/pull/411](https://togithub.com/defenseunicorns/pepr/pull/411) - feat: updated containers function to work with mutate requests by [@​schaeferka](https://togithub.com/schaeferka) in [https://github.com/defenseunicorns/pepr/pull/418](https://togithub.com/defenseunicorns/pepr/pull/418) ```typescript When(a.Pod) .IsCreated() .Validate(pod => { // returns all containers in pod const podsContainers = containers(pod); for (const container of podsContainers) { ... go on ``` ![image](https://togithub.com/defenseunicorns/pepr/assets/1096507/8e6c9400-a238-40ea-a774-b151f27db863) #### What's Changed - chore: create a library of helper functions that make working with pepr easier by [@​schaeferka](https://togithub.com/schaeferka) in [https://github.com/defenseunicorns/pepr/pull/415](https://togithub.com/defenseunicorns/pepr/pull/415) - fix: watch does not respect ns testing by [@​cmwylie19](https://togithub.com/cmwylie19) in [https://github.com/defenseunicorns/pepr/pull/398](https://togithub.com/defenseunicorns/pepr/pull/398) - chore: fix PeprStore rendering where multiple capabilities are in play by [@​cmwylie19](https://togithub.com/cmwylie19) in [https://github.com/defenseunicorns/pepr/pull/422](https://togithub.com/defenseunicorns/pepr/pull/422) - chore: update logo image in header by [@​schaeferka](https://togithub.com/schaeferka) in [https://github.com/defenseunicorns/pepr/pull/420](https://togithub.com/defenseunicorns/pepr/pull/420) **Full Changelog**: defenseunicorns/pepr@v0.18.1...v0.19.0 </details> <details> <summary>Microsoft/TypeScript (typescript)</summary> ### [`v5.3.3`](https://togithub.com/microsoft/TypeScript/releases/tag/v5.3.3): TypeScript 5.3.3 [Compare Source](https://togithub.com/Microsoft/TypeScript/compare/v5.3.2...v5.3.3) For release notes, check out the [release announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/). For the complete list of fixed issues, check out the - [fixed issues query for Typescript 5.3.0 (Beta)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.0%22+is%3Aclosed+). - [fixed issues query for Typescript 5.3.1 (RC)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.1%22+is%3Aclosed+). - [fixed issues query for Typescript 5.3.2 (Stable)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.2%22+is%3Aclosed+). - [fixed issues query for Typescript 5.3.3 (Stable)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.3%22+is%3Aclosed+). Downloads are available on: - [NuGet package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild) ### [`v5.3.2`](https://togithub.com/microsoft/TypeScript/releases/tag/v5.3.2): TypeScript 5.3 [Compare Source](https://togithub.com/Microsoft/TypeScript/compare/v5.2.2...v5.3.2) For release notes, check out the [release announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/). For the complete list of fixed issues, check out the - [fixed issues query for Typescript 5.3.0 (Beta)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.0%22+is%3Aclosed+). - [fixed issues query for Typescript 5.3.1 (RC)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.1%22+is%3Aclosed+). - [fixed issues query for Typescript 5.3.2 (Stable)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.2%22+is%3Aclosed+). Downloads are available on: - [NuGet package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/defenseunicorns/uds-core). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Megamind <[email protected]> Co-authored-by: Micah Nagel <[email protected]>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pepr](https://togithub.com/defenseunicorns/pepr) | [`0.18.1` -> `0.21.1`](https://renovatebot.com/diffs/npm/pepr/0.18.1/0.21.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pepr/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pepr/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pepr/0.18.1/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pepr/0.18.1/0.21.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [typescript](https://www.typescriptlang.org/) ([source](https://togithub.com/Microsoft/TypeScript)) | [`5.2.2` -> `5.3.3`](https://renovatebot.com/diffs/npm/typescript/5.2.2/5.3.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/typescript/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typescript/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typescript/5.2.2/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typescript/5.2.2/5.3.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>defenseunicorns/pepr (pepr)</summary> ### [`v0.21.1`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.21.1) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.21.0...v0.21.1) #### What's Changed - chore: bump the production-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/455](https://togithub.com/defenseunicorns/pepr/pull/455) **Full Changelog**: defenseunicorns/pepr@v0.21.0...v0.21.1 ### [`v0.21.0`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.21.0) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.20.3...v0.21.0) #### What's Changed - feat: add resourceVersion tracking for watches & better watch recovery by [@​jeff-mccoy](https://togithub.com/jeff-mccoy) in [https://github.com/defenseunicorns/pepr/pull/453](https://togithub.com/defenseunicorns/pepr/pull/453) - chore: bump the production-dependencies group with 2 updates by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/452](https://togithub.com/defenseunicorns/pepr/pull/452) **Full Changelog**: defenseunicorns/pepr@v0.20.3...v0.21.0 ### [`v0.20.3`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.20.3) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.20.2...v0.20.3) #### What's Changed - fix: bind debug logs to fluent-client watch log handler by [@​jeff-mccoy](https://togithub.com/jeff-mccoy) in [https://github.com/defenseunicorns/pepr/pull/450](https://togithub.com/defenseunicorns/pepr/pull/450) **Full Changelog**: defenseunicorns/pepr@v0.20.2...v0.20.3 ### [`v0.20.2`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.20.2) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.20.1...v0.20.2) #### What's Changed - chore: bump actions/upload-artifact from 3.1.3 to 4.0.0 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/442](https://togithub.com/defenseunicorns/pepr/pull/442) - chore: bump the prom-client version by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/443](https://togithub.com/defenseunicorns/pepr/pull/443) - chore: bump actions/setup-node from 4.0.0 to 4.0.1 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/446](https://togithub.com/defenseunicorns/pepr/pull/446) - chore: bump the production-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/448](https://togithub.com/defenseunicorns/pepr/pull/448) - chore: bump the development-dependencies group with 1 update by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/defenseunicorns/pepr/pull/447](https://togithub.com/defenseunicorns/pepr/pull/447) - chore: update peer deps (not updated by dependabot) by [@​jeff-mccoy](https://togithub.com/jeff-mccoy) in [https://github.com/defenseunicorns/pepr/pull/449](https://togithub.com/defenseunicorns/pepr/pull/449) **Full Changelog**: defenseunicorns/pepr@v0.20.1...v0.20.2 ### [`v0.20.1`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.20.1) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.19.0...v0.20.1) #### What's Changed - chore: spelling by [@​cmwylie19](https://togithub.com/cmwylie19) in [https://github.com/defenseunicorns/pepr/pull/441](https://togithub.com/defenseunicorns/pepr/pull/441) **Full Changelog**: defenseunicorns/pepr@v0.20.0...v0.20.1 ### [`v0.19.0`](https://togithub.com/defenseunicorns/pepr/releases/tag/v0.19.0) [Compare Source](https://togithub.com/defenseunicorns/pepr/compare/v0.18.1...v0.19.0) #### Features - feat: add pepr monitor command by [@​jeff-mccoy](https://togithub.com/jeff-mccoy) in [https://github.com/defenseunicorns/pepr/pull/411](https://togithub.com/defenseunicorns/pepr/pull/411) - feat: updated containers function to work with mutate requests by [@​schaeferka](https://togithub.com/schaeferka) in [https://github.com/defenseunicorns/pepr/pull/418](https://togithub.com/defenseunicorns/pepr/pull/418) ```typescript When(a.Pod) .IsCreated() .Validate(pod => { // returns all containers in pod const podsContainers = containers(pod); for (const container of podsContainers) { ... go on ``` ![image](https://togithub.com/defenseunicorns/pepr/assets/1096507/8e6c9400-a238-40ea-a774-b151f27db863) #### What's Changed - chore: create a library of helper functions that make working with pepr easier by [@​schaeferka](https://togithub.com/schaeferka) in [https://github.com/defenseunicorns/pepr/pull/415](https://togithub.com/defenseunicorns/pepr/pull/415) - fix: watch does not respect ns testing by [@​cmwylie19](https://togithub.com/cmwylie19) in [https://github.com/defenseunicorns/pepr/pull/398](https://togithub.com/defenseunicorns/pepr/pull/398) - chore: fix PeprStore rendering where multiple capabilities are in play by [@​cmwylie19](https://togithub.com/cmwylie19) in [https://github.com/defenseunicorns/pepr/pull/422](https://togithub.com/defenseunicorns/pepr/pull/422) - chore: update logo image in header by [@​schaeferka](https://togithub.com/schaeferka) in [https://github.com/defenseunicorns/pepr/pull/420](https://togithub.com/defenseunicorns/pepr/pull/420) **Full Changelog**: defenseunicorns/pepr@v0.18.1...v0.19.0 </details> <details> <summary>Microsoft/TypeScript (typescript)</summary> ### [`v5.3.3`](https://togithub.com/microsoft/TypeScript/releases/tag/v5.3.3): TypeScript 5.3.3 [Compare Source](https://togithub.com/Microsoft/TypeScript/compare/v5.3.2...v5.3.3) For release notes, check out the [release announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/). For the complete list of fixed issues, check out the - [fixed issues query for Typescript 5.3.0 (Beta)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.0%22+is%3Aclosed+). - [fixed issues query for Typescript 5.3.1 (RC)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.1%22+is%3Aclosed+). - [fixed issues query for Typescript 5.3.2 (Stable)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.2%22+is%3Aclosed+). - [fixed issues query for Typescript 5.3.3 (Stable)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.3%22+is%3Aclosed+). Downloads are available on: - [NuGet package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild) ### [`v5.3.2`](https://togithub.com/microsoft/TypeScript/releases/tag/v5.3.2): TypeScript 5.3 [Compare Source](https://togithub.com/Microsoft/TypeScript/compare/v5.2.2...v5.3.2) For release notes, check out the [release announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-3/). For the complete list of fixed issues, check out the - [fixed issues query for Typescript 5.3.0 (Beta)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.0%22+is%3Aclosed+). - [fixed issues query for Typescript 5.3.1 (RC)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.1%22+is%3Aclosed+). - [fixed issues query for Typescript 5.3.2 (Stable)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.3.2%22+is%3Aclosed+). Downloads are available on: - [NuGet package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/defenseunicorns/uds-core). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Megamind <[email protected]> Co-authored-by: Micah Nagel <[email protected]>
Description
Added module-helpers.ts and module-helpers.spec.ts.
module-helpers.ts has a containers function that accepts a request parameter and an optional containerTypes parameter. The request is a PeprValidateRequest<a.Pod> that identifies the pod from which a list of containers should be returned.
If no containerTypes parameter is included, all containers in the pod will be returned. If "containers" is passed in for the containerTypes, then only spec.containers will be returned. If "initContainers" is passed in for the containerTypes, then only spec.initContainers will be returned. If ephemeralContainers is passed in for the containerTypes, then only spec.ephemeralContainers will be returned.
In order to keep the flexibility of pulling the module-helpers into a separate module in the future, the containers function was put into the new module-helpers.ts file instead of modifying the PeprValidateRequest class.
Related Issue
Fixes #
Relates to #
Type of change
Checklist before merging