Skip to content

Conversation

tenitski
Copy link

@tenitski tenitski commented Jul 23, 2025

Description of your changes

Allows to set composite resource Ready state via annotation gotemplating.fn.crossplane.io/ready, similarly how this is done for composed resources.

Depends on the following pull request crossplane/function-sdk-go#218 which is temporary used as a dependency, to be fixed.

Fixes #153

I have:

Signed-off-by: Alexei Tenitski <[email protected]>
@tenitski tenitski force-pushed the composite-ready-state branch from 77c2b5c to 78e4d29 Compare July 23, 2025 02:39
tenitski added 3 commits July 23, 2025 14:41
Signed-off-by: Alexei Tenitski <[email protected]>
Signed-off-by: Alexei Tenitski <[email protected]>
@@ -145,38 +145,74 @@ func (f *Function) RunFunction(_ context.Context, req *fnv1.RunFunctionRequest)
}

// Initialize the requirements.
requirements := &fnv1.Requirements{ExtraResources: make(map[string]*fnv1.ResourceSelector)}
requirements := &fnv1.Requirements{Resources: make(map[string]*fnv1.ResourceSelector)}
Copy link
Author

Choose a reason for hiding this comment

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

Changed in latest function-sdk-go that this PR depend on

@@ -83,3 +85,5 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/crossplane/function-sdk-go => github.com/tenitski/function-sdk-go v0.0.0-20250723012926-634ed8aecb6f
Copy link
Author

Choose a reason for hiding this comment

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

Temporary depending on crossplane/function-sdk-go#218 while that PR is not merged and a new version is not released. Blocks merging of this PR, to be cleaned up and a proper version used instead.

Copy link
Author

Choose a reason for hiding this comment

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

Discovered that bumping function-sdk-go to main version breaks function-go-templating:
crossplane/function-sdk-go#219
I believe the issue is on SDK side however it is possible that I did something wrong when fixing breaking changes.

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.

Set the Ready condition on the composite
1 participant