π Site Values Auto Deployment
This guide will show you how to structure your configurations and quickly troubleshoot the site-values-deployment pipeline like a pro!
π Standard Deployment Workflowβ
Triggering a deployment is effortless: just push your configuration changes straight to the master branch.
Example: Need to update Loki in the dev environment?
- Open up
infra/loki/dev.yamland make your edits. - Commit and push your changes to
master. - The pipeline instantly detects the change, maps it to the
infra-lokirelease, and deploys only that specific release todev. Magic! β¨
π File and Directory Structureβ
To guarantee the pipeline detects your changes, you must stick to the expected Helmfile directory structure. Don't worry, it supports nested Helmfiles!
A standard, clean service layout looks exactly like this:
team-folder/
βββ helmfile.yaml.gotmpl # Defines the releases
βββ service-name/
β βββ base.yaml.gotmpl # Base config (applies everywhere!)
β βββ dev.yaml # Dev-specific config
β βββ prod.yaml # Prod-specific config
β βββ dev/ # Additional dev-specific overrides
β βββ additional-config.yaml
π§ͺ Running a Dry Runβ
Want to test the waters before diving in? You can preview what the pipeline would do without actually applying anything to the cluster!
Simply run the pipeline manually in Jenkins and flip the DRY_RUN parameter to true. The pipeline will run a safe helmfile diff, print the results for you to inspect, and skip the final apply stage.
π οΈ Troubleshootingβ
Did your deployment skip a beat? Check these common culprits:
- π» No changes were detected: Double-check that your modified file is inside a monitored team folder and is explicitly listed in the
valuessection of your release insidehelmfile.yaml.gotmpl. Also, ensure the filename perfectly matches the target environment! - π₯ Too many releases deployed: Oops! Check your file naming. You might have accidentally dropped environment-specific configs into a base file, triggering a massive global deployment.
- π A dynamic stage failed: If the apply process fails midway, it will not auto-retry. Manually trigger it in Jenkins with the
DEBUG_LOGGING=trueparameter enabled. This will spit out detailed trace logs to help you hunt down the root cause!