---
apiVersion: v1
kind: Namespace
metadata:
  name: test-multi-ns-hook-second

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: quay.io/argoprojlabs/argocd-e2e-container:0.1
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80

---
apiVersion: v1
kind: Pod
metadata:
  name: my-hook
  annotations:
    argocd.argoproj.io/hook: PostSync
    argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
  restartPolicy: Never
  containers:
  - name: main
    image: quay.io/argoprojlabs/argocd-e2e-container:0.1
    imagePullPolicy: IfNotPresent
    command: [sh, -c, "sleep 10"]

---
apiVersion: v1
kind: Pod
metadata:
  name: my-hook
  namespace: test-multi-ns-hook-second
  annotations:
    argocd.argoproj.io/hook: PostSync
    argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
  restartPolicy: Never
  containers:
  - name: main
    image: quay.io/argoprojlabs/argocd-e2e-container:0.1
    imagePullPolicy: IfNotPresent
    command: [sh, -c, "sleep 10"]
