kube-slack
kube-slack copied to clipboard
Configuration property "slack_username" is not defined
I checked the log of Kube-slack and I noticed this error in both K8s clusters that I run in Azure.
Cluster 1
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 268)
(node:1) UnhandledPromiseRejectionWarning: Error: Configuration property "slack_username" is not defined
at Config.get (/app/node_modules/config/lib/config.js:203:11)
at SlackNotifier.notify (/app/notify/slack.js:25:48)
at PodLongNotReady.callback (/app/index.js:27:26)
at PodLongNotReady.emit (events.js:189:13)
at PodLongNotReady.check (/app/monitors/longnotready.js:65:18)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 269)
(node:1) UnhandledPromiseRejectionWarning: Error: Configuration property "slack_username" is not defined
at Config.get (/app/node_modules/config/lib/config.js:203:11)
at SlackNotifier.notify (/app/notify/slack.js:25:48)
at PodLongNotReady.callback (/app/index.js:27:26)
at PodLongNotReady.emit (events.js:189:13)
at PodLongNotReady.check (/app/monitors/longnotready.js:65:18)
at process._tickCallback (internal/process/next_tick.js:68:7)
Cluster 2
(node:1) UnhandledPromiseRejectionWarning: Error: Configuration property "slack_username" is not defined
at Config.get (/app/node_modules/config/lib/config.js:203:11)
at SlackNotifier.notify (/app/notify/slack.js:25:48)
at PodLongNotReady.callback (/app/index.js:27:26)
at PodLongNotReady.emit (events.js:189:13)
at PodLongNotReady.check (/app/monitors/longnotready.js:65:18)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
My configuration: K8s 1.12.7 deployed with Kubespray Kube-Slack v4.2.0 deployed with helm
The pods are not restarted and work fine but this is still an issue.
@whs could you please take a look?
@pierluigilenoci helm install stable/kube-slack --set envVars.SLACK_URL="URL" --set envVars.SLACK_USERNAME="USERNAME" --set envVars.SLACK_CHANNEL="CHANNEL" --name kube-slack
The SLACK_USERNAME and SLACK_CHANNEL seem to also be required