aws-node-termination-handler
aws-node-termination-handler copied to clipboard
unable to trigger webhook on discord for spot interruptions
Describe the bug
The helm chart provides default webhook template for slack, i tried changing the template to that of discord's. But i am getting below error in logs :
[Feb 28 2024 08:01:19 GMT+0530] aws-node-termination-handler-cd-utils-bt4cr: 2024/02/28 02:31:19 WRN Webhook Error: Received Non-Successful Status Code status_code=400
The wehookTemplate configurations was :
'{"content": "[NTH][Instance Interruption] EventID: {{ .EventID }} - Kind: {{ .Kind }} - Instance: {{ .InstanceID }} - Node: {{ .NodeName }} - Description: {{ .Description }} - Start Time: {{ .StartTime }}"}'
Steps to reproduce
Deploy aws-node-termination-handler in IMDS mode with webhook url for discord and template as below :
webhookTemplate: '{"content": "[NTH][Instance Interruption] EventID: {{ .EventID }} - Kind: {{ .Kind }} - Instance: {{ .InstanceID }} - Node: {{ .NodeName }} - Description: {{ .Description }} - Start Time: {{ .StartTime }}"}'
Expected outcome webhook should have been triggered.
Application Logs
[Feb 28 2024 08:01:19 GMT+0530] aws-node-termination-handler-cd-utils-bt4cr: 2024/02/28 02:31:19 WRN Webhook Error: Received Non-Successful Status Code status_code=400
Environment
- NTH App Version: 0.21.0
- NTH Mode (IMDS/Queue processor): IMDS
- OS/Arch: amazon linux 2
- Kubernetes version: 1.28
- Installation method: helm