Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Atlantis #7520

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions kubernetes/apps/atlantis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: atlantis
spec:
destination:
namespace: atlantis
server: https://kubernetes.default.svc
project: default
source:
path: kubernetes/gke-utility/atlantis
repoURL: https://github.com/kubernetes/k8s.io
targetRevision: main
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
managedNamespaceMetadata:
labels:
istio-injection: enabled
1 change: 1 addition & 0 deletions kubernetes/apps/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# - argocd.yaml This has been manually applied to fix sync issues
- atlantis.yaml
- external-secrets.yaml
- cert-manager.yaml
- prow.yaml
Expand Down
8 changes: 8 additions & 0 deletions kubernetes/gke-utility/atlantis/atlantis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
gh-user: k8s-infra-ci-robot
gh-org: kubernetes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this imply Atlantis can interact with the Github org ?

repo-allowlist: github.com/kubernetes/k8s.io
allow-fork-prs: true
atlantis-url: https://atlantis.k8s.io
gh-team-allowlist: "sig-k8s-infra:*"
disable-global-apply-lock: true
autodiscover-mode: auto
15 changes: 15 additions & 0 deletions kubernetes/gke-utility/atlantis/extras.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: atlantis-vcs
spec:
data:
- secretKey: webhook
remoteRef:
key: atlantis-webhook-k8s-io-repo
- secretKey: token
remoteRef:
key: k8s-infra-ci-robot-github-token
secretStoreRef:
kind: ClusterSecretStore
name: k8s-infra-prow
18 changes: 18 additions & 0 deletions kubernetes/gke-utility/atlantis/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: atlantis
spec:
parentRefs:
- name: istio-ingressgateway
namespace: istio-system
sectionName: https
hostnames:
- atlantis.k8s.io
rules:
- matches:
- path:
value: /
backendRefs:
- name: atlantis
port: 80
49 changes: 49 additions & 0 deletions kubernetes/gke-utility/atlantis/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: atlantis

resources:
- github.com/runatlantis/atlantis//kustomize
- extras.yaml
- httproute.yaml

images:
- name: ghcr.io/runatlantis/atlantis
newTag: v0.30.0

configMapGenerator:
- name: atlantis-config
files:
- atlantis.yaml

patchesStrategicMerge:
- |-
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: atlantis
spec:
template:
spec:
containers:
- name: atlantis
env:
- name: ATLANTIS_CONFIG
value: /config/atlantis.yaml
- name: ATLANTIS_GH_TOKEN
valueFrom:
secretKeyRef:
name: atlantis-vcs
key: token
- name: ATLANTIS_GH_WEBHOOK_SECRET
valueFrom:
secretKeyRef:
name: atlantis-vcs
key: webhook
volumeMounts:
- name: config
mountPath: /config
volumes:
- name: config
configMap:
name: atlantis-config
6 changes: 6 additions & 0 deletions kubernetes/gke-utility/istio-system/auth-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ spec:
hosts:
- argo.k8s.io
- monitoring.prow.k8s.io
# we want to force auth to atlantis.k8s.io/* except /events
- operation:
hosts:
- atlantis.k8s.io
notPaths:
- "/events"