Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-5826

ManagedCluster assigned to KubeVirt Platform HostedCluster causes tenant to fail

XMLWordPrintable

    • 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:

      1. Create a kubevirt platform hosted cluster cluster using hypershift cli
      2. create a ManagedCluster for the hosted cluster
      3. 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 

              rokejungrh Roke Jung
              rhn-engineering-dvossel David Vossel
              David Huynh David Huynh
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: