apiVersion: v1
kind: Pod
metadata:
  name: sidecar-pod
  labels:
    app: sidecar-pod
spec:
  restartPolicy: Never
  containers:
  - name: motor
    image: busybox
    resources:
      limits:
        cpu: 100m
        memory: 16Mi
      requests:
        cpu: 100m
        memory: 16Mi
    command: ["sh", "-c"]
    args:
    - |
      echo Start.

      while true
      do
          date
          sleep 1
      done
  - name: sidecar
    image: busybox
    imagePullPolicy: IfNotPresent
    args:
    - /bin/sh
    - -c
    - touch /tmp/healthy; tail -f /dev/null
    readinessProbe:
      exec:
        command:
        - cat
        - /tmp/healthy
      initialDelaySeconds: 5
      periodSeconds: 5
    resources:
      limits:
        cpu: 100m
        memory: 16Mi
      requests:
        cpu: 100m
        memory: 16Mi