ON-PREM CHOREO CLOUD BOTH

What it is

The environment pin is a small Flux file called base.yaml. It says which snapshot of the wso2cloud-deployment repository an environment runs. Flux is the GitOps tool that keeps a cluster in sync with a Git repository. On dev the pin follows the main branch. On the other environments it names a commit, and some also name a branch.

The pin is a bookmark in a book that keeps growing. The book is main, and the bookmark says which page this environment is reading.

Why it exists

Every manifest lives on main, and the environment branches are thin. Something must say which snapshot of main each environment uses. Moving that one pointer moves the whole environment together, with no rebuild.

How it works

  • The file is wso2cloud-controlplane/kustomizations/base.yaml on the environment branch. Each data plane cluster has a matching base.yaml.
  • It is a Flux GitRepository object named wso2cloud-deployment. Dev has ref.branch main and a 2 minute check interval. Stage, prod and the v2 environments set ref.commit and check every minute.
  • A promotion pull request, on a branch named promote-<env>-<epoch>, rewrites the pin to a commit of main.
  • A hotfix pull request, on a branch named hotfix-update-<env>-<epoch>, rewrites the pin to a commit on a hotfix-manifests branch. That branch name is written next to the commit.
  • When such a pull request merges, Flux in every cluster of that environment syncs the new snapshot.

Key facts

File
wso2cloud-controlplane/kustomizations/base.yaml
Kind
Flux GitRepository, named wso2cloud-deployment
Dev pin
branch main
Other pins
a commit, with a branch name on hotfix pins
Changed by
promotion and hotfix pull requests
Namespace
env branches

Used by (10)