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

Update API version to v1beta3 #1127

Merged
merged 4 commits into from
Nov 15, 2024
Merged

Conversation

akrejcir
Copy link
Collaborator

What this PR does / why we need it:

Which issue(s) this PR fixes:
The new API version removes feature gates and unused parameters. It is directly compatible with the old version, so a conversion webhook is not needed.

The stored version is still set to v1beta2, and ssp-operator watches this old version. In a next release we may switch to using the v1beta3 as the stored version.

Fixes: https://issues.redhat.com/browse/CNV-44976

Release note:

Added new API version v1beta3.

The version v1beta2 was introduced in v0.18.0.
Users probably have updated to this API version by now.

Signed-off-by: Andrej Krejcir <[email protected]>
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Nov 12, 2024
@akrejcir
Copy link
Collaborator Author

/cc @0xFelix @jcanocan @codingben

Copy link
Member

@0xFelix 0xFelix left a comment

Choose a reason for hiding this comment

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

Do we want to hold this back until the next release? Or do we want to switch to v1beta3 in the next release?

docs/configuration.md Outdated Show resolved Hide resolved
tests/tests_suite_test.go Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Can this be auto-generated?

Copy link
Collaborator Author

@akrejcir akrejcir Nov 12, 2024

Choose a reason for hiding this comment

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

Kubevirt uses https://pkg.go.dev/k8s.io/code-generator/cmd/conversion-gen . We can add it in a later PR. But currently we only have these few functions, so it may not be worth introducing an external tool.

@akrejcir
Copy link
Collaborator Author

Do we want to hold this back until the next release? Or do we want to switch to v1beta3 in the next release?

I'm not sure I understand your question. Both versions will be available for a few releases. This PR should go to 4.18.

webhooks/ssp_webhook.go Outdated Show resolved Hide resolved
Copy link
Member

@codingben codingben left a comment

Choose a reason for hiding this comment

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

/lgtm

@akrejcir How often we do such API bump? Is it done because of TokenGenerationService?

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2024
@akrejcir
Copy link
Collaborator Author

/lgtm

@akrejcir How often we do such API bump? Is it done because of TokenGenerationService?

Rarely, only when we want to do some incompatible change.
This PR is because we wanted to remove feature gates: https://issues.redhat.com/browse/CNV-44976

tests/tests_suite_test.go Show resolved Hide resolved
tests/webhook_test.go Outdated Show resolved Hide resolved
- Added unit tests for template validator placement check in webhook.
- Improved webhook unit test code to make it simpler to read and extend.
- Improved webhook functional test code.

Signed-off-by: Andrej Krejcir <[email protected]>
The new API version removes feature gates and unused
parameters. It is directly compatible with the old version,
so a conversion webhook is not needed.

The stored version is still set to v1beta2, and ssp-operator
watches this old version. In a next release we may switch
to using the v1beta3 as stored version.

Signed-off-by: Andrej Krejcir <[email protected]>
Updated docs/configuration.md to use new API version,
and removed section about feature gates.

Signed-off-by: Andrej Krejcir <[email protected]>
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2024
Copy link

sonarcloud bot commented Nov 14, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
39.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Copy link
Member

@0xFelix 0xFelix left a comment

Choose a reason for hiding this comment

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

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 0xFelix

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 14, 2024
@jcanocan
Copy link
Contributor

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 15, 2024
@kubevirt-bot kubevirt-bot merged commit 3b4dbe1 into kubevirt:main Nov 15, 2024
12 checks passed
@akrejcir akrejcir deleted the update-api-version branch November 15, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants