54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: tg
|
|
namespace: mk-dl-bot
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: mk-dl-bot
|
|
service: tg
|
|
serviceName: "tg"
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: mk-dl-bot
|
|
service: tg
|
|
spec:
|
|
terminationGracePeriodSeconds: 10
|
|
containers:
|
|
- name: tg
|
|
image: mykola2312/telegram-bot-api:latest
|
|
ports:
|
|
- containerPort: 8081
|
|
name: tg
|
|
env:
|
|
- name: API_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: secret
|
|
key: BOT_API_ID
|
|
- name: API_HASH
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: secret
|
|
key: BOT_API_HASH
|
|
- name: HTTP_PORT
|
|
value: "8081"
|
|
command: ["/app/telegram-bot-api"]
|
|
args: ["--api-id=$(API_ID)", "--api-hash=$(API_HASH)", "--local", "--http-port=$(HTTP_PORT)", "--dir=/var/lib/telegram-bot-api"]
|
|
volumeMounts:
|
|
- name: tg-data
|
|
mountPath: /var/lib/telegram-bot-api
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: tg-data
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 5Gi
|
|
---
|
|
|