Last active
June 11, 2024 06:52
-
-
Save glendmaatita/4bb06cbcdf4982228eac735d404666f8 to your computer and use it in GitHub Desktop.
Atlantis Deployment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: atlantis | |
labels: | |
app: atlantis | |
spec: | |
selector: | |
matchLabels: | |
app: atlantis | |
template: | |
metadata: | |
labels: | |
app: atlantis | |
spec: | |
containers: | |
- name: atlantis | |
image: glendmaatita/atlantis:latest | |
imagePullPolicy: Always | |
envFrom: | |
- configMapRef: | |
name: atlantis-config | |
volumeMounts: | |
- name: google-json-volume | |
mountPath: /app/google.json | |
subPath: google.json | |
- name: atlantis-dir | |
mountPath: /app/atlantis | |
securityContext: | |
runAsUser: 0 | |
volumes: | |
- name: google-json-volume | |
configMap: | |
name: atlantis-gcp-key | |
- name: atlantis-dir | |
persistentVolumeClaim: | |
claimName: atlantis-dir-pvc | |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: atlantis-config | |
data: | |
ATLANTIS_ALLOW_COMMANDS: "version,plan,apply,unlock" | |
ATLANTIS_ALLOW_FORK_PRS: "true" | |
ATLANTIS_API_SECRET: supersecretrandomstring | |
ATLANTIS_ATLANTIS_URL: "https://atlantis.example.com" | |
ATLANTIS_GH_TOKEN: fromyourgithubtoken | |
ATLANTIS_GH_USER: fromyourgithubtokenname | |
ATLANTIS_GH_WEBHOOK_SECRET: supersecretrandomstring | |
ATLANTIS_REDIS_HOST: "10.0.0.1" | |
ATLANTIS_REPO_ALLOWLIST: "github.com/your-organization/your-terraform-repository" | |
ATLANTIS_WEB_BASIC_AUTH: "true" | |
ATLANTIS_WEB_USERNAME: admin | |
ATLANTIS_WEB_PASSWORD: supersecretrandomstring | |
ATLANTIS_PORT: "4141" | |
ATLANTIS_DATA_DIR: "/app/atlantis" | |
GOOGLE_APPLICATION_CREDENTIALS: "/app/google.json" | |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: atlantis-gcp-key | |
data: | |
google.json: | | |
< Content of Service Account key > | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: atlantis | |
labels: | |
app: atlantis | |
spec: | |
selector: | |
app: atlantis | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 4141 | |
--- | |
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: atlantis | |
annotations: | |
cert-manager.io/cluster-issuer: letsencrypt-issuer | |
spec: | |
ingressClassName: nginx | |
rules: | |
- host: atlantis.example.com | |
http: | |
paths: | |
- path: / | |
pathType: Prefix | |
backend: | |
service: | |
name: atlantis | |
port: | |
number: 80 | |
tls: | |
- hosts: | |
- atlantis.example.com | |
secretName: tls-ops-atlantis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment