-
Notifications
You must be signed in to change notification settings - Fork 29
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: add extra resources support #83
base: main
Are you sure you want to change the base?
Conversation
misses an example, I'll try to find a meaningful one. |
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
If you want an example the ability to provision an s3 bucket external to the composition (in a composition of its own or not) and be able to add bucket notifications from another composition would be a good way to demonstrate a one to many relationship. Often one bucket will have a dozen notification handlers into SQS queues etc. |
Comments from my day of using this branch:
Ideas to track, if they should become issues or not is up to you:
Otherwise it's worked as advertised and enabled the workflows I hoped it would! |
Is it planned to merge this one soon? |
Can you provide a full working example? I can't get this running ... OK - you have to use Crossplane > 15 in order to use extraResources :-/ |
My problem is, that I am able to retrieve extraResources with the function, but it's not possible to use them as described:
with this template:
So we do encapsulate everything in {{ with .extreResources }} to make it work So all in all - nice work - in our tests this just works. |
This seems super useful! Will this be merged soon? |
@@ -587,6 +592,124 @@ func TestRunFunction(t *testing.T) { | |||
}, | |||
}, | |||
}, | |||
"ExtraResources": { | |||
reason: "The Function should return a fatal result if the extra resource key is duplicated.", |
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.
wrong reason?
Sorry - have the question, does this PR has any future? |
Yes, @markussiebert, I only have to find the time to refine it a bit further. |
ApiVersion: e.APIVersion, | ||
Kind: e.Kind, | ||
} | ||
if len(e.MatchLabels) == 0 { |
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.
when trying to retrieve ALL resources of a kind I would usually specify an empty label Selector.
Maybe this should check for empty string in MatchName instead?
Description of your changes
Fixes #77
I have: