-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lifecycle Hooks for MachinePool/ASG #4020
Comments
This issue is currently awaiting triage. If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@sebltm I think you mean the Please describe how the hooks work with ASGs. Where do the hooks get defined in the ASG API? Do they have to be implemented using AWS Lambda? What changes to IAM policies would be required? Thanks! /triage needs-information |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
Sorry I’d forgotten about this one! The hooks can target SNS, SQS or EventBridge - whether there’s also a Lambda or something else shouldn’t be part of the scope of this implementation. Rather should be led to the user to implement in my opinion. lifecycleHook:
sns:
sqs:
eventBridge: (Only one of the options above should be mentioned) |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi, can we reopen this issue I'd like to take a look at it |
@dlipovetsky They are part of the ASG definition in the API, so the user would need to define as a part of the AWSMachinePool or AWSManagedMachinePool which ARN is going to process the notificaiton (ARN of the SNS or SQS queue for example). The actual management process of the SNS/SQS/EventBridge should not be in scope for these, we can assume the user created the appropriate infrastructure through a thirdparty system. Therefore no changes to the IAM policies are required. The lifecycle hooks need to be created after the ASG. I propose adding the AWSMachinePool and AWSManagedMachinePool CRDs a field: lifecycleHooks:
- name: <name of the lifecycle hook; required>
notificationTargetARN: <ARN of a target like an SQS or SNS queue otherwise the default is EventBridge; optional>
roleARN: <role ARN to use for the hook; optional>
lifecycleTransition: <the instance state to which to attach the hook; required>
heartbeatTimeout: <the timeout in seconds associated to the hook after which the default action is used, default is 3600 seconds; optional>
defaultResult: <action taken after timeout, either CONTINUE or ABANDON, default is ABANDON; optional>
notificationMetadata: <some additional string data passed to the target; optional> which would be reconciled after the ASG is created and deleted after the ASG is deleted. |
/reopen |
@sebltm: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/remove-lifecycle rotten |
@dlipovetsky any more information needed on this one? |
@Ankitasw @dlipovetsky how can I help move this one forward please? :) |
/kind feature
Describe the solution you'd like
ASGs have support for Lifecycle Hooks and it's a good idea to expose this in the MachinePool CRD. When I scale up and down my ASGs, I want to be able to execute some Lambda functions to create and delete other resources that my nodes need. Doing this through the lifecycle hook allows me to only allow the creation of the EC2 instance to go ahead if the Lambda function ran successfully.
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
): v1.26.0/etc/os-release
): Ubuntu 20.04The text was updated successfully, but these errors were encountered: