Skip to content

Commit a20febc

Browse files
authored
add instance id to default webhook template (#269)
1 parent 1e5ac5b commit a20febc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

config/helm/aws-node-termination-handler/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Parameter | Description | Default
6161
`webhookURLSecretName` | Pass Webhook URL as a secret. Secret Key: `webhookurl`, Value: `<WEBHOOK_URL>` | None
6262
`webhookProxy` | Uses the specified HTTP(S) proxy for sending webhooks | ``
6363
`webhookHeaders` | Replaces the default webhook headers. | `{"Content-type":"application/json"}`
64-
`webhookTemplate` | Replaces the default webhook message template. | `{"text":"[NTH][Instance Interruption] EventID: {{ .EventID }} - Kind: {{ .Kind }} - Description: {{ .Description }} - State: {{ .State }} - Start Time: {{ .StartTime }}"}`
64+
`webhookTemplate` | Replaces the default webhook message template. | `{"text":"[NTH][Instance Interruption] EventID: {{ .EventID }} - Kind: {{ .Kind }} - Instance: {{ .InstanceID }} - Description: {{ .Description }} - Start Time: {{ .StartTime }}"}`
6565
`webhookTemplateConfigMapName` | Pass Webhook template file as configmap | None
6666
`webhookTemplateConfigMapKey` | Name of the template file stored in the configmap| None
6767
`enableScheduledEventDraining` | [EXPERIMENTAL] If true, drain nodes before the maintenance window starts for an EC2 instance scheduled event | `false`

pkg/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const (
4747
webhookHeadersDefault = `{"Content-type":"application/json"}`
4848
webhookTemplateConfigKey = "WEBHOOK_TEMPLATE"
4949
webhookTemplateFileConfigKey = "WEBHOOK_TEMPLATE_FILE"
50-
webhookTemplateDefault = `{"text":"[NTH][Instance Interruption] EventID: {{ .EventID }} - Kind: {{ .Kind }} - Description: {{ .Description }} - Start Time: {{ .StartTime }}"}`
50+
webhookTemplateDefault = `{"text":"[NTH][Instance Interruption] EventID: {{ .EventID }} - Kind: {{ .Kind }} - Instance: {{ .InstanceID }} - Description: {{ .Description }} - Start Time: {{ .StartTime }}"}`
5151
enableScheduledEventDrainingConfigKey = "ENABLE_SCHEDULED_EVENT_DRAINING"
5252
enableScheduledEventDrainingDefault = false
5353
enableSpotInterruptionDrainingConfigKey = "ENABLE_SPOT_INTERRUPTION_DRAINING"

0 commit comments

Comments
 (0)