Skip to content

Conversation

@avarei
Copy link
Contributor

@avarei avarei commented Jan 30, 2026

Description of your changes

in a composition for a namespaced XR I tried use ExtraResources with namespace and got a nil pointer dereference panic.

apiVersion: meta.gotemplating.fn.crossplane.io/v1alpha1
kind: ExtraResources
requirements:
  token:
    apiVersion: v1
    kind: Secret
    matchName: example
    namespace: default

so i switched it around.

Fixes #

I have:

Signed-off-by: Tim Geimer <32556895+Avarei@users.noreply.github.com>
Copy link
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 @avarei - that LGTM. Is there an existing unit test that should have caught this problem? If not does it make sense to add one?

Signed-off-by: Tim Geimer <32556895+Avarei@users.noreply.github.com>
@avarei
Copy link
Contributor Author

avarei commented Jan 31, 2026

Thanks for the quick review @bobh66.
I added a small test case for namespaced required resource.

@bobh66 bobh66 merged commit f8f4bb5 into crossplane-contrib:main Jan 31, 2026
6 checks passed
@avarei avarei deleted the fix/required-resource-namespace branch February 1, 2026 12:39
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