chore: add runtime configuration and deployment docs
This commit is contained in:
1 parent
c86d077f9f
commit
4dab6e8624
13 files changed
+430
-13
No files matched your search
@@ -0,0 +1,120 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: belki-web
|
||||
namespace: belki
|
||||
labels:
|
||||
app.kubernetes.io/name: belki-web
|
||||
app.kubernetes.io/part-of: belki-calculator
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: belki-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: belki-web
|
||||
app.kubernetes.io/part-of: belki-calculator
|
||||
spec:
|
||||
containers:
|
||||
- name: web
|
||||
image: reg.nyan404.ru/cwshed-clone/belki:latest
|
||||
imagePullPolicy: Always
|
||||
command: ["python", "-m", "app.main"]
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
env:
|
||||
- name: BELKI_PORT
|
||||
value: "8080"
|
||||
- name: BELKI_DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: belki-vk
|
||||
key: BELKI_DATABASE_URL
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 2
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 20
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
runAsUser: 10001
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: belki-web
|
||||
namespace: belki
|
||||
labels:
|
||||
app.kubernetes.io/part-of: belki-calculator
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app.kubernetes.io/name: belki-web
|
||||
ports:
|
||||
- name: http
|
||||
port: 8080
|
||||
targetPort: http
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: belki-bot
|
||||
namespace: belki
|
||||
labels:
|
||||
app.kubernetes.io/name: belki-bot
|
||||
app.kubernetes.io/part-of: belki-calculator
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: belki-bot
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: belki-bot
|
||||
app.kubernetes.io/part-of: belki-calculator
|
||||
spec:
|
||||
containers:
|
||||
- name: bot
|
||||
image: reg.nyan404.ru/cwshed-clone/belki:latest
|
||||
imagePullPolicy: Always
|
||||
command: ["python", "-m", "app.belki.vk_bot"]
|
||||
env:
|
||||
- name: VK_GROUP_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: belki-vk
|
||||
key: VK_GROUP_TOKEN
|
||||
- name: VK_GROUP_ID
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: belki-vk
|
||||
key: VK_GROUP_ID
|
||||
- name: VK_API_VERSION
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: belki-vk
|
||||
key: VK_API_VERSION
|
||||
optional: true
|
||||
- name: BELKI_DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: belki-vk
|
||||
key: BELKI_DATABASE_URL
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
runAsUser: 10001
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: belki
|
||||
labels:
|
||||
app.kubernetes.io/part-of: belki-calculator
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: belki-vk
|
||||
namespace: belki
|
||||
type: Opaque
|
||||
stringData:
|
||||
VK_GROUP_TOKEN: replace-out-of-band
|
||||
VK_GROUP_ID: replace-out-of-band
|
||||
VK_API_VERSION: "5.199"
|
||||
BELKI_DATABASE_URL: postgresql://belki:replace-out-of-band@postgres:5432/belki
|
||||
Reference in new issue
Block a user