Help Center/ CodeArts Pipeline/ User Guide/ CodeArts Release User Guide/ Deploying a Microservice Based on GitOps
Updated on 2025-08-13 GMT+08:00

Deploying a Microservice Based on GitOps

GitOps-based deployment provides a fully managed, secure, and automated approach to Kubernetes deployments. This is achieved by the GitOps runtime that is installed on customers' Kubernetes clusters using ArgoCD and CodeArts agents. This solution fully operates behind customers' firewall without requiring direct external access to their clusters. The GitOps runtime installed on the clusters pulls deployment configurations from Git and communicates securely with CodeArts Release via CodeArts agents. This solution ensures that all deployment configurations are version-controlled in Git, allowing for declarative, auditable, and consistent application delivery across environments.

Constraints

This feature is only available in the AP-Singapore region.

Installing the GitOps Runtime

  1. Create a release environment by referring to Creating a Release Environment.
  2. Click the environment name to go to the Basic tab page.
  3. Click Configure Runtime. On the displayed Configure GitOps Runtime page, obtain and configure an access key by referring to Step 1 in the wizard.

  4. Click and then click Generate Command. Expand the helm installation commands, copy the commands, and run them on your Kubernetes cluster.

  5. Click Close. The GitOps runtime is configured.
  6. On the Basic tab page, check and monitor the GitOps runtime status.

Creating a Microservice Deployment Configuration

  1. Access the CodeArts Pipeline homepage by referring to Accessing CodeArts Pipeline.
  2. Choose CICD > Pipeline > Microservices. The microservice list page is displayed.
  3. Create a microservice by referring to Creating a Microservice, or search for the microservice for which you want to create a deployment configuration. Click the microservice name to go to the Overview tab.
  4. Click the Deployment Configurations tab, and then click . On the Create Deployment Configuration page, set the basic information. The parameters are described in Table 1.

    Table 1 Parameter description

    Parameter

    Description

    Project

    Project to which the deployment configuration belongs. The project cannot be changed.

    Deployment Configuration Name

    Name of the deployment configuration. Enter a maximum of 128 characters, including letters, digits, hyphens (-), and underscores (_).

    Deployment Engine

    Choose between Release Policy and GitOps.

    Artifact Type

    Choose between Helm and Kustomize.

    Artifact Source

    Artifact repository source. Currently, only Git repositories are supported.

    Code Source

    Code repository source. Currently, only CodeArts Repo is supported.

    Repository

    A repository in the current project. Select a GitOps repository.

    Branch

    A branch in the code repository.

    Path

    A path in the code repository.

    Namespace

    Namespace on which the deployment will be performed.

    Description

    Description of the deployment configuration. Enter a maximum of 200 characters.

    Helm Value Files

    List of files inside the same Git repository. These files will be used as Helm values for Helm templating during deployment.

    Helm Parameters

    Parameters injected for Helm templating during deployment.

  5. If Artifact Type is set to Helm, click Create Parameter under Helm Parameters and set the key and value. To delete a parameter, click .

  6. Click OK. The microservice deployment configuration is created.

Deploying a Microservice Instance

  1. Access the CodeArts Pipeline homepage by referring to Accessing CodeArts Pipeline.
  2. Choose CICD > Release to access the Environment page.
  3. Click the environment where you want to deploy a microservice to go to the Basic tab page.
  4. Click the Microservice Instances tab.
  5. Click Create Microservice Instance. On the displayed page, set the basic information. The parameters are described in Table 2.

    Table 2 Parameter description

    Parameter

    Description

    Project

    Project to which the deployment configuration belongs. The project cannot be changed.

    Microservice

    Name of the microservice to be deployed.

    Deployment Configuration

    Name of the deployment configuration to be used to deploy the microservice.

    Description

    Description of the microservice instance. Enter a maximum of 200 characters.

  6. Click to determine whether to overwrite the default deployment configuration.

  7. Click the microservice name. The Overview tab page is displayed. Check the deployed microservice.
  8. Choose CICD > Release, click the name of the environment where the microservice has been deployed, and then click Deployment History to check the microservice deployment records.

    • Only one microservice instance is allowed for a microservice on a single environment.

Automatically Updating a Deployed Microservice Using CodeArts Pipeline

  1. Create a pipeline by referring to Creating a Pipeline.
  2. On the Task Orchestration tab of the pipeline details page, click New Job. The New Job page is displayed.
  3. Click Add next to the DeployMicroserviceInstance extension, and set the basic information. The parameters are described in Table 3.

    Table 3 Parameter description

    Parameter

    Description

    Name

    Name of the extension. Enter a maximum of 128 characters. Only letters, digits, spaces, and these special characters are allowed: -_,;:./()

    Environment

    Release environment, which is associated with your cluster resources. It contains the configurations for the upcoming deployment.

    Microservice

    Microservice that has been deployed. It is associated with the microservice instance configured in Deploying a Microservice Instance and will be automatically updated.

    Helm Parameters Patch

    Parameters injected for Helm templating during deployment.

  4. Click OK. The DeployMicroserviceInstance extension is added.
  5. Click Save. CodeArts Pipeline will automatically update this deployed microservice.