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

HetznerBareMetalHost status is part of spec #1333

Open
simonostendorf opened this issue Jun 8, 2024 · 3 comments
Open

HetznerBareMetalHost status is part of spec #1333

simonostendorf opened this issue Jun 8, 2024 · 3 comments
Assignees

Comments

@simonostendorf
Copy link

/kind bug

What steps did you take and what happened:

If you describe a HetznerBareMetalHost you can see, that the .status fields are placed under .spec.status.

What did you expect to happen:

Placing status as .status and not as .spec.status is the "normal" way. Are there any reasons why this is placed under .spec.status here?

Anything else you would like to add:

You can see the same structure in the code here.

Environment:

  • cluster-api-provider-hetzner version: v1.0.0-beta.34
  • Kubernetes version: v1.30.0
@janiskemper
Copy link
Contributor

Yes there is. The status in Kubernetes is something that can be lost and the reproduced. What you see in spec.status cannot be reproduced in some parts and therefore cannot be put into the Kubernetes status, at least parts.

This is why we had the options of putting it under spec (what we did) or in the annotations in some compact json string. We decided to put it in the spec because it is more stable than the annotations that have a size limit.

If you have another perspective how to achieve this (to not lose this data because we cannot just re-create it in any reconcile loop), I'm open for it!

@simonostendorf
Copy link
Author

Thank you for your quick and detailed reply @janiskemper!

I think the decision is understandable and I have no further perspective or questions.

The whole decision (or this issue) could be written/referenced as code comment to avoid future questions and to document the decision process.

@janiskemper
Copy link
Contributor

makes sense! will do!

@janiskemper janiskemper self-assigned this Jun 10, 2024
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

No branches or pull requests

3 participants