diff --git a/Dockerfile b/Dockerfile index 7b23015..99416dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 / diff --git a/README.md b/README.md index dc33243..4bb09e1 100644 --- a/README.md +++ b/README.md @@ -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 @@ -93,7 +93,7 @@ data: apiVersion: v1 kind: Secret metadata: - name: NOTIFY_WEBHOOK_URL + name: NOTIFICATION_WEBHOOK_URL type: Opaque data: slack_webhook_url: @@ -143,10 +143,10 @@ spec: value: "" - 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 ``` diff --git a/resources/notify.sh b/resources/notify.sh index 67ecd05..d933c31 100644 --- a/resources/notify.sh +++ b/resources/notify.sh @@ -1,3 +1,3 @@ #/bin/sh -curl -X POST -d $PAYLOAD $NOTIFICATION_WEBHOOK_URL +curl -X POST -d $1 $NOTIFICATION_WEBHOOK_URL