Skip to content

Commit

Permalink
fix notify
Browse files Browse the repository at this point in the history
  • Loading branch information
nikmel2803 committed Feb 4, 2023
1 parent cfce2cc commit 67b0ede
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ RUN apk add --no-cache mysql-client aws-cli curl
# Set Default Environment Variables
ENV TARGET_DATABASE_PORT=3306
ENV NOTIFY_ENABLED=false
ENV NOTIFY_USERNAME=kubernetes-s3-mysql-backup

# Copy Slack Alert script and make executable
COPY resources/notify.sh /
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The below table lists all of the Environment Variables that are configurable for
| NOTIFY_ENABLED | **(Optional)** (true/false) Enable or disable the Slack Integration (Default False). |
| NOTIFY_USERNAME | **(Optional)** (true/false) Username to use for the Slack Integration (Default: kubernetes-s3-mysql-backup). |
| NOTIFY_CHANNEL | **(Required if Slack enabled)** Slack Channel the WebHook is configured for. |
| NOTIFY_WEBHOOK_URL | **(Required if Slack enabled)** What is the Slack WebHook URL to post to? Should be configured using a Secret in Kubernetes. |
| NOTIFICATION_WEBHOOK_URL | **(Required if Slack enabled)** What is the Slack WebHook URL to post to? Should be configured using a Secret in Kubernetes. |


## Slack Integration
Expand Down Expand Up @@ -93,7 +93,7 @@ data:
apiVersion: v1
kind: Secret
metadata:
name: NOTIFY_WEBHOOK_URL
name: NOTIFICATION_WEBHOOK_URL
type: Opaque
data:
slack_webhook_url: <Your Slack WebHook URL>
Expand Down Expand Up @@ -143,10 +143,10 @@ spec:
value: "<true/false>"
- name: NOTIFY_CHANNEL
value: "#chatops"
- name: NOTIFY_WEBHOOK_URL
- name: NOTIFICATION_WEBHOOK_URL
valueFrom:
secretKeyRef:
name: NOTIFY_WEBHOOK_URL
name: NOTIFICATION_WEBHOOK_URL
key: slack_webhook_url
restartPolicy: Never
```
2 changes: 1 addition & 1 deletion resources/notify.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#/bin/sh

curl -X POST -d $PAYLOAD $NOTIFICATION_WEBHOOK_URL
curl -X POST -d $1 $NOTIFICATION_WEBHOOK_URL

0 comments on commit 67b0ede

Please sign in to comment.