Skip to content
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

Support resources with no uid, and maybe with no name #596

Merged
merged 1 commit into from
Dec 6, 2020

Conversation

nolar
Copy link
Owner

@nolar nolar commented Dec 6, 2020

This goes slightly against K8s API specification, but the reality is that some resources, e.g. v1/ComponentStatus, do not have uids. Thos should not fail the operator.

For such cases, use a fallback scenario, where a sufficiently unique pseudo-uid is generated from those parts of the resource, that do not change over time, and ensure its time-space uniqueness (i.e. if a resource is deleted and a new one is created with the same name, it should be a different pseudo-uid).

This goes slightly against K8s API specification, but the reality is that some resources, e.g. `v1/ComponentStatus`, do not have uids. Thos should not fail the operator.

For such cases, use a fallback scenario, where a sufficiently unique pseudo-uid is generated from those parts of the resource, that do not change over time, and ensure its time-space uniqueness (i.e. if a resource is deleted and a new one is created with the same name, it should be a different pseudo-uid).
@nolar nolar added the bug Something isn't working label Dec 6, 2020
@nolar nolar merged commit 6a18296 into master Dec 6, 2020
@nolar nolar deleted the objects-with-no-uid branch December 6, 2020 20:27
@lgtm-com
Copy link

lgtm-com bot commented Dec 6, 2020

This pull request introduces 1 alert when merging 836ed51 into 87456ff - view on LGTM.com

new alerts:

  • 1 for Unused import

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant