apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
  name: pre-deployment-hello
spec:
  deno:
    inline:
      code: |
        console.log("Pre-Deployment Task has been executed");
---
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-hello
        keptn.sh/post-deployment-tasks: pre-deployment-hello
    spec:
      containers:
        - image: busybox
          name: busybox
          command: ['sh', '-c', 'echo The app is running! && sleep infinity']
