apiVersion: apps/v1
kind: Deployment
metadata:
  name: acgn-bot
spec:
  replicas: 1
  selector:
    matchLabels:
      app: acgn-bot
  strategy: {}
  template:
    metadata:
      labels:
        app: acgn-bot
    spec:
      containers:
        - image: nonjosh/acgn-bot
          name: acgn-bot
          imagePullPolicy: Never
          resources: {
            limits: {
              cpu: "1",
              memory: "1Gi"
            },
            requests: {
              cpu: "1",
              memory: "1Gi"
            }
          }
          env:
            - name: TOKEN
              valueFrom:
                secretKeyRef:
                  name: acgn-bot
                  key: bot-token
            - name: CHAT_ID
              valueFrom:
                secretKeyRef:
                  name: acgn-bot
                  key: channel-id
          volumeMounts:
            - name: list
              mountPath: "/app/config"
              readOnly: true
      volumes:
        - name: list
          configMap:
            name: acgn-bot.list.yaml
      restartPolicy: Always

# kubectl create configmap acgn-bot.list.yaml --from-file=config/list.yaml --dry-run=client -o yaml | kubectl apply -f -
