apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
  name: pre-deployment-sleep
  annotations:
    container: test
spec:
  container:
    name: testy-test
    image: busybox:1.37.0
    command:
      - 'sh'
      - '-c'
      - 'sleep 30'
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: test
  name: test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: test
  strategy: {}
  template:
    metadata:
      labels:
        app: test
      annotations:
        keptn.sh/workload: waiter
        keptn.sh/version: "0.4"
        keptn.sh/pre-deployment-tasks: pre-deployment-sleep
    spec:
      containers:
        - image: busybox
          name: busybox
          command: ['sh', '-c', 'echo The app is running! && sleep infinity']
