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

Expand the discovery to handle MultiClusterEngineHCP type discovered clusters

XMLWordPrintable

    • 5
    • False
    • None
    • False
    • Hide

      Provide the required acceptance criteria using this template.
      * ...
      Show
      Provide the required acceptance criteria using this template. * ...
    • ACM-9641 - Hosted Cluster klusterlet management from ACM while MCE maintains HCP hosting
    • No
    • 5
    • Installer Sprint 2024-34

      Value Statement

      In order to support epic https://issues.redhat.com/browse/ACM-11041, the hypershift addon agent is going to become the discovery agent to discover hosted clusters from MCE and create DiscoveredCluster resources in MCE's namespace in the ACM hub cluster. The hypershift addon agent will create, update and remove these DiscoveredCluster resources. Here is the sample DiscoveredCluster resource.

       

      apiVersion: discovery.open-cluster-management.io/v1
      kind: DiscoveredCluster
      metadata:
        creationTimestamp: "2024-05-09T01:31:49Z"
        generation: 2
        labels:
          hypershift.open-cluster-management.io/hc-name: rj-0508a
          hypershift.open-cluster-management.io/hc-namespace: clusters
        name: rj-0508a
        namespace: local-cluster
        resourceVersion: "51271683"
        uid: ae3ed948-53e8-4a4c-8a60-1535331ee6bf
      spec:
        apiUrl: https://ad444596dab354e0b9fe2b8751c84479-464d8264d7f96e8d.elb.us-east-2.amazonaws.com:6443
        cloudProvider: aws
        creationTimestamp: "2024-05-09T01:28:49Z"
        credential: {}
        displayName: local-cluster-rj-0508a
        isManagedCluster: false
        importAsManagedCluster: false
        name: rj-0508a
        openshiftVersion: 4.15.12
        type: MultiClusterEngineHCP 

       

      The discover controller should handle MultiClusterEngineHCP type DiscoveredCluster differently when importAsManagedCluster is set to true.

       

      It should create a KlusterletConfig resource to get the klusterlet installed in a non-default namespace for the discovered cluster. This can be shared for all DiscoveredCluster resources from the same MCE namespace.

      apiVersion: config.open-cluster-management.io/v1alpha1
      kind: KlusterletConfig
      metadata:
        name: <DiscoveredClusterNamespace>-config
      spec:
        # has to be prefix of open-cluster-management- and less than 57 character
        agentInstallNamespace: open-cluster-management-<DiscoveredClusterNamespace>

      It should create a ManagedCluster resource with special annotations.

          apiVersion: cluster.open-cluster-management.io/v1
          kind: ManagedCluster
          metadata:  
            annotations:    
              import.open-cluster-management.io/hosting-cluster-name: <DiscoveredClusterNamespace>    
              import.open-cluster-management.io/klusterlet-deploy-mode: Hosted
              open-cluster-management/created-via: hypershift  
              agent.open-cluster-management.io/klusterlet-config: <DiscoveredClusterNamespace>-config
             name: $CLUSTER_NAME
          spec:  
            hubAcceptsClient: true  
            leaseDurationSeconds: 60 

       

      Create a klusterletaddonconfig resource that overrides the addon installation namespace. (still need to find out how from Qiu Jian)

      Definition of Done for Engineering Story Owner (Checklist)

      • ...

      Development Complete

      • The code is complete.
      • Functionality is working.
      • Any required downstream Docker file changes are made.

      Tests Automated

      • [ ] Unit/function tests have been automated and incorporated into the
        build.
      • [ ] 100% automated unit/function test coverage for new or changed APIs.

      Secure Design

      • [ ] Security has been assessed and incorporated into your threat model.

      Multidisciplinary Teams Readiness

      Support Readiness

      • [ ] The must-gather script has been updated.

            dbennett@redhat.com Disaiah Bennett
            rokejungrh Roke Jung
            David Huynh David Huynh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: