feat: migrate VK bot to Callback API
This commit is contained in:
1 parent
2794546974
commit
a04498d634
10 files changed
+438
-58
No files matched your search
@@ -194,6 +194,9 @@ spec:
|
||||
image: reg.nyan404.ru/cwshed-clone/belki:6656484
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["python", "-m", "app.belki.vk_bot"]
|
||||
ports:
|
||||
- name: callback
|
||||
containerPort: 8081
|
||||
env:
|
||||
- name: VK_GROUP_TOKEN
|
||||
valueFrom:
|
||||
@@ -210,6 +213,16 @@ spec:
|
||||
secretKeyRef:
|
||||
name: belki-runtime
|
||||
key: VK_API_VERSION
|
||||
- name: VK_CALLBACK_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: belki-runtime
|
||||
key: VK_CALLBACK_SECRET
|
||||
- name: VK_CALLBACK_CONFIRMATION
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: belki-runtime
|
||||
key: VK_CALLBACK_CONFIRMATION
|
||||
- name: BELKI_DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
@@ -227,4 +240,33 @@ spec:
|
||||
value: https://cat.nyan404.ru
|
||||
- name: BELKI_S3_SECURE
|
||||
value: "false"
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: callback
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: callback
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 20
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: belki-bot
|
||||
namespace: belki
|
||||
labels:
|
||||
app.kubernetes.io/name: belki-bot
|
||||
app.kubernetes.io/part-of: belki-calculator
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app.kubernetes.io/name: belki-bot
|
||||
ports:
|
||||
- name: callback
|
||||
port: 8081
|
||||
targetPort: callback
|
||||
# production.yaml defines the production production resource; keep namespace and secret references aligned with belki.
|
||||
Reference in new issue
Block a user