-
Notifications
You must be signed in to change notification settings - Fork 47
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
Remove node-labeller #562
Remove node-labeller #562
Conversation
/hold Need to change more things |
a1b8e36
to
d08ec4d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is right now it will break existing installations. Both API versions need to be served in parallel for existing installations to be able to upgrade. And you should ensure that the None
conversion strategy is dropping unknown API fields. (see https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning)
api/v1beta2/ssp_types.go
Outdated
} | ||
|
||
// +kubebuilder:object:root=true | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline
go.mod
Outdated
@@ -37,6 +37,8 @@ require ( | |||
sigs.k8s.io/yaml v1.3.0 | |||
) | |||
|
|||
require gopkg.in/yaml.v2 v2.4.0 // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add this to the block below?
Can you also swap the order of commits, i.e. first introduce |
Agree with @0xFelix that the commits need to be reordered here. We also need to retain and deprecate |
@@ -146,7 +146,7 @@ type SSPStatus struct { | |||
|
|||
// +kubebuilder:object:root=true | |||
// +kubebuilder:subresource:status | |||
|
|||
// +kubebuilder:deprecatedversion:warning="ssp.kubevirt.io/v1beta1 ssp is deprecated" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to add this explicitly? IIRC this is also the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we have to add it, otherwise generator will not add deprecate: true
attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
@@ -3012,6 +3014,2038 @@ spec: | |||
type: object | |||
type: object | |||
served: true | |||
storage: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the storage version at v1beta1
until we have a proper migration/conversion strategy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIU we don't need the conversion strategy, because we don't need to migrate any values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to test this but the None
strategy just rewrites the APIVersion
to the newer version, given the schema change I don't think that's going to work if the original object contains NodeLabeller
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the default strategy value None is specified, the only modifications to the object are changing the apiVersion string and perhaps pruning unknown fields (depending on the configuration).
Which is exactly our use case, we just need to prune NL fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ha! I had forgotten the second part apologies, in that case None
is fine.
/lgtm |
@ksimon1 Would it be worthwhile adding |
AFAICT we would also need to rework the test to upgrade/deploy the operator itself from the local source tree for such a test to be valid: |
Apologies I missed the |
/lgtm Thanks! |
this api removes node labeller api fields which are no longer supported. NL was moved from SSP operator to kubevirt with: kubevirt/kubevirt#4916. Signed-off-by: Karel Šimon <ksimon@redhat.com>
this commit updates paths of new api version in code and removes deprecated node-labeller api fields Signed-off-by: Karel Šimon <ksimon@redhat.com>
This commit regenerates manifests with command `make container-build`. Inserted file with conversion strategy, which add spec.conversion.strategy: none field. Signed-off-by: Karel Šimon <ksimon@redhat.com>
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ksimon1 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 |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@ksimon1 Any reason to hold this anymore?
Also how on earth are you able to |
/hold cancel |
What this PR does / why we need it:
feat: remove node labeller and bump api to v1beta2
Original credit goes to #492 and @lyarwood
Release note: