Skip to content

docs: Add CRD versioning ADR #712

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

docs: Add CRD versioning ADR #712

wants to merge 2 commits into from

Conversation

Techassi
Copy link
Member

@Techassi Techassi commented Feb 25, 2025

@Techassi Techassi self-assigned this Feb 25, 2025
Copy link

netlify bot commented Feb 25, 2025

Deploy Preview for stackable-docs ready!

Name Link
🔨 Latest commit e9f213a
🔍 Latest deploy log https://app.netlify.com/sites/stackable-docs/deploys/67c189ad2027ef000805337e
😎 Deploy Preview https://deploy-preview-712--stackable-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@sbernauer sbernauer left a comment

Choose a reason for hiding this comment

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

LGTM in general, just some small remarks

> [!TIP]
> This approach can be used for fields which opt into optional (experimental) features but still providing the ability to customize using the field. Using `Option<T>` will push the responsibility of dealing with `None` (eg. using a default fallback value) to the operator.

**TODO:** Can we detect the addition of an optional field and thus enable not needing to bump / introduce a new version? We *can* somehow reliable detect `Option`, but it is not guaranteed to be the `Option` (from the standard library) we expect.
Copy link
Member

Choose a reason for hiding this comment

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

I fear it's very complicated to determine this and I'm fine not automating this for now (and rely on human intelligence to determine if the version should bumped).
If we determine the breakingness however, I think we should be looking at the generated crd.yaml, not the Rust code. Maybe there are already some tools for that already ;)

# ...
spec:
foo: 42
# Not setting the field at all
Copy link
Member

Choose a reason for hiding this comment

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

nit (optional): I find it easier to read this way

Suggested change
# Not setting the field at all
# Not setting the field at all


## Change: Renaming a field

A renamed field can **always** be modelled as a non-breaking change which is also backwards compatible, meaning that a newer version of a field can be converted back to an older version.
Copy link
Member

Choose a reason for hiding this comment

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

A renamed field can always be modelled as a non-breaking

From my perspective renaming a field is breaking. There are valid yamls before that are not valid after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Development: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants