kind: Deployment
apiVersion: apps/v1
metadata:
  name: oneimage
  namespace: app-created-namespace
  labels:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "acorn.io/container-name": "oneimage"
    "acorn.io/managed": "true"
spec:
  selector:
    matchLabels:
      "acorn.io/app-namespace": "app-namespace"
      "acorn.io/app-name": "app-name"
      "acorn.io/container-name": "oneimage"
      "acorn.io/managed": "true"
  template:
    metadata:
      labels:
        "acorn.io/app-namespace": "app-namespace"
        "acorn.io/app-name": "app-name"
        "acorn.io/container-name": "oneimage"
        "acorn.io/managed": "true"
        "port-number.acorn.io/81": "true"
        "service-name.acorn.io/oneimage": "true"
      annotations:
        acorn.io/container-spec: '{"image":"image-name","ports":[{"port":80,"protocol":"http","targetPort":81}],"probes":null,"sidecars":{"left":{"image":"foo","probes":[{"http":{"headers":{"foo":"bar"},"url":"http://localhost/foo/bar"},"type":"readiness"},{"tcp":{"url":"garbage://1.1.1.1:1234/foo/bar"},"type":"startup"},{"exec":{"command":["/bin/true"]},"type":"liveness"}]}}}'
    spec:
      terminationGracePeriodSeconds: 5
      enableServiceLinks: false
      serviceAccountName: oneimage
      hostname: oneimage
      imagePullSecrets:
        - name: oneimage-pull-1234567890ab
      containers:
        - name: oneimage
          image: "image-name"
          ports:
          - containerPort: 81
            protocol: "TCP"
          readinessProbe:
            tcpSocket:
              port: 81
        - name: left
          image: "foo"
          readinessProbe:
            httpGet:
              port: 80
              path: "/foo/bar"
              httpHeaders:
                - name: foo
                  value: bar
          livenessProbe:
            exec:
              command:
                - /bin/true
          startupProbe:
            tcpSocket:
              port: 1234
              host: 1.1.1.1
---
kind: PodDisruptionBudget
apiVersion: policy/v1
metadata:
  name: oneimage
  namespace: app-created-namespace
  labels:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "acorn.io/container-name": "oneimage"
    "acorn.io/managed": "true"
spec:
  selector:
    matchLabels:
      "acorn.io/app-namespace": "app-namespace"
      "acorn.io/app-name": "app-name"
      "acorn.io/container-name": "oneimage"
      "acorn.io/managed": "true"
  maxUnavailable: 25%
---
kind: Service
apiVersion: v1
metadata:
  name: oneimage
  namespace: app-created-namespace
  labels:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "acorn.io/managed": "true"
    "acorn.io/service-name": "oneimage"
    "acorn.io/container-name": "oneimage"
spec:
  type: ClusterIP
  ports:
    - port: 80
      targetPort: 81
      protocol: "TCP"
      appProtocol: "HTTP"
      name: "80"
  selector:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "service-name.acorn.io/oneimage": "true"
    "port-number.acorn.io/81": "true"
    "acorn.io/managed": "true"

---
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: Secret
apiVersion: v1
metadata:
  name: nodefault-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:
    containers:
      nodefault:
        probes: []
        ports:
          - port: 80
            targetPort: 81
            protocol: http
        image: "image-name"
      oneimage:
        sidecars:
          left:
            image: "foo"
            probes:
              - type: "readiness"
                http:
                  url: "http://localhost/foo/bar"
                  headers:
                    foo: bar
              - type: "startup"
                tcp:
                  url: "garbage://1.1.1.1:1234/foo/bar"
              - type: "liveness"
                exec:
                  command: ["/bin/true"]
        ports:
          - port: 80
            targetPort: 81
            protocol: http
        image: "image-name"
  conditions:
    - type: defined
      reason: Success
      status: "True"
      success: true

---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: nodefault
  namespace: app-created-namespace
  labels:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "acorn.io/container-name": "nodefault"
    "acorn.io/managed": "true"
spec:
  selector:
    matchLabels:
      "acorn.io/app-namespace": "app-namespace"
      "acorn.io/app-name": "app-name"
      "acorn.io/container-name": "nodefault"
      "acorn.io/managed": "true"
  template:
    metadata:
      labels:
        "acorn.io/app-namespace": "app-namespace"
        "acorn.io/app-name": "app-name"
        "acorn.io/container-name": "nodefault"
        "acorn.io/managed": "true"
        "port-number.acorn.io/81": "true"
        "service-name.acorn.io/nodefault": "true"
      annotations:
        acorn.io/container-spec: '{"image":"image-name","ports":[{"port":80,"protocol":"http","targetPort":81}],"probes":[]}'
    spec:
      terminationGracePeriodSeconds: 5
      enableServiceLinks: false
      serviceAccountName: nodefault
      hostname: nodefault
      imagePullSecrets:
        - name: nodefault-pull-1234567890ab
      containers:
        - name: nodefault
          image: "image-name"
          ports:
            - containerPort: 81
              protocol: "TCP"
---
kind: PodDisruptionBudget
apiVersion: policy/v1
metadata:
  name: nodefault
  namespace: app-created-namespace
  labels:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "acorn.io/container-name": "nodefault"
    "acorn.io/managed": "true"
spec:
  selector:
    matchLabels:
      "acorn.io/app-namespace": "app-namespace"
      "acorn.io/app-name": "app-name"
      "acorn.io/container-name": "nodefault"
      "acorn.io/managed": "true"
  maxUnavailable: 25%
---
kind: Service
apiVersion: v1
metadata:
  name: nodefault
  namespace: app-created-namespace
  labels:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "acorn.io/managed": "true"
    "acorn.io/service-name": "nodefault"
    "acorn.io/container-name": "nodefault"
spec:
  type: ClusterIP
  ports:
    - port: 80
      targetPort: 81
      protocol: "TCP"
      appProtocol: "HTTP"
      name: "80"
  selector:
    "acorn.io/app-namespace": "app-namespace"
    "acorn.io/app-name": "app-name"
    "service-name.acorn.io/nodefault": "true"
    "port-number.acorn.io/81": "true"
    "acorn.io/managed": "true"
