kind: CronJob
apiVersion: batch/v1
metadata:
  name: oneimage
  namespace: app-created-namespace
  labels:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "acorn.io/job-name": "oneimage"
    "acorn.io/managed": "true"
spec:
  schedule: "@daily"
  jobTemplate:
    metadata:
      labels:
        "acorn.io/app-namespace": "app-namespace"
        "acorn.io/app-name": "app-name"
        "acorn.io/job-name": "oneimage"
        "acorn.io/managed": "true"
    spec:
      template:
        metadata:
          labels:
            "acorn.io/app-namespace": "app-namespace"
            "acorn.io/app-name": "app-name"
            "acorn.io/job-name": "oneimage"
            "acorn.io/managed": "true"
          annotations:
            acorn.io/container-spec: '{"image":"image-name","probes":null,"schedule":"daily"}'
        spec:
          imagePullSecrets:
            - name: oneimage-pull-1234567890ab
          restartPolicy: Never
          serviceAccountName: oneimage
          enableServiceLinks: false
          terminationGracePeriodSeconds: 5
          containers:
            - name: oneimage
              image: "image-name"
              terminationMessagePath: "/run/secrets/output"
---
kind: Secret
apiVersion: v1
metadata:
  name: oneimage-pull-1234567890ab
  namespace: app-created-namespace
  labels:
    acorn.io/managed: "true"
    acorn.io/pull-secret: "true"
type: "kubernetes.io/dockerconfigjson"
data:
  ".dockerconfigjson": eyJhdXRocyI6eyJpbmRleC5kb2NrZXIuaW8iOnsiYXV0aCI6Ik9nPT0ifX19
---
kind: AppInstance
apiVersion: internal.acorn.io/v1
metadata:
  name: app-name
  namespace: app-namespace
  uid: 1234567890abcdef
spec:
  image: test
status:
  namespace: app-created-namespace
  appImage:
    id: test
  appSpec:
    jobs:
      oneimage:
        schedule: "daily"
        image: "image-name"
  conditions:
    - type: defined
      reason: Success
      status: "True"
      success: true
