Skip to content

Commit

Permalink
Add runatlantis
Browse files Browse the repository at this point in the history
  • Loading branch information
Simone Esposito committed May 25, 2020
1 parent aa2fe29 commit d108c1a
Show file tree
Hide file tree
Showing 6 changed files with 142 additions and 0 deletions.
5 changes: 5 additions & 0 deletions atlantis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 3
projects:
- dir: .
autoplan:
when_modified: ["manifests/**/*.yaml", "*.tf*", "manifests/**.yaml"]
1 change: 1 addition & 0 deletions manifests/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ bases:
- cert-manager
- day2-tech-nl-redirect
- day2meet-com-redirect
- runatlantis
11 changes: 11 additions & 0 deletions manifests/runatlantis/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- runatlantis.yaml
- secret.yaml

namespace: runatlantis

commonLabels:
app: runatlantis
4 changes: 4 additions & 0 deletions manifests/runatlantis/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: runatlantis
101 changes: 101 additions & 0 deletions manifests/runatlantis/runatlantis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: atlantis
spec:
replicas: 1
template:
spec:
containers:
- name: atlantis
image: runatlantis/atlantis:v0.12.0
env:
- name: ATLANTIS_REPO_WHITELIST
value: github.com/day2tech/*
### GitHub Config ###
- name: ATLANTIS_GH_USER
value: day2bot
- name: ATLANTIS_GH_TOKEN
valueFrom:
secretKeyRef:
name: atlantis-vcs
key: token
- name: ATLANTIS_GH_WEBHOOK_SECRET
valueFrom:
secretKeyRef:
name: atlantis-vcs
key: webhook-secret
### End GitHub Config ###
- name: DIGITALOCEAN_TOKEN
valueFrom:
secretKeyRef:
name: atlantis-vcs
key: digitalocean-token
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: atlantis-vcs
key: aws-access-key
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: atlantis-vcs
key: aws-secret-key
- name: ATLANTIS_PORT
value: "4141" # Kubernetes sets an ATLANTIS_PORT variable so we need to override.
ports:
- name: atlantis
containerPort: 4141
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
memory: 256Mi
cpu: 100m
livenessProbe:
# We only need to check every 60s since Atlantis is not a
# high-throughput service.
periodSeconds: 60
httpGet:
path: /healthz
port: 4141
scheme: HTTP
readinessProbe:
periodSeconds: 60
httpGet:
path: /healthz
port: 4141
scheme: HTTP
---
apiVersion: v1
kind: Service
metadata:
name: atlantis
spec:
type: ClusterIP
ports:
- name: atlantis
port: 80
targetPort: 4141
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: runatlantis
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"
spec:
tls:
- hosts:
- runatlantis.day2.tech
secretName: runatlantis-day2-tech
rules:
- host: runatlantis.day2.tech
http:
paths:
- path: /
backend:
serviceName: atlantis
servicePort: 4141
20 changes: 20 additions & 0 deletions manifests/runatlantis/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
creationTimestamp: null
name: atlantis-vcs
namespace: runatlantis
spec:
encryptedData:
aws-access-key: AgCN4uENMoLKCyQhr0u9SjPvK+QgUWXwTLR9hg7YMCvU3NjdQm/G75K6QYz5/WI/7TB+Uf4XGS/dpxQEkfjoHiqr1jlYQj2vaAwYYUVqEJYsi8S+ccNvqsUp6YFdFoaiCot3nGn2M2bOE5kS2IFte/SLtklKT/K/EP1ZwmL60UNhJL88eSLAmx76KWtH4fgLrBu7Hs9Htr02HkxP/I06LHPknay84X1Z+tjy/PbV4qlDf1D/6/WOpevoJHDcprffsqeIBUZ67X0p/DeN5Q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LUdNUSBx1Cn923ONKE992d4x7rQh+lJ3QulhBFjuWnQUVolS/Vp2EbXpf/XJJceI7QCp3G1F3bEWEs/VbTJvegEhd5BZzNPUrDyTCqX/NZPhkR+aqB0hJBOo30nyp71ZATeRzi+qbkHCZNGAuF8tzt2fRRJtZqMRC0rp6XgEydIbKMXNia8XLCfSXhrPOG5Es8dGf9KyvbvaHyUIk2y1JzRWggZ59nYSp+DOMIV4uXnt7UW8zUjy50e4qxxCE17cUcf997EUr03BrphLGKjZhnWkl9K1AtazXWTy5gy2K8ZDCUsJKNGuf0gbQDG8Dd53K7t1VxsCN4QmBY7hFQ==
template:
metadata:
creationTimestamp: null
name: atlantis-vcs
namespace: runatlantis
type: Opaque

0 comments on commit d108c1a

Please sign in to comment.