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

Add doc for OperatorPolicy mustnothave mode

XMLWordPrintable

    • 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 check if anyone reads this part of the issue template. 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. - [ ] Mandatory Add the required version to the Fix version/s field.

      2. - [ ] 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:

      Previously, the only allowed value for `remediationAction` in an OperatorPolicy was "musthave". We are adding the ability to set it to "mustnothave". A "musthave" policy is compliant if the operator described by the policy is present on the managed cluster, and when it is enforced, it will install or upgrade the operator to the desired level. On the other hand, a "mustnothave" policy is compliant only if the operator is not on the managed cluster, and enforcing such a policy will remove the operator resources. Since different users will want more/fewer resources removed during the enforcement process, there is another configuration field added to the policy: `removalBehavior`. This field is ignored for "musthave" policies.

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

      Policy admin.
        

             - [n/a] Add verification at the end of the task, how does the user verify success (a command to run or a result to see?)
      This is not a task.     
             - [x] Add link to dev story here: https://issues.redhat.com/browse/ACM-9287

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

      The main section is: https://github.com/stolostron/rhacm-docs/blob/2.11_stage/governance/policy_operator.adoc

      Add to the sample:
      ```

        removalBehavior: # [optional]
          operatorGroups: DeleteIfUnused
          subscriptions: Delete
          clusterServiceVersions: Delete
          customResourceDefinitions: Keep

      ```

      Add to the operator policy YAML table:

      • spec.complianceType | required | Specifies whether the described operator should (use value "musthave") or should not (use value "mustnothave) be on the managed cluster.
      • spec.removalBehavior | optional | Determines whether certain resource types should be kept or removed when enforcing an OperatorPolicy with `complianceType: mustnothave`; has no effect when `complianceType` is set to `musthave`. ¶ The subfield for `operatorGroups` can be set to "Keep" or "DeleteIfUnused" and defaults to "DeleteIfUnused" which will only remove the OperatorGroup if it is not used by any other operators. The subfields for `subscriptions`, and `clusterServiceVersions` can be set to either "Keep" or "Delete", and default to "Delete". The subfield for `customResourceDefinitions` can be set to "Keep" or "Delete", and defaults to "Keep". 

              mdockery@redhat.com Mikela Jackson
              jkulikau@redhat.com Justin Kulikauskas
              Derek Ho Derek Ho
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: