After upgrading to Operator 1.6.1, some Serving and Eventing CRs will no longer apply using server-side apply. This appears to happen on clusters that at one point had pre v1beta1 CRs.
Repro Steps
- Install Operator
1.2.2
- Apply a Serving or Eventing CR using
v1alpha1 using a server-side apply (e.g. kubectl apply --server-side=true)
- Upgrade to Operator version
1.5.3 (note that this repros upgrading with 1.3.2 and 1.4.1 as intermediate steps as well)
- Update CRs to use
v1beta1 using server-side apply
- Upgrade to Operator version
1.6.1
- Perform a server-side apply on any CR (no changes necessary)
Expected
Server-side apply succeeds.
Actual
Server-side apply fails with the following error:
Error from server: request to convert CR to an invalid group/version: operator.knative.dev/v1alpha1
Additional Information
This was reproduced on live clusters have have used the Operator since at least release v1.0. This appears to be due to a lingering metadata.managedFields entry that references operator.knative.dev/v1alpha1. You can find a script that easily reproduces this issue in this repo.
After upgrading to Operator
1.6.1, some Serving and Eventing CRs will no longer apply using server-side apply. This appears to happen on clusters that at one point had prev1beta1CRs.Repro Steps
1.2.2v1alpha1using a server-side apply (e.g.kubectl apply --server-side=true)1.5.3(note that this repros upgrading with1.3.2and1.4.1as intermediate steps as well)v1beta1using server-side apply1.6.1Expected
Server-side apply succeeds.
Actual
Server-side apply fails with the following error:
Additional Information
This was reproduced on live clusters have have used the Operator since at least release
v1.0. This appears to be due to a lingeringmetadata.managedFieldsentry that referencesoperator.knative.dev/v1alpha1. You can find a script that easily reproduces this issue in this repo.