k8s-node-termination-handler
k8s-node-termination-handler copied to clipboard
Slack URL is specified, but not getting notice
✗ kubectl -n kube-system exec -it pod/node-termination-handler-s8nkk -- sh
/app # apk add curl
...
OK: 7 MiB in 19 packages
/app # curl -X POST -H 'Content-type: application/json' --data '{"text":"Manual message from inside pod/node-termination-handler-s8nkk"}' $SLACK_WEBHOOK_URL
ok/app #
The message goes to Slack.
✗ gcloud compute instances simulate-maintenance-event [redacted]-n2d-standard-4-preemptibl-9f1a666f-177n --zone=us-central1-a
Simulating maintenance on instance(s) [https://compute.googleapis.com/compute/v1/projects/[redacted]/zones/us-central1-a/instances/[redacted]-n2d-standard-4-preemptibl-9f1a666f-177n]...done.
✗ kubectl -n kube-system logs -f node-termination-handler-s8nkk
...
I1119 22:48:46.179414 46739 gceTerminationHandler.go:135] Handling maintenance event with state: "TRUE"
I1119 22:48:46.179484 46739 gceTerminationHandler.go:141] Recording impending termination
I1119 22:48:46.179630 46739 handler.go:54] Current node state: {[redacted]-n2d-standard-4-preemptibl-f73d7c1b-t9x5 true 2020-11-19 22:49:16.179487009 +0000 UTC m=+6840.282105137 false}
I1119 22:48:46.179826 46739 handler.go:64] Applying taint prior to handling termination
...
We have a impending termination
, but there is no slack notification... :(
Similar thing here, looks like slack code is completely skipped(?)
glog.V(4).Infof("Applying taint prior to handling termination")
if err := sendSlack(); err != nil {
glog.Errorf("Failed to send slack: %v", err)
}