-
Notifications
You must be signed in to change notification settings - Fork 5
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
chore: move AMIs from instances to nodegroups #74
Conversation
Signed-off-by: Kushal Beniwal <[email protected]>
DiskSize *int32 `json:"diskSize,omitempty"` | ||
AMIType string `json:"amiType,omitempty"` | ||
CapacityType string `json:"capacityType,omitempty"` | ||
AMIReleaseVersion *string `json:"amiReleaseVersion,omitempty"` |
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.
Are AMIType and AMIReleaseVersion also NodeGroup specific? Especially since we have an Array of AMIs in a nodegroup now?
Signed-off-by: Kushal Beniwal <[email protected]>
DiskSize *int32 `json:"diskSize,omitempty"` | ||
AMIType string `json:"amiType,omitempty"` | ||
CapacityType string `json:"capacityType,omitempty"` | ||
AMIReleaseVersion *string `json:"amiReleaseVersion,omitempty"` |
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.
I think we should call this NodeGroupReleaseVersion or just ReleaseVersion (@anusha94 ?)
} | ||
|
||
ami, err := getAmi(ctx, ec2Client, x.Reservations[0].Instances[0].ImageId) | ||
if err != nil { |
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.
So it seems we are saving one of the many AMIs of the instances that a nodegroup might have. Because Nodegroup has a single AMIType, but multiple AMI Ids corresponding to that type, with variations in AMI fields like location, createtime, owner etc. Depending upon what fields of AMI are of interest, we might be ok with storing any one of the AMIs.
AmazonMachineImages
fromInstances
toNodegroups
.InstanceTypes
fromNodeGroups
toAmazonMachineImages
.Reservations
andNodegroups
.