apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: bot
spec:
  selector:
    matchLabels:
      app: bot
  template:
    metadata:
      labels:
        app: bot
    spec:
      containers:
      - image: ghcr.io/matthewzhaocc/discordbot:latest
        name: bot
        imagePullPolicy: Always 
        env:
          - name: DISCORD_API_TOKEN
            valueFrom:
              secretKeyRef:
                name: discord-api-key
                key: DISCORD_API_KEY
      imagePullSecrets:
        - name: regcred