Configure GitOps with Helm charts

Configure GitOps repositories in Cloudbees CD/RO during Helm chart installation by supplying credentials and repository settings in the values configuration. The installation process automatically creates repository plugin configurations, source code synchronization objects, and optional polling triggers. An example configuration demonstrates how to use a Kubernetes secret with a GitHub repository to provision a sample GitOps project.

1 minute readReference
These instructions are for use during installation only. Use these steps to configure a repository during installation.

Cloudbees CD/RO features options to configure GitOps repositories during Helm installation. These options allow devops administrators to:

Creating a values configuration for GitOps

You can configure GitOps support on Cloudbees CD/RO during installation using the following values:

gitops: enabled: true repo: # Either specify the secret where the gitToken is stored under # the 'CBF_GIT_TOKEN' key (recommended for production) or specify gitToken: existingSecret:
▼

Example configuration

In the following example, an scmSync object is created in the GitOps project. This points to the sample GitHub repository, gitopsdemo, which creates a sample procedure as part of the Helm chart installation.

To create a GitOps configuration:

  1. Create the secret to use in your GitOps configure-caption:

    kubectl create secret generic my-gitops-token \ --from-literal=CBF_GIT_TOKEN='ghp_rdfdffdffdfdummmytoken' \ -n <namespace>
    ▼
  2. Append the GitOps configuration to your custom configuration (such as myvalues.yaml):

    gitops: enabled: true repo: https://github.com/flow-on-kubernetes/gitopsdemo.git existingSecret: my-gitops-token
    ▼

    Once configured, you can view the scmSync object on the Source code synchronizations page. The scmSync object is in the GitOps project.