apiVersion: batch/v1
kind: CronJob
metadata:
  name: $1
spec:
  schedule: "0 0 * * *" # every day
  jobTemplate:
    spec:
      backoffLimit: 0
      template:
        metadata:
          labels:
            app.kubernetes.io/name: $1
            app.kubernetes.io/part-of: $2
        spec:
          restartPolicy: Never
          containers:
          - name: $1
            image: $3
            # ports:
            # - containerPort: 6080
            #   name: http
            #   protocol: TCP
            # env:
            # - name: $1
            #   value: "$2:5900"
            resources:
              limits:
                cpu: 2000m
                memory: 1024Mi
              requests:
                cpu: 1000m
                memory: 512Mi
