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
Removed hardcoding for AMIs in bastion host and added latest AMI lookup #3298
Removed hardcoding for AMIs in bastion host and added latest AMI lookup #3298
Conversation
@Ankitasw: 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. |
/test pull-cluster-api-provider-aws-e2e |
/retest |
Would be good to have a section that explains which images we use by default for bastions under accessing ec2 instances section in the book. Just to confirm, have you tested this locally by bringing up a bastion host? |
I will add the documentation. |
If we have a bastion host enabled template probably enough, but probably need to look at the controller logs if creating bastion instance is successful or not because we don't have any checks in the tests. Would be good to make sure locally as well. |
I checked that in any of E2E templates we are not setting bastion as enabled, shall we add it to one of the existing tests so that this is tested?
And the AMI fetched is the latest one: aws ec2 describe-images --image-ids ami-01896de1f162f0ab7 --region us-east-1 ✔
{
"Images": [
{
"Architecture": "x86_64",
"CreationDate": "2022-03-08T23:53:51.000Z",
"ImageId": "ami-01896de1f162f0ab7",
"ImageLocation": "099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20220308",
"ImageType": "machine",
"Public": true,
"OwnerId": "099720109477",
"PlatformDetails": "Linux/UNIX",
"UsageOperation": "RunInstances",
"State": "available",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda1",
"Ebs": {
"DeleteOnTermination": true,
"SnapshotId": "snap-0747283fe9fceac10",
"VolumeSize": 8,
"VolumeType": "gp2",
"Encrypted": false
}
},
{
"DeviceName": "/dev/sdb",
"VirtualName": "ephemeral0"
},
{
"DeviceName": "/dev/sdc",
"VirtualName": "ephemeral1"
}
],
"Description": "Canonical, Ubuntu, 20.04 LTS, amd64 focal image build on 2022-03-08",
"EnaSupport": true,
"Hypervisor": "xen",
"Name": "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20220308",
"RootDeviceName": "/dev/sda1",
"RootDeviceType": "ebs",
"SriovNetSupport": "simple",
"VirtualizationType": "hvm"
}
]
} |
@sedefsavas The default latest AMIs that are being used as of now shall be listed there? If yes, we will need to update it everytime the latest AMIs are published right? Or do we just want to specify that we use ubuntu cloud images? |
49ecfcd
to
a3dcb7b
Compare
a3dcb7b
to
820f7f4
Compare
@@ -31,6 +31,7 @@ spec: | |||
bastion: | |||
enabled: true | |||
``` | |||
If this field is set, then by default the latest AMI(Ubuntu 20.04 LTS OS) is looked up from [Ubuntu cloud images](https://ubuntu.com/server/docs/cloud-images/amazon-ec2) by CAPA controller and used in bastion host creation. |
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.
@sedefsavas Let me know if this statement would suffice? Wdyt?
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.
Just added this is true in case AMI ID is not specified
.
No need to publish those images in the book since not providing useful info, users can go to that link and see for themselves, and if users want more control, they can specify the AMI ID for the bastion host. Also, enabling bastion in e2e might be difficult to test, what will be the success condition there? Merging this PR now as this looks complete as is, if you want to do add an e2e test, feel free to do a follow up PR. |
/lgtm We can check |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sedefsavas The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Currently, default AMIs used for bastion are hardcoded. This PR enables to lookup the latest images published by Ubuntu.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #3108
Checklist:
Release note: