apiVersion: batch/v1
kind: CronJob
metadata:
  name: dweb-discord
spec:
  schedule: "0 18 * * *"
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: dweb-discord
            image: horvatic/k8s-status-discord-bot-job:latest
            env:
            - name: DISCORDHOOK
              valueFrom:
                secretKeyRef: 
                  name: discord-web
                  key: web-hook 
            - name: NAMESPACES
              valueFrom:
                configMapKeyRef:
                  name: dweb-config
                  key: namespaces
          restartPolicy: Never


