-
Notifications
You must be signed in to change notification settings - Fork 55
podvm: Cleanup leftover packer resources for AWS #592
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
Conversation
507babd
to
55dc8c6
Compare
The cleanup script gets the default VPC for the region and then cleans up any left over packer instances. The packer created instances have `packer` as prefix Signed-off-by: Pradipta Banerjee <[email protected]>
55dc8c6
to
c772fea
Compare
/retest |
@bpradipt: all tests passed! Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional-wise it works well. There is the question on how hard would be to add custom tags rather than rely on default VPC and packer*
prefix, but we can probably get away with documenting this at this point. The bigger question is whether it's likely people will specify their own VPC when using this operator, in such case we should respect that in the cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional-wise it works well. There is the question on how hard would be to add custom tags rather than rely on default VPC and packer*
prefix, but we can probably get away with documenting this at this point. The bigger question is whether it's likely people will specify their own VPC when using this operator, in such case we should respect that in the cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, provided we mention the default vpc packer*
cleanup in docs. Tested with a few manually created vms without the operator and works well unless it hits some issues (like multiple VMs with the same SG, then it fails, which might be a good idea as our packer VMs should never do that)
Added release note text in the related bug - https://issues.redhat.com/browse/KATA-3573 |
- Description of the problem which is fixed/What is the use case
During pod VM image build on AWS, if the job get's terminated abruptly then there will be left over packer resources.
- What I did
Added a cleanup script to execute as part of preStop hook for the image creation job to delete any leftover packer instances.
- How to verify it
Create kataconfig and watch for image creation job to start. Wait till it reaches the packer VM creation step. Delete the image creation pod and watch it's log to see the cleanup happening.
- Description for the changelog
Cleanup left over AWS packer resources