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

[Doc] placement decision strategy

XMLWordPrintable

    • False
    • None
    • False
    • No

       

      Create an informative issue (See each section, incomplete templates/issues won't be triaged)

      Using the current documentation as a model, please complete the issue template. 

      Note: Doc team updates the current version and the two previous versions (n-2). For earlier versions, we will address only high-priority, customer-reported issues for releases in support.

      Prerequisite: Start with what we have

      Always look at the current documentation to describe the change that is needed. Use the source or portal link for Step 4:

       - Use the Customer Portal: https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes

       - Use the GitHub link to find the staged docs in the repository: https://github.com/stolostron/rhacm-docs 

      Describe the changes in the doc and link to your dev story

      Provide info for the following steps:

      1. - [x] Mandatory Add the required version to the Fix version/s field.

      2. - [x] Mandatory Choose the type of documentation change.

            - [ ] New topic in an existing section or new section
            - [x] Update to an existing topic

      3. - [x] Mandatory for GA content:
                  
             - [x] Add steps and/or other important conceptual information here: 

            In page https://github.com/stolostron/rhacm-docs/blob/2.9_stage/clusters/cluster_lifecycle/placement_decision.adoc,

      add below content:

        1. Decision strategy

      The `decisionStrategy` section of `Placement` can be used to divide the created 
      `PlacementDecision` into groups and define the number of clusters per decision group.

      Assume an environment has 310 clusters, 10 of which have the label prod-canary-west 
      and 10 have the label prod-canary-east. The following example demonstrates how to group 
      the clusters with the labels prod-canary-west and prod-canary-east into 2 groups, and 
      group the remaining clusters into groups with a maximum of 150 clusters each.

      ```yaml
      apiVersion: cluster.open-cluster-management.io/v1beta1
      kind: Placement
      metadata:
        name: placement1
        namespace: default
      spec:
        clusterSets:
          - global
        decisionStrategy:
          groupStrategy:
            clustersPerDecisionGroup: 150
            decisionGroups:
            - groupName: prod-canary-west
              groupClusterSelector:
                labelSelector:
                  matchExpressions:
                    - key: prod-canary-west
                      operator: Exists
            - groupName: prod-canary-east
              groupClusterSelector:
                labelSelector:
                  matchExpressions:
                    - key: prod-canary-east
                      operator: Exists
      ```

      The `decisionStrategy` section includes the following fields:

      • `decisionGroups`: Represents a list of predefined groups to put decision results.
          Decision groups will be constructed based on the `decisionGroups` field at first. 
          The clusters not included in the `decisionGroups` will be divided to other decision 
          groups afterwards. Each decision group should not have the number of clusters 
          larger than the `clustersPerDecisionGroup`.
          - `groupName`: Represens the name to be added as the value of label key `cluster.open-cluster-management.io/decision-group-name`
            of created `PlacementDecisions`.
          - `groupClusterSelector`: Defines the label selector to select clusters subset by label.
      • `clustersPerDecisionGroup`: A specific number or percentage of the total selected 
          clusters. The specific number will divide the placementDecisions to decisionGroups 
          each group has max number of clusters equal to that specific number.

      With this decision strategy defined, the placement status will list the group result, 
      including the decision group name and index, the cluster count, and the corresponding 
      `PlacementDecision` names.

      ```yaml
      status:
      ...
        decisionGroups:
        - clusterCount: 10
          decisionGroupIndex: 0
          decisionGroupName: prod-canary-west
          decisions:
          - placement1-decision-1
        - clusterCount: 10
          decisionGroupIndex: 1
          decisionGroupName: prod-canary-east
          decisions:
          - placement1-decision-2
        - clusterCount: 150
          decisionGroupIndex: 2
          decisionGroupName: ""
          decisions:
          - placement1-decision-3
          - placement1-decision-4
        - clusterCount: 140
          decisionGroupIndex: 3
          decisionGroupName: ""
          decisions:
          - placement1-decision-5
          - placement1-decision-6
        numberOfSelectedClusters: 310
      ```

      The `PlacementDecision` will have labels `cluster.open-cluster-management.io/decision-group-name` 
      and `cluster.open-cluster-management.io/decision-group-index` to indicate which group name 
      and group index it belongs to.

      ```yaml
      apiVersion: cluster.open-cluster-management.io/v1beta1
      kind: PlacementDecision
      metadata:
        labels:
          cluster.open-cluster-management.io/placement: placement1
          cluster.open-cluster-management.io/decision-group-index: "0"
          cluster.open-cluster-management.io/decision-group-name: prod-canary-west
        name: placement1-decision-1
        namespace: default
      ...
      ```

       

             - [ ] Add Required access level for the user to complete the task here:
             

             - [ ] Add verification at the end of the task, how does the user verify success (a command to run or a result to see?)

           
             - [ ] Add link to dev story here: https://issues.redhat.com/browse/ACM-5925

      4. - [ ] Mandatory for bugs: What is the diff? Clearly define what the problem is, what the change is, and link to the current documentation:

              rh-ee-ofischer Oliver Fischer
              qhao@redhat.com Qing Hao
              Hui Chen Hui Chen
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: