Creating an ApplicationSet-based application

Before you begin

  • Ensure that the Red Hat OpenShift GitOps operator is installed on all three clusters: Hub cluster, Primary managed cluster and Secondary managed cluster. For instructions, see Installing Red Hat OpenShift GitOps Operator in web console.
  • On the Hub cluster, ensure that both Primary and Secondary managed clusters are registered to GitOps. For registration instructions, see Application management and GitOps > GitOps > Registering managed clusters to Red Hat OpenShift GitOps operator in Red Hat Advanced Cluster Management for Kubernetes product documentation. 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 Application management and GitOps > GitOps in Red Hat Advanced Cluster Management for Kubernetes product documentation.
  • Ensure that you have created the ClusterRoleBinding yaml on both the Primary and Secondary managed clusters. For instruction, see Application management and GitOps > GitOps > Deploying Argo CD with Push and Pull model > Prerequisites in Red Hat Advanced Cluster Management for Kubernetes product documentation.

Procedure

  1. On the Hub cluster, navigate to All Clusters > Applications > Create application.
  2. Select type as Argo CD ApplicationSet - Pull model.
  3. In General step, 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 main.
    3. Choose one the following Path:
      • workloads/deployment/odr-regional-rbd to use RBD Regional-DR.
      • workloads/deployment/odr-regional-cephfs to use CephFS Regional-DR.
  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.