Creating GitOps Application

Overview

Leverage Alauda Container Platform GitOps application management capabilities to visually create Argo CD ApplicationSet for comprehensive lifecycle management of containerized applications through GitOps Applications.

TOC

Prerequisites

Creating Argo CD Application via web console

Streamline application distribution through visual management interfaces.

Procedure

  1. Container Platform, and navigate to GitOps Applications.

  2. Click on Create GitOps Application.

  3. Configure parameters in Basic Info and Code Repository sections:

ParameterDescription
TypeApplication: Argo CD Application object for single namespace deployment
ApplicationSet: Argo CD ApplicationSet for cross-cluster/cross-namespace deployments with differential configurations
SourcePlatform integrated: Pre-configured GitLab/GitHub/Bitbucket repositories
ArgoCD integrated: GitLab/GitHub/Bitbucket/Gitee/Gitea repositories integrated via Argo CD. Please refer to Integrating Code Repositories via Argo CD dashboard
Integration Project NameToolchain project assigned by the Administrator
Version IdentifiersDeployment basis: Branch/Tag/Commit
Note:
  • Branch uses latest commit
  • Tag/Commit defaults to latest but configurable
Source File TypeKustomize: Uses kustomization.yaml for overlay configurations; for more details, please refer to the Kustomize Official Documentation
Helm: Uses values.yaml for templating; for more details, please refer to the Helm Official Documentation
Directory: Raw manifests
Source DirectoryRepository path containing base manifests. Supports root directory selection. All resources in this path will be deployed to target clusters
Custom ValuesSource File Type is Helm, you can select a custom Helm Values file
  1. Configure parameters in Destination sections:

    • Application: Differential configs don't modify base files in source directory.

    • ApplicationSet: Multi-cluster deployment with Differentiated Configuration.

    Note: Differentiated Configuration don't modify base files in Source Directory.

  2. Sync Policy (3-minute reconciliation interval).

    ParameterDescription
    Manually SyncRequires user confirmation when drift detected.
    Automatic SyncAutomatic reconciliation without human intervention.
    Sync Ignore ConfigurationConfigure using built-in/custom ignore templates, you can View Sync Ignore Configuration Fields in YAML File.
    Note: Custom templates require admin configuration.
  3. Click Create.

INFO

Manual Sync Note: Choose Synchronize Immediately for immediate deployment or Synchronize Later to trigger manually via details page.

View Sync Ignore Configuration Fields in YAML file

After configuring sync ignore rules, verify via:

  1. Navigate to GitOps Application

  2. Select target application

  3. Click Action > Update

  4. Inspect YAML file.

    ignoreDifferences: # The configuration actually ignored by the selected custom synchronization ignore configuration template
      - group: apps
        kind: Deployment
        jsonPointers:
          - /spec/replicas

Creating Argo CD Application via YAML

Procedure

  1. Container Platform, and navigate to GitOps Applications.

  2. Click on Create GitOps Application.

  3. Switch to the YAML tab.

  4. In the YAML sections, refer to the following YAML file and configure the relevant information. Replace namespace and project with your own namespace and project.

    apiVersion: argoproj.io/v1alpha1
    kind: Application
    metadata:
      name: guestbook
      namespace: argocd # Replace with your own namespace
    spec:
      project: default # Replace with your own project
      source:
        repoURL: https://github.com/argoproj/argocd-example-apps.git
        targetRevision: master
        path: helm-guestbook
      destination:
        server: https://kubernetes.default.svc
        namespace: guestbook
      syncPolicy:
        automated:
          prune: true
          selfHeal: true
        syncOptions:
          - CreateNamespace=true
  5. Click Create.

Creating Argo CD Application via CLI

Prerequisites

The web-cli plugin is installed and the web-cli switch is enabled.

kubectl apply -f application.yaml