Skip to content

System Sync

System Sync enables two Ways or bidirectional Sync to maintain the configuration in the system (system database) and Git repository sync. Any configuration changes performed in the Git repository get reflected in the system, and vice-versa is supported. To achieve this bidirectional sync, external and internal triggers are required. External triggers (Pipeline Triggers) notify whenever resources are modified in a Git repository, and internal triggers notify whenever resources are modified in an internal artifact store


Pre-requisites

System Sync Stage requires the below setup to complete the sync successfully

Github Repository

  • User should create a valid Git repository
  • Update the created repository in the Respositories page with an appropriate name

GitOps Agents

  • Create GitOps Agents and associate with the K8s Cluster for secured connectivity to the repositories
  • Git Repo used for System-Sync must be associated with the GitOps agent. This helps to access the repositories available in the private network

System Sync Operation

This stage is responsible for resource config sync between Git Repository and the system

  • Provide a friendly name for the stage
  • Select System Sync
  • To sync the resource specification from Git Repository to System, select Git To System Sync checkbox
  • Select the Repository from where the resource details are to be cloned
  • Provide the Tag/Branch of the repository
  • Provide the appropriate Folder path of the repository

Git to System

  • To sync the resource specification (updated through Controller) from system to Git Repository to System, select System To Git Sync checkbox
  • Select the Repository to which the resource details must be synced
  • Provide the Tag/Branch of the repository
  • Provide the appropriate Folder path of the repository

System to Git

  • Select Use Source As Destination checkbox to use the same source destination (or) uncheck this option to provide a different (system or repo) destination

Include / Exclude Resources

Include Resources allows the users to add all the resources or add only the required resources anytime. Click Add Resource to include one or more resources. This operation sync only the selected resource(s) in Git Repository and System. Below are the supported resources

  • Blueprint
  • Workload
  • Workload Template
  • Add-On
  • Namespace
  • Pipeline
  • Infrastructure Provisioner
  • GitOps Agent

By default, All Resources are selected from the drop-down

Exclude Resource allow the users to remove the resource(s) anytime. Click Add Resource to exclude one or more resources

Include/Exclude Resources

Pre-Conditions (Optional)

Stages can be configured to execute ONLY if the expression matches the specified pre-conditions

Stage Variables (Optional)

All the variables available for a given stage are fetched as a sorted list according to their scope (Organization -> Project -> Pipeline -> Trigger -> Stage). These variables are evaluated with the environment. The environment is then updated with the variable according to their scope

Click Save to add the system sync stage to the pipeline or Cancel to abort the process. Click Save and Go To Triggers to complete the sync process and trigger the changes

Add to Triggers

Refer Triggers for more information


Success System Sync

The System Sync job begins automatically in the pipeline. The initial status is In Progress, later changes to Success. Use the Run button to trigger the pipeline for the changes performed manually in the system

Add to Triggers

Users can view the recently triggered changes on the Triggers page. Also, this creates a pipeline in Git Repo with all the selected resources in the specified project. Below is an example of demo-project and the included resources are addons, blueprints, and pipelines

Resources in Git Repo

Below is an example of the add-ons resource in Git Repository where the users can view or update the resource specs based on the selected direction during system sync stage creation

Git Repo Specs

Important

When a resource contains a secret value/key, the system sync fails for that specific resource, but continues with the other resources. Currently, Infrastructure Provisioners is the only resource that can contain a secure text

Refer Infrastructure Provisioners for more details on Infrastructure Provisioners configurations


System Sync Output

On a successful run, select the job and click Output to view any updates/modifications triggered recently within the system. Below is an example of the resource updates triggered internally in the controller.

System Sync Output

Event Payload

Click Event Payload to view in which resource the changes are performed, user id, type of operation, etc.

  • The changes performed internally through the controller, i.e., System To Git Sync, the Trigger type in the controller is Internally Triggered
  • The changes performed externally through Git repository, i.e., Git to System Sync, the Trigger type is Webhook
  • Manually running the job after a change using the Run icon, the Trigger type is Manually Triggered

Event Payload


System Sync Pipeline Sharing

Users can share a system sync pipeline with All Projects/Specific Projects/None. When sharing the system sync pipeline and any resources containing a secret value/key, system sync fails for that specific resource and proceeds with the other resources

Users can also create a new project in Git Repository and use the existing pipeline of any project