Component ยท Shared or other
Env pin: base.yaml GitRepository ref
CHOREO CLOUD Release artifact Choreo Cloud service
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)
- read by wso2cloud-deployment (Flux/Terraform) Flux on every cluster syncs the commit named by base.yamlGit over SSH, interval 1m
- needed by Choreo Cloud environment: dev env branch holds its own release pointer
- needed by Choreo Cloud environment: stage env branch holds its own release pointer
- needed by Choreo Cloud environment: prod env branch holds its own release pointer
- needed by Choreo Cloud environment: prod-eu env branch holds its own release pointer
- needed by Choreo Cloud environment: stage-v2 env branch holds its own release pointer
- needed by Choreo Cloud environment: prod-v2 env branch holds its own release pointer
- needed by Choreo Cloud environment: prod-v2-eu env branch holds its own release pointer
- deployed by Promotion and hotfix PRs merge bumps the pin; images unchangedmerge
- deployed by hotfix-manifests-<tag> branch and deploy-side vhotfix tag pin moves to the hotfix commitmerge of sync PR