Creating ApplicationSet-based applications

Before you begin

  • Ensure that the Red Hat OpenShift GitOps operator is installed on the Hub cluster. For instructions, see RHACM documentation.
  • Ensure that both Primary and Secondary managed clusters are registered to GitOps. For registration instructions, see Registering managed clusters to GitOps. Then check if the Placement used by GitOpsCluster resource to register both managed clusters, has the tolerations to deal with cluster unavailability. You can verify if the following tolerations are added to the Placement using the command
    oc get placement <placement-name> -n openshift-gitops -o yaml.
      tolerations:
      - key: cluster.open-cluster-management.io/unreachable
        operator: Exists
      - key: cluster.open-cluster-management.io/unavailable
        operator: Exists
    In case the tolerations are not added, see Configuring application placement tolerations for Red Hat Advanced Cluster Management and OpenShift GitOps.

Procedure

  1. On the Hub cluster, navigate to All Clusters > Applications > Create application.
  2. Select type as Argo CD ApplicationSet - Push model.
  3. In General step 1, enter your Application set name.
  4. Select Argo server openshift-gitops and Requeue time as 180 seconds.
  5. Click Next.
  6. In the Repository location for resources section, select Repository type Git.
  7. Enter the Git repository URL for the sample application, the GitHub Branch, and Path where the resources busybox Pod and PVC will be created.
    1. Use the sample application repository as https://github.com/red-hat-storage/ocm-ramen-samples
    2. Select Revision as release-4.15
    3. Choose Path as busybox-odr-metro
  8. Enter Remote namespace value. (example, busybox-sample) and click Next.
  9. Select Sync policy settings and click Next.

    You can choose one or more options.

  10. Add a label <name> with its value set to the managed cluster name.
  11. Click Next.
  12. Review the setting details and click Submit.