74 lines
2.1 KiB
YAML
74 lines
2.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: telegram-listener
|
|
namespace: nocr
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: telegram-listener
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: telegram-listener
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: hubcred
|
|
containers:
|
|
- name: telegram-listener
|
|
image: hub.musk.fun/k8s/nocr/telegram_listener:latest
|
|
env:
|
|
- name: "ASPNETCORE_ENVIRONMENT"
|
|
value: "k8s"
|
|
- name: "session_pathname"
|
|
value: "/tmp/rw-files/WTelegram.session"
|
|
- name: ASPNETCORE_rmqc_host
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: rmqc-default-user
|
|
key: host
|
|
- name: ASPNETCORE_rmqc_username
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: rmqc-default-user
|
|
key: username
|
|
- name: ASPNETCORE_rmqc_password
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: rmqc-default-user
|
|
key: password
|
|
- name: ASPNETCORE_rmqc_port
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: rmqc-default-user
|
|
key: port
|
|
- name: AppSettings__RebusRabbitMqOptions__ConnectionString
|
|
value: "amqp://$(ASPNETCORE_rmqc_username):$(ASPNETCORE_rmqc_password)@$(ASPNETCORE_rmqc_host):$(ASPNETCORE_rmqc_port)/"
|
|
volumeMounts:
|
|
- name: secrets
|
|
mountPath: /app/.secrets
|
|
- name: rw-files
|
|
mountPath: /tmp/rw-files
|
|
initContainers:
|
|
- name: "update-mysql-init"
|
|
image: "busybox:1.25.0"
|
|
command: [
|
|
"sh",
|
|
"-ce",
|
|
"cp /app/.secrets/WTelegram.session /tmp/rw-files/WTelegram.session &&
|
|
chmod a+w /tmp/rw-files/WTelegram.session &&
|
|
echo The TL Container is Running ; sleep 5 " ]
|
|
volumeMounts:
|
|
- name: secrets
|
|
mountPath: /app/.secrets
|
|
- name: rw-files
|
|
mountPath: /tmp/rw-files
|
|
volumes:
|
|
- name: secrets
|
|
secret:
|
|
secretName: secretfiles
|
|
- name: rw-files
|
|
emptyDir: {}
|
|
|