atlantis

by joaquinito2051

Helm chartv3.3.1App v0.7.1

A Helm chart for Atlantis https://www.runatlantis.io

About this chart

Atlantis

Atlantis is a tool for safe collaboration on Terraform repositories.

Introduction

This chart creates a single pod in a StatefulSet running Atlantis. Atlantis persists Terraform plan files and lock files to disk for the duration of a Pull/Merge Request. These files are stored in a PersistentVolumeClaim to survive Pod failures.

Prerequisites

  • Kubernetes 1.9+
  • PersistentVolume support

Required Configuration

In order for Atlantis to start and run successfully:

  1. At least one of the following sets of credentials must be defined:

    • github
    • gitlab
    • bitbucket

    Refer to values.yaml for detailed examples. They can also be provided directly through a Kubernetes Secret, use the variable vcsSecretsName to reference it.

  2. Supply a value for orgWhitelist, e.g. github.org/myorg/*.

Customization

The following options are supported. See values.yaml for more detailed documentation and examples:

ParameterDescriptionDefault
dataStorageAmount of storage available for Atlantis' data directory (mostly used to check out git repositories).5Gi
aws.configContents of a file to be mounted to ~/.aws/config.n/a
aws.credentialsContents of a file to be mounted to ~/.aws/credentials.n/a
bitbucket.userName of the Atlantis Bitbucket user.n/a
bitbucket.tokenPersonal access token for the Atlantis Bitbucket user.n/a
bitbucket.secretWebhook secret for Bitbucket repositories (Bitbucket Server only).n/a
bitbucket.baseURLBase URL of Bitbucket Server installation.n/a
environmentMap of environment variables for the container.{}
imagePullSecretsList of secrets for pulling images from private registries.[]
gitconfigContents of a file to be mounted to ~/.gitconfig. Use to allow redirection for Terraform modules in private git repositories.n/a
commandOptionally override the command field of the Atlantis Docker container. If not set, the default Atlantis ENTRYPOINT is used. Must be an array.n/a
github.userName of the Atlantis GitHub user.n/a
github.tokenPersonal access token for the Atlantis GitHub user.n/a
github.secretRepository or organization-wide webhook secret for the Atlantis GitHub integration. All repositories in GitHub that are to be integrated with Atlantis must share the same value.n/a
github.hostnameHostname of your GitHub Enterprise installation.n/a
gitlab.userRepository or organization-wide secret for the Atlantis GitLab,integration. All repositories in GitLab that are to be integrated with Atlantis must share the same value.n/a
gitlab.tokenPersonal access token for the Atlantis GitLab user.n/a
gitlab.secretWebhook secret for the Atlantis GitLab integration. All repositories in GitLab that are to be integrated with Atlantis must share the same value.n/a
gitlab.hostnameHostname of your GitLab Enterprise installation.n/a
vcsSecretsNameName of a pre-existing Kubernetes Secret containing token and secret keys set to your VCS provider's API token and webhook secret, respectively. Use this instead of github.token/github.secret, etc. (optional)n/a
podTemplate.annotationsAdditional annotations to use for the StatefulSet.n/a
logLevelLevel to use for logging. Either debug, info, warn, or error.n/a
orgWhiteListWhitelist of repositories from which Atlantis will accept webhooks. This value must be set for Atlantis to function correctly. Accepts wildcard characters (*). Multiple values may be comma-separated.none
repoConfigServer Side Repo Configuration as a raw YAML string. Configuration is stored in ConfigMap.n/a
defaultTFVersionDefault Terraform version to be used by atlantis servern/a
allowForkPRsAllow atlantis to run on fork Pull Requestsfalse
serviceAccount.createWhether to create a Kubernetes ServiceAccount if no account matching serviceAccount.name exists.true
serviceAccount.nameName of the Kubernetes ServiceAccount under which Atlantis should run. If no value is specified and serviceAccount.create is true, Atlantis will be run under a ServiceAccount whose name is the FullName of the Helm chart's instance, else Atlantis will be run under the default ServiceAccount.n/a
serviceAccountSecrets.credentialsJSON string representing secrets for a Google Cloud Platform production service account. Only applicable if hosting Atlantis on GKE.n/a
serviceAccountSecrets.credentials-stagingJSON string representing secrets for a Google Cloud Platform staging service account. Only applicable if hosting Atlantis on GKE.n/a
service.portPort of the Service.80
service.loadBalancerSourceRangesArray of whitelisted IP addresses for the Atlantis Service. If no value is specified, the Service will allow incoming traffic from all IP addresses (0.0.0.0/0).n/a
storageClassNameStorage class of the volume mounted for the Atlantis data directory.n/a
tlsSecretNameName of a Secret for Atlantis' HTTPS certificate containing the following data items tls.crt with the public certificate and tls.key with the private key.n/

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 v3.3.1 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