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

Ensure all RHACM addons support configuring installnamespace in addondeploymentconfig

XMLWordPrintable

    • Ensure all RHACM addons support configuring installnamespace in addondeploymentconfig
    • Future Sustainability
    • False
    • Hide

      None

      Show
      None
    • False
    • Green
    • In Progress
    • 100% To Do, 0% In Progress, 0% Done

      OCP/Telco Definition of Done
      https://docs.google.com/document/d/1TP2Av7zHXz4_fmeX4q9HB0m9cqSZ4F6Jd4AiVoaF_2s/edit#heading=h.gaa58bzbvwde
      Epic Template descriptions and documentation.
      https://docs.google.com/document/d/14CUCEg6hQ_jpsFzJtWo29GfFVWmun2Uivrxq3_Fkgdg/edit
      ACM-wide Product Requirements (Top-level Epics)
      https://docs.google.com/document/d/1uIp6nS2QZ766UFuZBaC9USs8dW_I5wVdtYF9sUObYKg/edit

      *<--- Cut-n-Paste the entire contents of this description into your new
      Epic --->*

      Epic Goal

      This cross-squad Epic wants each squad to check if your addon already supports configuring installnamespace in addondeploymentconfigs, since ManagedClusterAddon spec.installNamespace will be removed in v1beta1.

      Check if you addon support configuring installnamespace in addondeploymentconfigs 

      How to check if your addon supports it? Your addon should have WithConfigGVRs() defined with AddOnDeploymentConfigGVR ** and WithAgentInstallNamespace() defined to get value from AddOnDeploymentConfig. For example:

      ```
      WithConfigGVRs(utils.AddOnDeploymentConfigGVR).
      WithAgentInstallNamespace(
      utils.AgentInstallNamespaceFromDeploymentConfigFunc(
      utils.NewAddOnDeploymentConfigGetter(addonClient),
      ),
      ).
      ```
      Example code: 
      https://github.com/open-cluster-management-io/addon-framework/blob/main/cmd/example/helloworld/main.go#L128 
      https://github.com/open-cluster-management-io/addon-framework/blob/main/cmd/example/helloworld_helm/main.go#L131

      Verify configuring installnamespace in addondeploymentconfigs 

      To verify if the function works, below is an example you can try:

      1. Create a test addondeploymentconfigs
      ```

      apiVersion: addon.open-cluster-management.io/v1alpha1
      kind: AddOnDeploymentConfig
      metadata:
        name: addon-deploy-config
        namespace: multicluster-engine
      spec:
        agentInstallNamespace: default
      ```

      2. Configure the addondeploymentconfig in your cma, I will use work-manager as an example
      ```

      apiVersion: addon.open-cluster-management.io/v1alpha1
      kind: ClusterManagementAddOn

      metadata:
        name: work-manager

      spec:
        installStrategy:
          placements:
          - name: global
            namespace: open-cluster-management-global-set
            rolloutStrategy:
              type: All
          type: Placements
        supportedConfigs:
        - defaultConfig:
            name: addon-deploy-config
            namespace: multicluster-engine
          group: addon.open-cluster-management.io
          resource: addondeploymentconfigs

      ```

      3. Check the addon pod install namespace.

      You can see a new workmgr pod is running in default namespace, and the pod under open-cluster-management-agent-addon  is removed. 

      ```

      k get pods -A | grep workmgr

      default                                            klusterlet-addon-workmgr-7c465b874f-cpmrl                         1/1     Running       0                14s
      open-cluster-management-agent-addon                klusterlet-addon-workmgr-7c465b874f-ht7mq                         1/1     Terminating   7                8d

      ```

      Why is this important?

      ManagedClusterAddon spec.installNamespace will be removed in v1beta1, addon MUST support configuring installnamespace in addondeploymentconfigs before ManagedClusterAddon v1alpha1 is removed. 

      Scenarios

      ...

      Acceptance Criteria

      ...

      Dependencies (internal and external)

      1. ...

      Previous Work (Optional):

      1. ...

      Open questions:

      1. ...

      Done Checklist

      • CI - CI is running, tests are automated and merged.
      • Release Enablement <link to Feature Enablement Presentation>
      • DEV - Upstream code and tests merged: <link to meaningful PR or GitHub
        Issue>
      • DEV - Upstream documentation merged: <link to meaningful PR or GitHub
        Issue>
      • DEV - Downstream build attached to advisory: <link to errata>
      • QE - Test plans in Polarion: <link or reference to Polarion>
      • QE - Automated tests merged: <link or reference to automated tests>
      • DOC - Doc issue opened with a completed template. Separate doc issue
        opened for any deprecation, removal, or any current known
        issue/troubleshooting removal from the doc, if applicable.
      • Considerations were made for Extended Update Support (EUS)

              qhao@redhat.com Qing Hao
              qhao@redhat.com Qing Hao
              Hui Chen Hui Chen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: