atlantis

by QuenchWorks

Helm chartv0.0.32App 0.48.2Apache-2.0Verified publisher

Terraform pull-request automation that runs plan on PRs and apply from PR comments, enforcing reviewed, Git-driven infrastructure changes with state locking. Hardened by QuenchWorks as a minimal, nonroot, CVE-gated image, cosign-signed and pinned by digest.

About this chart

Quenchworks Atlantis

Hardened Atlantis, Terraform/OpenTofu pull-request automation, on a minimal, nonroot, CVE-gated image pinned by digest. Built from source on Wolfi.

Atlantis listens for VCS webhooks, clones the PR branch, runs plan/apply, and posts the output back as PR comments. The server (web UI + the /events webhook endpoint + /healthz) listens on port 4141.

OpenTofu, not Terraform

This image bundles OpenTofu (MPL-2.0) as the execution engine, not Terraform (which moved to the BUSL-1.1 source-available license). OpenTofu is a clean MIT/MPL-licensed drop-in. The chart defaults defaultTFDistribution: opentofu, so Atlantis runs the bundled tofu binary. You can verify it in the pod:

kubectl exec atlantis-atlantis-0 -- tofu version

Install

helm install atlantis oci://ghcr.io/quenchworks/charts/atlantis \
  --set vcs.username=my-bot \
  --set vcs.githubToken=ghp_xxx \
  --set vcs.webhookSecret=$(openssl rand -hex 20) \
  --set repoAllowlist='github.com/myorg/*' \
  --set atlantisUrl=https://atlantis.example.com

Wiring it up

  1. VCS credentials. Set vcs.username + vcs.githubToken (a token for a bot account) and vcs.webhookSecret. These render into a managed Secret; or point vcs.existingSecret at your own Secret with keys gh-token / gh-webhook-secret (override via vcs.secretKeys). If vcs.webhookSecret is left empty a 32-char secret is generated once and preserved across upgrades.
  2. Repo allowlist. Set repoAllowlist to the repos Atlantis may operate on (comma-separated, globs OK, e.g. github.com/myorg/*). Required, Atlantis refuses to start without it.
  3. Atlantis URL. Set atlantisUrl to this server's externally reachable base URL.
  4. Webhook. In your VCS, add a webhook pointing at <atlantisUrl>/events using the same webhook secret. Subscribe to pull-request + comment events.

Real plan/apply needs a reachable VCS: Atlantis clones the PR branch over git (https or ssh, the image ships git + openssh-client) and posts results back via the VCS API.

Server-side repo config (optional)

Set repoConfig to an Atlantis server-side repos.yaml; it is rendered into a ConfigMap, mounted at /etc/atlantis/repos.yaml, and passed via --repo-config. The value is templated.

repoConfig: |
  repos:
    - id: /.*/
      apply_requirements: [approved, mergeable]
      allowed_overrides: [workflow]

Persistence

Atlantis keeps per-PR state on disk under --data-dir (/atlantis-data: cloned repos + plan files), so the chart ships a StatefulSet with a persistent volume. It also serialises plan/apply on disk and is not horizontally scalable: keep replicaCount: 1.

keydefaultmeaning
persistence.enabledtrueprovision a PVC for /atlantis-data
persistence.size8GiPVC size
persistence.existingClaim""bind an existing PVC instead

Security

  • Runs as nonroot uid 1001, readOnlyRootFilesystem: true, all capabilities dropped. Writable paths are the data PVC (/atlantis-data, also $HOME) and an emptyDir /tmp.

  • A NetworkPolicy guards ingress on 4141. Because the VCS webhook source is typically external, networkPolicy.allowExternal defaults true; tighten it if your VCS reaches Atlantis from inside the cluster.

  • The image is pinned by digest and signed (cosign keyless):

    cosign verify ghcr.io/quenchworks/images/atlantis \
      --certificate-identity-regexp 'https://github.com/quenchworks/.+' \
      --certificate-oidc-issuer https://token.actions.githubusercontent.com
    

    Each build also ships an SPDX SBOM and SLSA provenance attestation. Verify them with gh attestation verify oci://ghcr.io/quenchworks/images/atlantis --owner quenchworks.

Key values

keydefaultmeaning
vcs.providergithubVCS to integrate with
vcs.username""the bot user Atlantis acts as
vcs.githubToken""VCS API token (or use vcs.existingSecret)
vcs.webhookSecret""inbound webhook HMAC secret (auto-generated if empty)
vcs.existingSecret""bring your own credentials Secret
repoAllowlist""required: repos Atlantis may operate on
atlantisUrl""externally reachable base URL
defaultTFDistributionopentofuexecution engine (opentofu / terraform)
repoConfig""optional server-side repos.yaml
service.port4141server + webhook + UI + /healthz
service.httpsPort443Service port for the TLS listener (container 8443) when tls.enabled.
tls.enabledfalseServe HTTPS on Atlantis's own listener; the certificate is mounted at /tls.
tls.existingSecret""Use this kubernetes.io/tls Secret (1st choice).
tls.certManager.enabledfalseRequest a cert-manager Certificate from tls.certManager.issuerRef (2nd choice).
tls.selfSigned.validityDays365Otherwise Helm generates a CA + certificate, kept across upgrades.
ingress.enabledfalseCreate an Ingress. With tls.enabled it routes to 443: set the controller's backend protocol to HTTPS.
ingress.className""IngressClass to claim it. Empty leaves it unset, so the cluster default applies.
ingress.annotations{}Controller annotations (rewrite targets, body size, cert-manager issuer, ...).
ingress.servicePortnullBackend port. Unset resolves service.port, then service.ports.http / .https.
ingress.hosts[]e.g. [{host: app.example.com}]. A host with no paths gets a single / Prefix path.
ingress.tls[]Standard Ingress TLS list, e.g. [{hosts: [app.example.com], secretName: app-tls}].

Deploy atlantis with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has atlantis on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartatlantis is pinned at v0.0.32 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply