mirror of
https://github.com/Dannecron/netology-devops-gw-infra.git
synced 2025-12-25 23:32:35 +03:00
[stage-3] fix values for simple-app and atlantis
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 }}.
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,8 +2,8 @@ environment: production
|
||||
|
||||
image:
|
||||
name: dannecron/parcel-example-neko
|
||||
tag:
|
||||
|
||||
application:
|
||||
replicasCount: 1
|
||||
resources:
|
||||
limits:
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user