-
Notifications
You must be signed in to change notification settings - Fork 287
Couldn't find a list of available template placeholders for the webhook template, except for the example in the helm docs:
{"text":"[NTH][Instance Interruption] EventID: {{ .EventID }} - Kind: {{ .Kind }} - Instance: {{ .InstanceID }} - Node: {{ .NodeName }} - Description: {{ .Description }} - Start Time: {{ .StartTime }}"}).
Is there a list somewhere with all the available placeholders? I'm trying to figure out if there's a way to get the cluster name.
All reactions
Replies: 1 comment
The object used to fill in the template is InterruptionEvent, so any field in that struct is available for the webhook message:
aws-node-termination-handler/pkg/monitor/types.go
Lines 41 to 61 in 62a9142
// InterruptionEvent gives more context of the interruption event
type InterruptionEvent struct {
EventID string
Kind string
Monitor string
Description string
State string
AutoScalingGroupName string
NodeName string
NodeLabels map[string]string
Pods []string
InstanceID string
ProviderID string
IsManaged bool
StartTime time.Time
EndTime time.Time
NodeProcessed bool
InProgress bool
PreDrainTask DrainTask `json:"-"`
PostDrainTask DrainTask `json:"-"`
}
Unfortunately, cluster name is not currently one of those fields.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment