Skip to content
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

Merged
merged 2 commits into from
Apr 8, 2023

Conversation

kbeniwal
Copy link
Contributor

@kbeniwal kbeniwal commented Apr 7, 2023

  • Move AmazonMachineImages from Instances to Nodegroups.
  • Move InstanceTypes from NodeGroups to AmazonMachineImages.
  • Prevent overwriting of Reservations and Nodegroups.

@kbeniwal kbeniwal requested review from anusha94 and pns-nirmata April 7, 2023 08:57
DiskSize *int32 `json:"diskSize,omitempty"`
AMIType string `json:"amiType,omitempty"`
CapacityType string `json:"capacityType,omitempty"`
AMIReleaseVersion *string `json:"amiReleaseVersion,omitempty"`
Copy link
Contributor

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?

DiskSize *int32 `json:"diskSize,omitempty"`
AMIType string `json:"amiType,omitempty"`
CapacityType string `json:"capacityType,omitempty"`
AMIReleaseVersion *string `json:"amiReleaseVersion,omitempty"`
Copy link
Contributor

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 {
Copy link
Contributor

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.

@pns-nirmata pns-nirmata merged commit 8040f36 into nirmata:main Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants