Configure GitOps with Helm charts

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.