apiVersion: apps/v1
kind: Deployment
metadata:
  name: bad-probe
  labels:
    name: bad-probe
    app: crash-app
spec:
  replicas: 1
  selector:
    matchLabels:
      name: bad-probe
      app: crash-app
  # progressDeadlineSeconds: 10 -- do not add: this is used to test the hard deadline
  template:
    metadata:
      labels:
        name: bad-probe
        app: crash-app
    spec:
      containers:
      - name: http-probe
        image: busybox
        imagePullPolicy: IfNotPresent
        command: ["tail", "-f", "/dev/null"]
        ports:
        - containerPort: 80
          name: http
        readinessProbe:
          httpGet:
            path: "/bad/ping/path"
            port: 80
          initialDelaySeconds: 0
          periodSeconds: 1
          timeoutSeconds: 1
          failureThreshold: 1
      - name: exec-probe
        image: busybox
        imagePullPolicy: IfNotPresent
        command: ["tail", "-f", "/dev/null"]
        readinessProbe:
          exec:
            command: ["test", "0", "-eq", "1"]
          initialDelaySeconds: 0
          periodSeconds: 1
          timeoutSeconds: 1
          failureThreshold: 1
      - name: sidecar
        image: busybox
        imagePullPolicy: IfNotPresent
        command: ["tail", "-f", "/dev/null"]
        readinessProbe:
          exec:
            command: ["test", "0", "-eq", "0"]
          initialDelaySeconds: 2
          periodSeconds: 2
          successThreshold: 1
          failureThreshold: 100
