-
Notifications
You must be signed in to change notification settings - Fork 904
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
Take API server out of XR name generation path #4651
Comments
We use a similar pattern to name an XR's composed resources. We could probably extend what is proposed here, i.e.:
|
Why is dry-run needed in the first place? Why not just go ahead and create the XR and let the apiserver do its work of finding a name? |
Apparently, it is not possible to achieve this. For any randomly generated name, we need to double check with the API server that it is not taken during generation. Also the name we ensured that is available (either via "dry-run" or "try get and see not found") could be taken until we do the actual Create. And even worse, if we don't do a We already replaced "dry-run" with a "try get and see not found" approach in #5062 for claim -> composite and #4858 for composite -> composed which gives us consistent generated names to fix issues like this. However, the other problem of possibly overriding other composites & composed resources still exist and being tracked with:
Hence, I am closing this issue in favor of the above issues which better describe the actual problem. |
What problem are you facing?
After a claim is deployed to the cluster, its counterpart composite needs to be created. Its name is derived from the claim's name, by adding a suffix. The final name is obtained sending a dry-run create request to API server.
The Kubernetes docs is strongly suggesting not to rely on such generated values - the name could be taken at the moment when the real request is submitted.
How could Crossplane help solve your problem?
Claim controller can generate the composite name without contacting API server, and hence speeding up the reconciliation. Claim's UID poses enough entropy, and it would be enough to take some part of it (last
N
chars, e.g.N > 6
) and append it to the original claim name.The text was updated successfully, but these errors were encountered: