Browse Source

--allow-empty

pull/80/head
gitromba 4 years ago
parent
commit
4d769650cc
  1. 27
      guestbook/fail-notification.yaml
  2. 27
      guestbook/success-notification.yaml

27
guestbook/fail-notification.yaml

@ -1,27 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
generateName: app-slack-notification-
annotations:
argocd.argoproj.io/hook: SyncFail
argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
template:
spec:
containers:
- name: slack-notification
image: curlimages/curl
envFrom:
- secretRef:
name: slack
command:
- "curl"
- "-X"
- "POST"
- "-H"
- "Content-type: application/json"
- "--data"
- "{\"text\": \"auuu\"}"
- "$(HOOK_URL)"
restartPolicy: Never
backoffLimit: 2

27
guestbook/success-notification.yaml

@ -1,27 +0,0 @@
apiVersion: batch/v1
kind: Job
metadata:
generateName: app-slack-notification-
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
template:
spec:
containers:
- name: slack-notification
image: curlimages/curl
envFrom:
- secretRef:
name: slack
command:
- "curl"
- "-X"
- "POST"
- "-H"
- "Content-type: application/json"
- "--data"
- "{\"text\": \"it works!\"}"
- "$(HOOK_URL)"
restartPolicy: Never
backoffLimit: 2
Loading…
Cancel
Save