-
Notifications
You must be signed in to change notification settings - Fork 9
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
Never Ready When Creating Env Config #29
Comments
+1, I have similar case when creating ProviderConfig - they don't provide any conditions and seems function-auto-ready ignores them. |
@reedjosh I'm created a quick fix for that, tested with You can test that by replacing your apiVersion: pkg.crossplane.io/v1beta1
kind: Function
metadata:
name: function-auto-ready
spec:
package: xpkg.upbound.io/luktom/function-auto-ready:v0.2.2 Let me know if this is what you needed :) |
@negz can you take a look at my fix code, please? I'm quite new to Crossplane development so I'm not sure if there's a better way to solve the issue. Also, I've tried to enforce setting the Available status for the resource like that: // just after dr.Ready = resource.ReadyTrue
dr.Resource.SetConditions(xpv1.Available()) But it seems not working property, or I misunderstand something... |
Above there's a link to next attempt, this time I added a function input which takes a list of GVK to force readiness, sample usage is in PR description, you can test with package |
This function is mostly a convenience. Most other functions (e.g. function-go-templating, function-patch-and-transform) will let you specifically configure whether a resource is or isn't ready. With that in mind, I lean toward keeping this function simple and not adding support for resources with no status. For those resources, I'd just configure your "primary" function (e.g. the function that actually composes the resource) to let Crossplane know the resource should be considered ready as soon as its created. |
Finding myself in the same situation (crossplane/crossplane#6086) and utilizing I would agree with keeping this function easy, but I'm wondering if that actually is expected behavior for users.
I would volunteer to implement this if you agree. |
Hello, I'm facing exactly the same issue with a ProviderConfig. I tried to add a step after auto-ready containing said ProviderConfig in the hopes that this function wouldn't account for it, without success. I'm using the go-templating function but haven't been able to figure out how to manually set the XR's status to Ready (even though there's a dummy example in its doc). If the key goal is to keep the function simple, what about adding a special |
A few things:
The nice thing about functions is that they are composable, so if someone wants to build a function, e.g. |
Ok, I see the problem now. I think your idea of a I think the problem lays deeper that XRs support those conditions, while the resources the status depends on must not. This leads to unexpected behavior for the user as here in the issue and an additional function would only mask the problem. |
What happened?
I created a few things with a composition pipeline and ended with auto-ready.
One of the things I created was an environment configuration.
Because the env config never really gets a status, fn auto ready never seems to do anything.
Any chance we could either tell fn-auto-ready of a list of resources to ignore, and or make fn-auto ready schema aware of objects. Particularly env-configs since it is a known k8s resource?
Thanks!
How can we reproduce it?
Create stuff without a status.
What environment did it happen in?
Function version: v0.2.1
The text was updated successfully, but these errors were encountered: