kind: Deployment
apiVersion: apps/v1
metadata:
  name: container-name
  namespace: app-created-namespace
  labels:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "acorn.io/container-name": "container-name"
    "acorn.io/managed": "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      "acorn.io/app-namespace": "app-namespace"
      "acorn.io/app-name": "app-name"
      "acorn.io/container-name": "container-name"
      "acorn.io/managed": "true"
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        "acorn.io/app-namespace": "app-namespace"
        "acorn.io/app-name": "app-name"
        "acorn.io/container-name": "container-name"
        "acorn.io/managed": "true"
      annotations:
        acorn.io/container-spec: '{"dirs":{"/var/temp":{"secret":{},"volume":"bar"},"/var/tmp":{"secret":{},"volume":"foo"}},"image":"image-name","probes":null}'
    spec:
      imagePullSecrets:
        - name: container-name-pull-1234567890ab
      terminationGracePeriodSeconds: 5
      hostname: container-name
      enableServiceLinks: false
      serviceAccountName: container-name
      volumes:
        - name: bar
          persistentVolumeClaim:
            claimName: bar
        - name: foo
          persistentVolumeClaim:
            claimName: foo
      containers:
        - name: container-name
          image: "image-name"
          volumeMounts:
            - mountPath: "/var/temp"
              name: bar
            - mountPath: "/var/tmp"
              name: foo
---
kind: PodDisruptionBudget
apiVersion: policy/v1
metadata:
  name: container-name
  namespace: app-created-namespace
  labels:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "acorn.io/container-name": "container-name"
    "acorn.io/managed": "true"
spec:
  selector:
    matchLabels:
      "acorn.io/app-namespace": "app-namespace"
      "acorn.io/app-name": "app-name"
      "acorn.io/container-name": "container-name"
      "acorn.io/managed": "true"
  maxUnavailable: 1
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: "foo"
  namespace: app-created-namespace
  labels:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "acorn.io/managed": "true"
    "acorn.io/volume-name": "foo"
    acorn.io/volume-class: "test-custom-class"
spec:
  resources:
    requests:
      storage: 3Gi
  storageClassName: "custom-class"
  accessModes:
    - ReadWriteOnce
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: "bar"
  namespace: app-created-namespace
  labels:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "acorn.io/managed": "true"
    "acorn.io/volume-name": "bar"
    acorn.io/volume-class: "test-custom-class"
spec:
  resources:
    requests:
      storage: 6Gi
  storageClassName: "custom-class"
  accessModes:
    - ReadWriteMany
---
kind: AppInstance
apiVersion: internal.acorn.io/v1
metadata:
  name: app-name
  namespace: app-namespace
  uid: 1234567890abcdef
spec:
  image: test
  volumes:
    - target: foo
      class: test-custom-class
      size: 3Gi
      accessModes: [ "readWriteOnce" ]
    - target: bar
      class: test-custom-class
status:
  namespace: app-created-namespace
  appImage:
    id: test
  appSpec:
    containers:
      container-name:
        image: "image-name"
        dirs:
          "/var/tmp":
            volume: foo
          "/var/temp":
            volume: bar
    volumes:
      foo:
        class: test-custom-class-request
        size: 6Gi
        accessModes: [ "readOnlyMany" ]
      bar:
        class: test-custom-class-request
        size: 6Gi
  conditions:
    - type: defined
      reason: Success
      status: "True"
      success: true
  defaults:
    volumes:
      foo:
        class: test-custom-class-default
        size: 2Gi
        accessModes: [ "readWriteMany" ]
      bar:
        class: test-custom-class-default
        accessModes: [ "readWriteMany" ]
