---
apiVersion: v1
kind: Namespace
metadata:
  name: not-allowed-ns-test
  annotations:
    keptn.sh/lifecycle-toolkit: enabled
---
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnTaskDefinition
metadata:
  name: pre-deployment-hello
  namespace: not-allowed-ns-test
spec:
  deno:
    inline:
      code: |
        console.log("Pre-Deployment Task has been executed");
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: test
  name: test
  namespace: not-allowed-ns-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:
  replicas: 2
  selector:
    matchLabels:
      app: test
  strategy: {}
  template:
    metadata:
      labels:
        app: test
    spec:
      containers:
        - image: busybox
          name: busybox
          command: ['sh', '-c', 'echo The app is running! && sleep infinity']
      initContainers:
        - name: init-myservice
          image: busybox:1.37.0
          command: ['sh', '-c', 'sleep 10']
