apiVersion: apps/v1
kind: Deployment
metadata:
  name: aoc-bot
  labels:
    app: aoc-bot
spec:
  replicas: 1
  selector:
    matchLabels:
      app: aoc-bot
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: aoc-bot
    spec:
      containers:
        - name: bot
#          command: ["tail", "-f", "/dev/null"]
          image: cr.yandex/crpjoi1gqoco2isd48do/aoc-telegram-bot:latest
          imagePullPolicy: IfNotPresent
          resources:
            requests:
              memory: "500M"
              cpu: "1"
            limits:
              memory: "500M"
              cpu: "1"
          env:
            - name: SECRETS_DIR
              value: /opt/secrets
          envFrom:
            - configMapRef:
                name: aoc-bot
          volumeMounts:
            - mountPath: /opt/secrets
              name: secrets
      volumes:
        - name: secrets
          secret:
            secretName: aoc-bot