diff --git a/_deploy/k8s/deployment.yaml b/_deploy/k8s/deployment.yaml index d47060a..45bdb0a 100644 --- a/_deploy/k8s/deployment.yaml +++ b/_deploy/k8s/deployment.yaml @@ -17,12 +17,12 @@ spec: - name: hubcred containers: - name: telegram-listener - image: hub.musk.fun/k8s/nocr/telegram_listener:latest + image: hub.musk.fun/k8s/nocr/telegram_listener:latest env: - name: "ASPNETCORE_ENVIRONMENT" value: "k8s" - name: "session_pathname" - value: "/app/.secrets/WTelegram.session" + value: "/tmp/rw-files/WTelegram.session" - name: ASPNETCORE_rmqc_host valueFrom: secretKeyRef: @@ -48,9 +48,26 @@ spec: volumeMounts: - name: secrets mountPath: /app/.secrets - readOnly: true + - 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: {}