Skip to content

feat: add helper method to retreive extra resources#177

Merged
bobh66 merged 3 commits intocrossplane-contrib:mainfrom
twobiers:feat/helper-extra-resource
Aug 25, 2025
Merged

feat: add helper method to retreive extra resources#177
bobh66 merged 3 commits intocrossplane-contrib:mainfrom
twobiers:feat/helper-extra-resource

Conversation

@twobiers
Copy link
Copy Markdown
Contributor

Description of your changes

This PR adds a simple helper function to retrieve an extra resource from the request.
Previously one had to write something like this in the template to retrieve a single resource:

{{- $bucket := mustFirst (index (index .extraResources "bucket") "items") }}

With the helper function it simplifies to:

{{- $bucket := mustFirst (getExtraResources "bucket") }}

I have:

Signed-off-by: twobiers <22715034+twobiers@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@bobh66 bobh66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit and one question otherwise LGTM - thanks @twobiers

Signed-off-by: twobiers <22715034+twobiers@users.noreply.github.com>
Signed-off-by: twobiers <22715034+twobiers@users.noreply.github.com>
@twobiers twobiers force-pushed the feat/helper-extra-resource branch from 3c8eff9 to c37cb4e Compare August 25, 2025 08:12
Copy link
Copy Markdown
Collaborator

@bobh66 bobh66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the extra cleanup @twobiers - LGTM

@bobh66 bobh66 merged commit 028a79c into crossplane-contrib:main Aug 25, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants