For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create and manage ApplicationSets

Learn how to create and manage GitOps ApplicationSets in Harness.

Harness provides two ways to work with GitOps ApplicationSets:

  1. First-Class Support (Recommended) - Enhanced UI wizard with Service/Environment integration, full CRUD operations, improved RBAC, and Terraform support

  2. Standard Flow - Create ApplicationSets as GitOps Applications with manual YAML configuration

FIRST-CLASS APPLICATIONSET SUPPORT

First-class ApplicationSet support is generally available. The former GITOPS_APPLICATIONSET_FIRST_CLASS_SUPPORT feature flag is no longer a runtime gate.

Use the First-Class Support tab in the Create and Manage ApplicationSets section below for the enhanced UI wizard.

Use the Standard Flow tab when you manage ApplicationSet YAML in Git without the wizard.

What you'll learn

With First-Class Support:

  • Create ApplicationSets using the Harness UI wizard

  • Configure generators to dynamically create applications

  • Define templates with Service and Environment labels

  • Validate and preview ApplicationSet manifests

  • Monitor ApplicationSet sync status and generated applications

With Standard Flow:

  • Create ApplicationSets as GitOps Applications

  • Configure ApplicationSet manifests in Git

  • Sync ApplicationSets to generate child applications

  • Monitor generated applications

Prerequisites

Before you begin, ensure you have:

Additional for First-Class Support:

Additional for Standard Flow:

  • At least two target clusters (e.g., dev and prod)

  • GitHub account with access to clone and modify repositories

ApplicationSets are project-scoped entities. All applications generated by an ApplicationSet belong to the same Harness project as the ApplicationSet itself.

ApplicationSet overview

An ApplicationSet is a Kubernetes custom resource that enables you to automatically generate and manage multiple Argo CD applications from a single manifest. It consists of two main components:

  • Generator: Defines the source of parameters used to create applications (e.g., Git repositories, clusters, lists)

  • Template: Defines the application structure with parameterized fields that get substituted with values from the generator

For more information about ApplicationSet concepts, see ApplicationSet basics.


Create and Manage ApplicationSets

SELECT YOUR FLOW

Choose the appropriate tab below:

  • First-Class Support: If you have access to the enhanced UI wizard (recommended)

  • Standard Flow: If you're using the standard ApplicationSet creation method

Create ApplicationSet (Standard Flow)

Use this standard flow to manage ApplicationSet YAML in Git directly, without the wizard.

Step 1: Update manifests in Git

The following example uses a Git generator from the Argo Project's public repository.

  1. Clone the ApplicationSet repository and navigate to the example directory.

  2. Update git-generator-files.yaml with the following YAML configuration:

  3. To get the project ID:

    • Go to Deployments > GitOps > Settings > GitOps Agents

    • Find the Argo Project ID you want to use to create the ApplicationSet

      Click to view full size image
  4. Navigate to applicationset/examples/git-generator-files-discovery/cluster-config/engineering/dev/config.json

  5. Replace "address": "https://1.2.3.4" with the Endpoint IP address for your dev target cluster. Ensure you use the https:// scheme.

    This cluster must be created in Harness beforehand.

  6. Repeat for the prod target cluster by modifying applicationset/examples/git-generator-files-discovery/cluster-config/engineering/prod/config.json

Here's an example of the cluster configuration:

Click to view full size image

Both JSON and YAML formats are supported for ApplicationSet configuration files.

Step 2: Create the ApplicationSet application

  1. In your Harness project, go to Deployments > GitOps.

  2. Select Applications from the left navigation.

  3. Click New Application.

  4. Enter the following details:

    • Application Name: Enter a name for your ApplicationSet

    • GitOps Agent: Select the agent that will manage this ApplicationSet

    • Sync Policy: Leave the default settings or configure as needed

  5. Click Continue.

  6. In the Source section, configure:

    • Repository URL: Select the GitOps repository you added earlier

    • Target Revision: Select master or your main branch

    • Path: Enter examples/git-generator-files-discovery

      Click to view full size image
  7. Click Continue.

  8. In the Destination section:

    • Cluster: Select the cluster where your GitOps agent is installed

    • Namespace: Select the namespace where your GitOps agent is installed

  9. Click Save to create the ApplicationSet application.

Step 3: Sync the ApplicationSet application

You can sync the ApplicationSet from two places: the Applications view or a PR pipeline.

Sync from Applications View

From the Applications view, you can sync the Harness ApplicationSet application or the individual child applications independently.

Click to view full size image

Automatic Syncing

If you configure automatic syncing in the ApplicationSet template, the applications sync automatically. See syncPolicy.automated in the following example:

Sync via PR Pipeline

For syncing ApplicationSets through PR pipelines, refer to Sync GitOps applications.


Next Steps

Last updated

Was this helpful?