[stage-3] create atlantis helm chart

update readme
This commit is contained in:
2023-03-22 10:31:17 +07:00
parent 02b0b7d931
commit 72d269640e
9 changed files with 159 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---------------------------------------------------------
Atlantis release is done.
Deployed version {{ .Chart.AppVersion }}.
---------------------------------------------------------

View File

@@ -0,0 +1,56 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: {{ .Chart.Name }}-{{ .Values.environment }}
service: atlantis
name: {{ .Chart.Name }}-{{ .Values.environment }}
spec:
replicas: {{ .Values.atlantis.replicasCount }}
selector:
matchLabels:
app: {{ .Chart.Name }}-{{ .Values.environment }}
service: atlantis
template:
metadata:
labels:
app: {{ .Chart.Name }}-{{ .Values.environment }}
service: atlantis
spec:
containers:
- image: {{ .Values.image.name }}:{{ .Chart.AppVersion }}
imagePullPolicy: Always
name: atlantis
ports:
- name: web
containerPort: 4141
env:
- name: ATLANTIS_GH_USER
value: {{ .Values.atlantis.config.github.user }}
- name: ATLANTIS_GH_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Chart.Name }}-{{ .Values.environment }}
key: github_token
- name: ATLANTIS_GH_WEBHOOK_SECRET
valueFrom:
secretKeyRef:
name: {{ .Chart.Name }}-{{ .Values.environment }}
key: github_secret
- name: ATLANTIS_REPO_ALLOWLIST
value: {{ toYaml (.Values.atlantis.config.orgAllowlist) }}
- name: ATLANTIS_ALLOW_COMMANDS
value: {{ .Values.atlantis.config.allowCommands }}
resources:
{{- toYaml .Values.atlantis.resources | nindent 12 }}
livenessProbe:
httpGet:
path: /healthz
port: 4141
initialDelaySeconds: 5
periodSeconds: 60
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 5
terminationGracePeriodSeconds: 30

View File

@@ -0,0 +1,20 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Chart.Name }}-{{ .Values.environment }}-ingress
annotations:
kubernetes.io/ingress.class: nginx
ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- host: atlantis-gw.my.to
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Chart.Name }}-{{ .Values.environment }}
port:
number: 4141

View File

@@ -0,0 +1,8 @@
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Chart.Name }}-{{ .Values.environment }}
data:
github_token: {{ .Values.atlantis.config.github.token | b64enc }}
github_secret: {{ .Values.atlantis.config.github.secret | b64enc }}

View File

@@ -0,0 +1,12 @@
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}-{{ .Values.environment }}
spec:
ports:
- name: web
port: 4141
selector:
app: {{ .Chart.Name }}-{{ .Values.environment }}
service: atlantis