apiVersion: v1
kind: Pod
metadata:
  labels:
    test: liveness
  name: liveness
spec:
  containers:
  - name: liveness
    args:
    - /bin/sh
    - -c
    - echo ok > /tmp/health; sleep 10; rm -rf /tmp/health; sleep 600
    image: gcr.io/google_containers/busybox
    livenessProbe:
      exec:
        command:
        - cat
        - /tmp/health
      initialDelaySeconds: 15
      timeoutSeconds: 1
  - name: counter
    image: quay.io/ipedrazas/alpine:latest
    command: ["bash", "-c", "count=0;while true; do echo hello infracoders $count; (( count++ )) ; sleep 10; done"]
    imagePullPolicy: IfNotPresent

