Merge pull request #16009 from voriol/master

If specified, posts event data to URL upon instance interruption action.
This commit is contained in:
Kubernetes Prow Robot 2024-02-13 05:29:50 -08:00 committed by GitHub
commit 5a3b1e2703
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 39 additions and 0 deletions

View File

@ -280,6 +280,7 @@ spec:
enableSQSTerminationDraining: true
managedASGTag: "aws-node-termination-handler/managed"
prometheusEnable: true
webhookURL: "https://hooks.slack.com/services/YOUR/SLACK/URL"
```
##### Queue Processor Mode

View File

@ -32,6 +32,8 @@ have a security group attached. These security groups are used for security grou
allowing incoming traffic to the NLBs as well as traffic between the NLBs and their target
instances.
* Posts event data to URL upon instance interruption action in aws-node-termination-handler with `WEBHOOK_URL`.
## GCP
* As of Kubernetes version 1.29, credentials for private GCR/AR repositories will be handled by the out-of-tree credential provider. This is an additional binary that each instance downloads from the assets repository.

View File

@ -5857,6 +5857,10 @@ spec:
version:
description: Version is the container image tag used.
type: string
webhookURL:
description: If specified, posts event data to URL upon instance
interruption action.
type: string
type: object
nonMasqueradeCIDR:
description: MasterIPRange string `json:",omitempty"`

View File

@ -998,6 +998,9 @@ type NodeTerminationHandlerSpec struct {
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
// Version is the container image tag used.
Version *string `json:"version,omitempty"`
// If specified, posts event data to URL upon instance interruption action.
WebhookURL *string `json:"webhookURL,omitempty"`
}
func (n *NodeTerminationHandlerSpec) IsQueueMode() bool {

View File

@ -1065,6 +1065,9 @@ type NodeTerminationHandlerSpec struct {
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
// Version is the container image tag used.
Version *string `json:"version,omitempty"`
// If specified, posts event data to URL upon instance interruption action.
WebhookURL *string `json:"webhookURL,omitempty"`
}
// NodeProblemDetector determines the node problem detector configuration.

View File

@ -6527,6 +6527,7 @@ func autoConvert_v1alpha2_NodeTerminationHandlerSpec_To_kops_NodeTerminationHand
out.MemoryRequest = in.MemoryRequest
out.CPURequest = in.CPURequest
out.Version = in.Version
out.WebhookURL = in.WebhookURL
return nil
}
@ -6548,6 +6549,7 @@ func autoConvert_kops_NodeTerminationHandlerSpec_To_v1alpha2_NodeTerminationHand
out.MemoryRequest = in.MemoryRequest
out.CPURequest = in.CPURequest
out.Version = in.Version
out.WebhookURL = in.WebhookURL
return nil
}

View File

@ -4926,6 +4926,11 @@ func (in *NodeTerminationHandlerSpec) DeepCopyInto(out *NodeTerminationHandlerSp
*out = new(string)
**out = **in
}
if in.WebhookURL != nil {
in, out := &in.WebhookURL, &out.WebhookURL
*out = new(string)
**out = **in
}
return
}

View File

@ -994,6 +994,9 @@ type NodeTerminationHandlerSpec struct {
CPURequest *resource.Quantity `json:"cpuRequest,omitempty"`
// Version is the container image tag used.
Version *string `json:"version,omitempty"`
// If specified, posts event data to URL upon instance interruption action.
WebhookURL *string `json:"webhookURL,omitempty"`
}
// NodeProblemDetector determines the node problem detector configuration.

View File

@ -6782,6 +6782,7 @@ func autoConvert_v1alpha3_NodeTerminationHandlerSpec_To_kops_NodeTerminationHand
out.MemoryRequest = in.MemoryRequest
out.CPURequest = in.CPURequest
out.Version = in.Version
out.WebhookURL = in.WebhookURL
return nil
}
@ -6803,6 +6804,7 @@ func autoConvert_kops_NodeTerminationHandlerSpec_To_v1alpha3_NodeTerminationHand
out.MemoryRequest = in.MemoryRequest
out.CPURequest = in.CPURequest
out.Version = in.Version
out.WebhookURL = in.WebhookURL
return nil
}

View File

@ -4820,6 +4820,11 @@ func (in *NodeTerminationHandlerSpec) DeepCopyInto(out *NodeTerminationHandlerSp
*out = new(string)
**out = **in
}
if in.WebhookURL != nil {
in, out := &in.WebhookURL, &out.WebhookURL
*out = new(string)
**out = **in
}
return
}

View File

@ -5019,6 +5019,11 @@ func (in *NodeTerminationHandlerSpec) DeepCopyInto(out *NodeTerminationHandlerSp
*out = new(string)
**out = **in
}
if in.WebhookURL != nil {
in, out := &in.WebhookURL, &out.WebhookURL
*out = new(string)
**out = **in
}
return
}

View File

@ -212,6 +212,10 @@ spec:
value: "{{ DefaultQueueName }}"
- name: WORKERS
value: "10"
{{ if .WebhookURL }}
- name: WEBHOOK_URL
value: {{ .WebhookURL }}
{{ end }}
ports:
- name: liveness-probe
protocol: TCP