Home / Platform management / Clusters / Cluster Configuration Management (Alpha) / Create Sync Rule

Create Sync Rule

Synchronization rule refers to a resource mapping relationship from a Git repository to a specific cluster in the platform. By storing the configuration files of the application in the Git repository and creating synchronization rules in the platform, automatic batch deployment and status synchronization of the application can be achieved.

Prerequisites

You need to deploy the ArgoCD Operator in the global environment. Please refer to.

Note:

Create Sync Rule

  1. On the left navigation bar, click Clusters > Cluster Configuration Management.

  2. Click Create Sync Rule and configure the relevant parameters according to the following instructions.

    Parameter Description
    Integration Name The name of the integration when integrating with a code repository.
    Project Name The name of the project in the code repository.
    Code Repository The name of the code repository under the specified project.
    Branch The branch of the code repository where the configuration files are stored.
    File Path The directory of the configuration files. After selecting a directory, all YAML, YML, and JSON files in that directory and its subdirectories will be synchronized to the target cluster.
    Cluster of clusters Select one or more target clusters. After creating a synchronization rule, the configuration files in the code repository will be automatically synchronized to the target clusters and corresponding resources will be created.
    Note: When selecting All Clusters or All Clusters Except Global, the configuration resources will be automatically synchronized to newly added clusters.
  3. Click Create. You can determine the synchronization status of the resource synchronization rule based on the relevant status.

  4. After creating the synchronization rule, the platform will automatically generate a synchronization ID, which corresponds to a cluster. Click on the synchronization ID to view the specific resource names, synchronization status, and resource types of the recent task resource synchronization.

Sync Status

Synchronization status refers to the synchronization status of resources based on the current synchronization rules.

Sync Status Description
Pending Sync The resource status defined in the Git repository is inconsistent with the resource status in the environment, but the synchronization has not started yet.
Sync Failed Failed to synchronize any configuration files to the target cluster.
Syncing Any configuration file is currently being synchronized to the target cluster, and there are no file synchronization failures.
Synced All configuration files have been synchronized to the target cluster.

Health Status

Health status for the ArgoCD component’s health status.

Health Status Description
Unknown Unknown, there are issues with the YAML configuration file, the directory does not exist, or there are issues with the code repository.
Progressing Progressing, the resource has been successfully created, but the Pod is not in a Ready state.
Healthy Healthy, the Pod is in a Ready state.
Suspended Suspended, the spec.paused of the Deployment is set to true.
Degraded Degraded, the time from Progressing state to Healthy state exceeds the default 10 minutes.
Missing Missing, the resources in the YAML configuration file were not successfully created.

Relevant operations

You can click on the on the right side of the list page or click on the Actions in the upper right corner of the details page to update the configuration under the synchronization rule as needed, or delete the synchronization rule that is no longer in use.

Operation Description
Update Sync Rules Only supports updating the branch and file path information of the code repository.
Note: After adding or modifying the corresponding configuration, the changes will take effect immediately and start synchronizing resources. If you delete the corresponding configuration or uncheck the target cluster for synchronization, the existing resources in the target cluster will be deleted together.
Update Configuration File After updating the configuration file in the code repository, wait a moment, and the resources of the corresponding cluster will be synchronized according to the expected modifications.
Delete After deleting the synchronization rule, the synchronized resources in the target cluster will be deleted together.