[stage-3] fix values for simple-app and atlantis

This commit is contained in:
2023-03-27 10:32:33 +07:00
parent d0836e17a6
commit 29ba0d92d0
7 changed files with 38 additions and 38 deletions

View File

@@ -7,7 +7,7 @@ metadata:
service: atlantis
name: {{ .Chart.Name }}-{{ .Values.environment }}
spec:
replicas: {{ .Values.atlantis.replicasCount }}
replicas: {{ .Values.replicasCount }}
selector:
matchLabels:
app: {{ .Chart.Name }}-{{ .Values.environment }}
@@ -27,7 +27,7 @@ spec:
containerPort: 4141
env:
- name: ATLANTIS_GH_USER
value: {{ .Values.atlantis.config.github.user }}
value: {{ .Values.config.github.user }}
- name: ATLANTIS_GH_TOKEN
valueFrom:
secretKeyRef:
@@ -39,11 +39,11 @@ spec:
name: {{ .Chart.Name }}-{{ .Values.environment }}
key: github_secret
- name: ATLANTIS_REPO_ALLOWLIST
value: {{ toYaml (.Values.atlantis.config.orgAllowlist) }}
value: {{ toYaml (.Values.config.orgAllowlist) }}
- name: ATLANTIS_ALLOW_COMMANDS
value: {{ .Values.atlantis.config.allowCommands }}
value: {{ .Values.config.allowCommands }}
resources:
{{- toYaml .Values.atlantis.resources | nindent 12 }}
{{- toYaml .Values.resources | nindent 12 }}
livenessProbe:
httpGet:
path: /healthz

View File

@@ -4,5 +4,5 @@ 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 }}
github_token: {{ .Values.config.github.token | b64enc }}
github_secret: {{ .Values.config.github.secret | b64enc }}

View File

@@ -3,16 +3,8 @@ environment: production
image:
name: ghcr.io/runatlantis/atlantis
atlantis:
config:
orgAllowlist: github.com/Dannecron/*
github:
user: personal-access-token-name
token: personal-access-token-secret
secret: webhook-secret
allowCommands: "version,plan,state"
replicasCount: 1
resources:
requests:
memory: 512Mi
@@ -20,3 +12,11 @@ atlantis:
limits:
memory: 1Gi
cpu: 100m
config:
orgAllowlist: github.com/Dannecron/*
github:
user: personal-access-token-name
token: personal-access-token-secret
secret: webhook-secret
allowCommands: "version,plan,state"

View File

@@ -1,6 +1,6 @@
---------------------------------------------------------
Content of NOTES.txt appears after deploy.
Deployed version {{ .Chart.AppVersion }}.
Test application.
Deployed version {{ .Values.image.tag | default .Chart.AppVersion }}.
---------------------------------------------------------

View File

@@ -7,7 +7,7 @@ metadata:
service: application
name: {{ .Chart.Name }}-{{ .Values.environment }}-application
spec:
replicas: {{ .Values.application.replicasCount }}
replicas: {{ .Values.replicasCount }}
selector:
matchLabels:
app: {{ .Chart.Name }}-{{ .Values.environment }}
@@ -19,12 +19,12 @@ spec:
service: application
spec:
containers:
- image: {{ .Values.image.name }}:{{ .Chart.AppVersion }}
- image: {{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: Always
name: application
ports:
- name: web
containerPort: 80
resources:
{{- toYaml .Values.application.resources | nindent 12 }}
{{- toYaml .Values.resources | nindent 12 }}
terminationGracePeriodSeconds: 30

View File

@@ -2,8 +2,8 @@ environment: production
image:
name: dannecron/parcel-example-neko
tag:
application:
replicasCount: 1
resources:
limits:

View File

@@ -84,7 +84,7 @@ ansible-playbook -i ansible/kubectl_init kubectl_init.yml
* [atlantis](https://www.runatlantis.io)
```shell
helm upgrade --set "atlantis.config.github.user=<access_token>" --set "atlantis.config.github.token=<token_secret>" --set "atlantis.config.github.secret=<webhook_secret>" atlantis k8s/helm/atlantis
helm install --set "atlantis.config.github.user=<access_token>" --set "atlantis.config.github.token=<token_secret>" --set "atlantis.config.github.secret=<webhook_secret>" atlantis k8s/helm/atlantis
```
где `<access_token>`, `<token_secret>` - это данные персонального access-токена, созданного на github,