-
Bug
-
Resolution: Done
-
Critical
-
MCE 2.3.0
-
False
-
None
-
False
-
-
-
Critical
-
No
Description of problem:
After creating a KubeVirt platform HostedCluster. If a ManagedCluster is assigned to the HostedCluster, the HostedCluster's kubevirt platform fields are removed which causes the HostedCluster to fail.
This is likely caused by the Hypershift addon operator's usage of "Update" instead of "Patch" on the HostedCluster object. With an "Update", it's possible for fields to be dropped from the HostedCluster's spec if the component in question doesn't import the absolute latest HostedCluster api... for example, if hc.Spec.SomeNewVal is created in hypershift, but the addon operator doesn't vendor that new api, then a call to "Update" on the HostedCluster will cause the "SomeNewVal" field to be dropped.
Usage of the "Patch" operation across the board in ACM/MCE for HostedCluster and NodePool operations will remove this conflict. I have created an example of this here, https://github.com/stolostron/hypershift-addon-operator/pull/243
This task should be
- Replace all usages of Update for hypershift api to Patch
- Remove rbac for "update" of all hypershift resources in order to ensure this doesn't happen again
Version-Release number of selected component (if applicable):
MCE 2.3
How reproducible:
100%
Steps to Reproduce:
- Create a kubevirt platform hosted cluster cluster using hypershift cli
- create a ManagedCluster for the hosted cluster
- The hosted cluster's kubevirt platform struct then gets removed, causing failures to provision the guest cluster.
Actual results:
HostedCluster never completes and has fields stripped from its spec
Expected results:
HostedCluster completes and all spec fields are preserved
Additional info:
example fix, https://github.com/stolostron/hypershift-addon-operator/pull/243