From a0bc27ff9b3c310ed786ea8b402373bd7a39e9dc Mon Sep 17 00:00:00 2001 From: Robert Lucian Chiriac Date: Wed, 5 Jan 2022 23:22:29 +0200 Subject: [PATCH 01/11] Add helper functions for ELB (classic LB) --- cli/cmd/cluster.go | 2 +- manager/manifests/istio.yaml.j2 | 2 +- pkg/health/health.go | 35 ++++-- pkg/lib/aws/clients.go | 9 ++ pkg/lib/aws/elb.go | 78 +++++++----- pkg/lib/aws/elbv2.go | 113 ++++++++++++++++++ pkg/types/clusterconfig/cluster_config.go | 12 ++ pkg/types/clusterconfig/load_balancer_type.go | 78 ++++++++++++ 8 files changed, 284 insertions(+), 45 deletions(-) create mode 100644 pkg/lib/aws/elbv2.go create mode 100644 pkg/types/clusterconfig/load_balancer_type.go diff --git a/cli/cmd/cluster.go b/cli/cmd/cluster.go index 9897ace8fc..ec29d3dcf3 100644 --- a/cli/cmd/cluster.go +++ b/cli/cmd/cluster.go @@ -1367,7 +1367,7 @@ func (lb LoadBalancer) String() string { // Will return error if the load balancer can't be found func getLoadBalancer(clusterName string, whichLB LoadBalancer, awsClient *awslib.Client) (*elbv2.LoadBalancer, error) { - loadBalancer, err := awsClient.FindLoadBalancer(map[string]string{ + loadBalancer, err := awsClient.FindLoadBalancerV2(map[string]string{ clusterconfig.ClusterNameTag: clusterName, "cortex.dev/load-balancer": whichLB.String(), }) diff --git a/manager/manifests/istio.yaml.j2 b/manager/manifests/istio.yaml.j2 index 0341b2d112..cfebfba595 100644 --- a/manager/manifests/istio.yaml.j2 +++ b/manager/manifests/istio.yaml.j2 @@ -109,7 +109,7 @@ spec: istio: ingressgateway-apis k8s: serviceAnnotations: - service.beta.kubernetes.io/aws-load-balancer-type: "nlb" + service.beta.kubernetes.io/aws-load-balancer-type: "{{ env['CORTEX_API_LOAD_BALANCER_TYPE'] }}" service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true" service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: "{{ env['CORTEX_API_LOAD_BALANCER_TAGS'] }}" service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp" diff --git a/pkg/health/health.go b/pkg/health/health.go index 5bc2bae931..f0dcc93fa1 100644 --- a/pkg/health/health.go +++ b/pkg/health/health.go @@ -21,8 +21,8 @@ import ( "fmt" "reflect" - "github.com/aws/aws-sdk-go/service/elbv2" "github.com/cortexlabs/cortex/pkg/consts" + "github.com/cortexlabs/cortex/pkg/lib/aws" awslib "github.com/cortexlabs/cortex/pkg/lib/aws" "github.com/cortexlabs/cortex/pkg/lib/errors" "github.com/cortexlabs/cortex/pkg/lib/json" @@ -160,12 +160,12 @@ func Check(awsClient *awslib.Client, k8sClient *k8s.Client, clusterName string) }, func() error { var err error - operatorLoadBalancerHealth, err = getLoadBalancerHealth(awsClient, clusterName, "operator") + operatorLoadBalancerHealth, err = getLoadBalancerHealth(awsClient, clusterName, "operator", false) return err }, func() error { var err error - apisLoadBalancerHealth, err = getLoadBalancerHealth(awsClient, clusterName, "api") + apisLoadBalancerHealth, err = getLoadBalancerHealth(awsClient, clusterName, "api", true) return err }, func() error { @@ -287,20 +287,35 @@ func getDaemonSetReadiness(k8sClient *k8s.Client, name, namespace string) (bool, return daemonSet.Status.NumberReady == daemonSet.Status.CurrentNumberScheduled, nil } -func getLoadBalancerHealth(awsClient *awslib.Client, clusterName string, loadBalancerName string) (bool, error) { - loadBalancer, err := awsClient.FindLoadBalancer(map[string]string{ +func getLoadBalancerHealth(awsClient *awslib.Client, clusterName string, loadBalancerName string, testClassicLB bool) (bool, error) { + loadBalancerV2, err := awsClient.FindLoadBalancerV2(map[string]string{ clusterconfig.ClusterNameTag: clusterName, "cortex.dev/load-balancer": loadBalancerName, }) - if err != nil { - return false, errors.Wrap(err, fmt.Sprintf("unable to locate %s load balancer", loadBalancerName)) + loadBalancerV2Exists := err == nil && loadBalancerV2 != nil + if !testClassicLB && !loadBalancerV2Exists { + return false, errors.Wrap(err, fmt.Sprintf("unable to locate %s nlb load balancer", loadBalancerName)) } - - if loadBalancer.State == nil || loadBalancer.State.Code == nil { + if loadBalancerV2Exists && aws.IsLoadBalancerV2Healthy(*loadBalancerV2) { + return true, nil + } + if !testClassicLB { return false, nil } - return *loadBalancer.State.Code == elbv2.LoadBalancerStateEnumActive, nil + loadBalancer, err := awsClient.FindLoadBalancer(map[string]string{ + clusterconfig.ClusterNameTag: clusterName, + "cortex.dev/load-balancer": loadBalancerName, + }) + loadBalancerExists := err == nil && loadBalancer != nil + if !loadBalancerExists { + return false, errors.Wrap(err, fmt.Sprintf("unable to locate %s elb load balancer", loadBalancerName)) + } + healthy, err := awsClient.IsLoadBalancerHealthy(*loadBalancer.LoadBalancerName) + if err != nil { + return false, errors.Wrap(err, fmt.Sprintf("unable to check %s elb load balancer", loadBalancerName)) + } + return healthy, nil } func getPodMemorySaturation(k8sClient *k8s.Client, podName, namespace string) (float64, error) { diff --git a/pkg/lib/aws/clients.go b/pkg/lib/aws/clients.go index 8a50509cd2..6b8b812c7e 100644 --- a/pkg/lib/aws/clients.go +++ b/pkg/lib/aws/clients.go @@ -26,6 +26,7 @@ import ( "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/ecr" "github.com/aws/aws-sdk-go/service/eks" + "github.com/aws/aws-sdk-go/service/elb" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/aws/aws-sdk-go/service/iam" "github.com/aws/aws-sdk-go/service/s3" @@ -42,6 +43,7 @@ type clients struct { sts *sts.STS sqs *sqs.SQS ec2 *ec2.EC2 + elb *elb.ELB elbv2 *elbv2.ELBV2 eks *eks.EKS ecr *ecr.ECR @@ -97,6 +99,13 @@ func (c *Client) EC2() *ec2.EC2 { return c.clients.ec2 } +func (c *Client) ELB() *elb.ELB { + if c.clients.elb == nil { + c.clients.elb = elb.New(c.sess) + } + return c.clients.elb +} + func (c *Client) ELBV2() *elbv2.ELBV2 { if c.clients.elbv2 == nil { c.clients.elbv2 = elbv2.New(c.sess) diff --git a/pkg/lib/aws/elb.go b/pkg/lib/aws/elb.go index ccd8e624d7..f385972dcb 100644 --- a/pkg/lib/aws/elb.go +++ b/pkg/lib/aws/elb.go @@ -17,52 +17,44 @@ limitations under the License. package aws import ( - "strings" - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/service/elbv2" + "github.com/aws/aws-sdk-go/service/elb" "github.com/cortexlabs/cortex/pkg/lib/errors" - "github.com/cortexlabs/cortex/pkg/lib/sets/strset" ) -// https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html -var _nlbUnsupportedInstancePrefixes = strset.New("c1", "cc1", "cc2", "cg1", "cg2", "cr1", "g1", "g2", "hi1", "hs1", "m1", "m2", "m3", "t1") - -func IsInstanceSupportedByNLB(instanceType string) (bool, error) { - if err := CheckValidInstanceType(instanceType); err != nil { - return false, err - } +type ClassicLoadBalancerState string - for prefix := range _nlbUnsupportedInstancePrefixes { - if strings.HasPrefix(instanceType, prefix) { - return false, nil - } - } +const ( + LoadBalancerStateInService ClassicLoadBalancerState = "InService" + LoadBalancerStateOutOfService ClassicLoadBalancerState = "OutOfService" + LoadBalancerStateUnknown ClassicLoadBalancerState = "Unknown" +) - return true, nil +func (state ClassicLoadBalancerState) String() string { + return string(state) } -// returns the first load balancer which has all of the specified tags, or nil if no load balancers match -func (c *Client) FindLoadBalancer(tags map[string]string) (*elbv2.LoadBalancer, error) { - var loadBalancer *elbv2.LoadBalancer +// returns the first classic load balancer which has all of the specified tags, or nil if no load balancers match +func (c *Client) FindLoadBalancer(tags map[string]string) (*elb.LoadBalancerDescription, error) { + var loadBalancer *elb.LoadBalancerDescription var fnErr error - params := elbv2.DescribeLoadBalancersInput{ + params := elb.DescribeLoadBalancersInput{ PageSize: aws.Int64(20), // 20 is the limit for DescribeTags() } - err := c.ELBV2().DescribeLoadBalancersPages(¶ms, - func(page *elbv2.DescribeLoadBalancersOutput, lastPage bool) bool { - arns := make([]string, len(page.LoadBalancers)) - loadBalancers := make(map[string]*elbv2.LoadBalancer) - - for i := range page.LoadBalancers { - arn := *page.LoadBalancers[i].LoadBalancerArn - arns[i] = arn - loadBalancers[arn] = page.LoadBalancers[i] + err := c.ELB().DescribeLoadBalancersPages(¶ms, + func(page *elb.DescribeLoadBalancersOutput, lastPage bool) bool { + loadBalancerNames := make([]string, len(page.LoadBalancerDescriptions)) + loadBalancers := make(map[string]*elb.LoadBalancerDescription) + + for i := range page.LoadBalancerDescriptions { + loadBalancerName := *page.LoadBalancerDescriptions[i].LoadBalancerName + loadBalancerNames[i] = loadBalancerName + loadBalancers[loadBalancerName] = page.LoadBalancerDescriptions[i] } - tagsOutput, err := c.ELBV2().DescribeTags(&elbv2.DescribeTagsInput{ - ResourceArns: aws.StringSlice(arns), + tagsOutput, err := c.ELB().DescribeTags(&elb.DescribeTagsInput{ + LoadBalancerNames: aws.StringSlice(loadBalancerNames), }) if err != nil { fnErr = errors.WithStack(err) @@ -86,7 +78,7 @@ func (c *Client) FindLoadBalancer(tags map[string]string) (*elbv2.LoadBalancer, } if !missingTag { - loadBalancer = loadBalancers[*tagDescription.ResourceArn] + loadBalancer = loadBalancers[*tagDescription.LoadBalancerName] return false } } @@ -103,3 +95,23 @@ func (c *Client) FindLoadBalancer(tags map[string]string) (*elbv2.LoadBalancer, return loadBalancer, nil } + +func (c *Client) IsLoadBalancerHealthy(loadBalancerName string) (bool, error) { + instanceHealthOutput, err := c.ELB().DescribeInstanceHealth(&elb.DescribeInstanceHealthInput{ + LoadBalancerName: &loadBalancerName, + }) + if err != nil { + return false, errors.WithStack(err) + } + + for _, instance := range instanceHealthOutput.InstanceStates { + if instance == nil { + continue + } + if instance.State != nil && *instance.State != LoadBalancerStateInService.String() { + return false, nil + } + } + + return true, nil +} diff --git a/pkg/lib/aws/elbv2.go b/pkg/lib/aws/elbv2.go new file mode 100644 index 0000000000..5d64a41651 --- /dev/null +++ b/pkg/lib/aws/elbv2.go @@ -0,0 +1,113 @@ +/* +Copyright 2021 Cortex Labs, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package aws + +import ( + "strings" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/service/elbv2" + "github.com/cortexlabs/cortex/pkg/lib/errors" + "github.com/cortexlabs/cortex/pkg/lib/sets/strset" +) + +// https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html +var _nlbUnsupportedInstancePrefixes = strset.New("c1", "cc1", "cc2", "cg1", "cg2", "cr1", "g1", "g2", "hi1", "hs1", "m1", "m2", "m3", "t1") + +func IsInstanceSupportedByNLB(instanceType string) (bool, error) { + if err := CheckValidInstanceType(instanceType); err != nil { + return false, err + } + + for prefix := range _nlbUnsupportedInstancePrefixes { + if strings.HasPrefix(instanceType, prefix) { + return false, nil + } + } + + return true, nil +} + +// returns the first network/application load balancer which has all of the specified tags, or nil if no load balancers match +func (c *Client) FindLoadBalancerV2(tags map[string]string) (*elbv2.LoadBalancer, error) { + var loadBalancer *elbv2.LoadBalancer + var fnErr error + + params := elbv2.DescribeLoadBalancersInput{ + PageSize: aws.Int64(20), // 20 is the limit for DescribeTags() + } + err := c.ELBV2().DescribeLoadBalancersPages(¶ms, + func(page *elbv2.DescribeLoadBalancersOutput, lastPage bool) bool { + arns := make([]string, len(page.LoadBalancers)) + loadBalancers := make(map[string]*elbv2.LoadBalancer) + + for i := range page.LoadBalancers { + arn := *page.LoadBalancers[i].LoadBalancerArn + arns[i] = arn + loadBalancers[arn] = page.LoadBalancers[i] + } + + tagsOutput, err := c.ELBV2().DescribeTags(&elbv2.DescribeTagsInput{ + ResourceArns: aws.StringSlice(arns), + }) + if err != nil { + fnErr = errors.WithStack(err) + return false + } + + for _, tagDescription := range tagsOutput.TagDescriptions { + lbTags := make(map[string]string, len(tagDescription.Tags)) + for _, lbTag := range tagDescription.Tags { + if lbTag.Key != nil && lbTag.Value != nil { + lbTags[*lbTag.Key] = *lbTag.Value + } + } + + missingTag := false + for key, value := range tags { + if lbTags[key] != value { + missingTag = true + break + } + } + + if !missingTag { + loadBalancer = loadBalancers[*tagDescription.ResourceArn] + return false + } + } + + return true + }) + + if err != nil { + return nil, errors.WithStack(err) + } + if fnErr != nil { + return nil, fnErr + } + + return loadBalancer, nil +} + +func IsLoadBalancerV2Healthy(loadBalancer elbv2.LoadBalancer) bool { + if loadBalancer.State == nil || loadBalancer.State.Code == nil { + return false + } + + return *loadBalancer.State.Code == elbv2.LoadBalancerStateEnumActive +} diff --git a/pkg/types/clusterconfig/cluster_config.go b/pkg/types/clusterconfig/cluster_config.go index e4e0b57b6d..b5fcb6d617 100644 --- a/pkg/types/clusterconfig/cluster_config.go +++ b/pkg/types/clusterconfig/cluster_config.go @@ -136,6 +136,7 @@ type CoreConfig struct { SubnetVisibility SubnetVisibility `json:"subnet_visibility" yaml:"subnet_visibility"` Subnets []*Subnet `json:"subnets,omitempty" yaml:"subnets,omitempty"` NATGateway NATGateway `json:"nat_gateway" yaml:"nat_gateway"` + APILoadBalancerType LoadBalancerType `json:"api_load_balancer_type" yaml:"api_load_balancer_type"` APILoadBalancerScheme LoadBalancerScheme `json:"api_load_balancer_scheme" yaml:"api_load_balancer_scheme"` OperatorLoadBalancerScheme LoadBalancerScheme `json:"operator_load_balancer_scheme" yaml:"operator_load_balancer_scheme"` APILoadBalancerCIDRWhiteList []string `json:"api_load_balancer_cidr_white_list,omitempty" yaml:"api_load_balancer_cidr_white_list,omitempty"` @@ -634,6 +635,16 @@ var CoreConfigStructFieldValidations = []*cr.StructFieldValidation{ return SingleNATGateway.String() }, }, + { + StructField: "APILoadBalancerType", + StringValidation: &cr.StringValidation{ + AllowedValues: LoadBalancerTypeStrings(), + Default: NLBLoadBalancerType.String(), + }, + Parser: func(str string) (interface{}, error) { + return LoadBalancerTypeFromString(str), nil + }, + }, { StructField: "APILoadBalancerScheme", StringValidation: &cr.StringValidation{ @@ -1835,6 +1846,7 @@ func (cc *CoreConfig) TelemetryEvent() map[string]interface{} { event["subnet_visibility"] = cc.SubnetVisibility event["nat_gateway"] = cc.NATGateway + event["api_load_balancer_type"] = cc.APILoadBalancerType event["api_load_balancer_scheme"] = cc.APILoadBalancerScheme event["operator_load_balancer_scheme"] = cc.OperatorLoadBalancerScheme if cc.VPCCIDR != nil { diff --git a/pkg/types/clusterconfig/load_balancer_type.go b/pkg/types/clusterconfig/load_balancer_type.go new file mode 100644 index 0000000000..5ea9b06c8d --- /dev/null +++ b/pkg/types/clusterconfig/load_balancer_type.go @@ -0,0 +1,78 @@ +/* +Copyright 2021 Cortex Labs, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package clusterconfig + +type LoadBalancerType int + +const ( + UnknownLoadBalancerType LoadBalancerType = iota + NLBLoadBalancerType + ELBLoadBalancerType +) + +var _loadBalancerTypes = []string{ + "unknown", + "nlb", + "elb", +} + +func LoadBalancerTypeFromString(s string) LoadBalancerType { + for i := 0; i < len(_loadBalancerTypes); i++ { + if s == _loadBalancerTypes[i] { + return LoadBalancerType(i) + } + } + return UnknownLoadBalancerType +} + +func LoadBalancerTypeStrings() []string { + return _loadBalancerTypes[1:] +} + +func (t LoadBalancerType) String() string { + return _loadBalancerTypes[t] +} + +// MarshalText satisfies TextMarshaler +func (t LoadBalancerType) MarshalText() ([]byte, error) { + return []byte(t.String()), nil +} + +// UnmarshalText satisfies TextUnmarshaler +func (t *LoadBalancerType) UnmarshalText(text []byte) error { + enum := string(text) + for i := 0; i < len(_loadBalancerTypes); i++ { + if enum == _loadBalancerTypes[i] { + *t = LoadBalancerType(i) + return nil + } + } + + *t = UnknownLoadBalancerType + return nil +} + +// UnmarshalBinary satisfies BinaryUnmarshaler +// Needed for msgpack +func (t *LoadBalancerType) UnmarshalBinary(data []byte) error { + return t.UnmarshalText(data) +} + +// MarshalBinary satisfies BinaryMarshaler +func (t LoadBalancerType) MarshalBinary() ([]byte, error) { + return []byte(t.String()), nil +} From dffa545b801ad93ab10f424947f85010795a9929 Mon Sep 17 00:00:00 2001 From: Robert Lucian Chiriac Date: Wed, 5 Jan 2022 23:22:44 +0200 Subject: [PATCH 02/11] Allow all instance types for ELB LB --- pkg/types/clusterconfig/cluster_config.go | 42 +++++++++++++++++------ 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/pkg/types/clusterconfig/cluster_config.go b/pkg/types/clusterconfig/cluster_config.go index b5fcb6d617..cd29f28b1d 100644 --- a/pkg/types/clusterconfig/cluster_config.go +++ b/pkg/types/clusterconfig/cluster_config.go @@ -324,6 +324,7 @@ var CoreConfigStructFieldValidations = []*cr.StructFieldValidation{ StringValidation: &cr.StringValidation{ MinLength: 1, Default: "t3.medium", + // TODO could add a ValidatorWithField field to avoid having to validate for the nlb stuff in the validate function (from cluster config) Validator: validatePrometheusInstanceType, }, }, @@ -920,6 +921,16 @@ func (cc *CoreConfig) SQSNamePrefix() string { } func (cc *Config) validate(awsClient *aws.Client) error { + if cc.APILoadBalancerType == NLBLoadBalancerType { + isSupportedByNLB, err := aws.IsInstanceSupportedByNLB(cc.PrometheusInstanceType) + if err != nil { + return err + } + if !isSupportedByNLB { + return errors.Wrap(ErrorInstanceTypeNotSupportedByCortex(cc.PrometheusInstanceType), PrometheusInstanceTypeKey) + } + } + numNodeGroups := len(cc.NodeGroups) if numNodeGroups > MaxNodeGroups { return ErrorMaxNumOfNodeGroupsReached(MaxNodeGroups) @@ -943,7 +954,7 @@ func (cc *Config) validate(awsClient *aws.Client) error { return errors.Wrap(ErrorDuplicateNodeGroupName(nodeGroup.Name), NodeGroupsKey) } - err := nodeGroup.validateNodeGroup(awsClient, cc.Region) + err := nodeGroup.validateNodeGroup(awsClient, cc.Region, cc.APILoadBalancerType) if err != nil { return errors.Wrap(err, NodeGroupsKey, nodeGroup.Name) } @@ -1251,13 +1262,23 @@ func (cc *Config) ValidateOnConfigure(awsClient *aws.Client, k8sClient *k8s.Clie }, nil } -func (ng *NodeGroup) validateNodeGroup(awsClient *aws.Client, region string) error { +func (ng *NodeGroup) validateNodeGroup(awsClient *aws.Client, region string, loadBalancerType LoadBalancerType) error { if ng.MinInstances > ng.MaxInstances { return ErrorMinInstancesGreaterThanMax(ng.MinInstances, ng.MaxInstances) } primaryInstanceType := ng.InstanceType + if loadBalancerType == NLBLoadBalancerType { + isPrimaryInstanceSupportedByNLB, err := aws.IsInstanceSupportedByNLB(primaryInstanceType) + if err != nil { + return err + } + if !isPrimaryInstanceSupportedByNLB { + return errors.Wrap(ErrorInstanceTypeNotSupportedByCortex(primaryInstanceType), InstanceTypeKey) + } + } + if !aws.InstanceTypes[region].Has(primaryInstanceType) { return errors.Wrap(ErrorInstanceTypeNotSupportedInRegion(primaryInstanceType, region), InstanceTypeKey) } @@ -1327,6 +1348,15 @@ func (ng *NodeGroup) validateNodeGroup(awsClient *aws.Client, region string) err return errors.Wrap(ErrorInstanceTypeNotSupportedInRegion(instanceType, region), SpotConfigKey, InstanceDistributionKey) } + if loadBalancerType == NLBLoadBalancerType { + isSecondaryInstanceSupportedByNLB, err := aws.IsInstanceSupportedByNLB(primaryInstanceType) + if err != nil { + return err + } + if !isSecondaryInstanceSupportedByNLB { + return errors.Wrap(ErrorInstanceTypeNotSupportedByCortex(primaryInstanceType), SpotConfigKey, InstanceDistributionKey) + } + } if _, ok := aws.InstanceMetadatas[region][instanceType]; !ok { return errors.Wrap(ErrorInstanceTypeNotSupportedByCortex(instanceType), SpotConfigKey, InstanceDistributionKey) } @@ -1543,14 +1573,6 @@ func validateInstanceType(instanceType string) (string, error) { return "", ErrorInstanceTypeTooSmall(instanceType) } - isSupportedByNLB, err := aws.IsInstanceSupportedByNLB(instanceType) - if err != nil { - return "", err - } - if !isSupportedByNLB { - return "", ErrorInstanceTypeNotSupportedByCortex(instanceType) - } - isAMDGPU, err := aws.IsAMDGPUInstance(instanceType) if err != nil { return "", err From 652bd88249407cddda7f8aa339d8cf67415e0bc1 Mon Sep 17 00:00:00 2001 From: Robert Lucian Chiriac Date: Thu, 6 Jan 2022 01:32:08 +0200 Subject: [PATCH 03/11] Add support for classic load balancers in python --- manager/get_api_load_balancer_state.py | 17 +++++--- manager/get_operator_target_group_status.py | 4 +- manager/helpers.py | 48 ++++++++++++++++++--- 3 files changed, 56 insertions(+), 13 deletions(-) diff --git a/manager/get_api_load_balancer_state.py b/manager/get_api_load_balancer_state.py index 201c0c1814..788f0d2a24 100644 --- a/manager/get_api_load_balancer_state.py +++ b/manager/get_api_load_balancer_state.py @@ -15,17 +15,22 @@ import boto3 import os -from helpers import get_api_load_balancer +from helpers import get_api_load_balancer_v2, get_api_load_balancer, get_api_load_balancer_health def get_api_load_balancer_state(): cluster_name = os.environ["CORTEX_CLUSTER_NAME"] region = os.environ["CORTEX_REGION"] - - client_elbv2 = boto3.client("elbv2", region_name=region) - - load_balancer = get_api_load_balancer(cluster_name, client_elbv2) - return load_balancer["State"]["Code"] + load_balancer_type = os.environ["API_LOAD_BALANCER_TYPE"] + + if load_balancer_type == "nlb": + client_elbv2 = boto3.client("elbv2", region_name=region) + load_balancer = get_api_load_balancer_v2(cluster_name, client_elbv2) + return load_balancer["State"]["Code"] + else: + client_elb = boto3.client("elb", region_name=region) + load_balancer = get_api_load_balancer(cluster_name, client_elb) + return get_api_load_balancer_health(load_balancer["LoadBalancerName"], client_elb) if __name__ == "__main__": diff --git a/manager/get_operator_target_group_status.py b/manager/get_operator_target_group_status.py index a2079f19fb..51f01d89c6 100644 --- a/manager/get_operator_target_group_status.py +++ b/manager/get_operator_target_group_status.py @@ -16,7 +16,7 @@ import os import json -from helpers import get_operator_load_balancer +from helpers import get_operator_load_balancer_v2 def get_operator_target_group_status(): @@ -25,7 +25,7 @@ def get_operator_target_group_status(): client_elbv2 = boto3.client("elbv2", region_name=region) - load_balancer_arn = get_operator_load_balancer(cluster_name, client_elbv2)["LoadBalancerArn"] + load_balancer_arn = get_operator_load_balancer_v2(cluster_name, client_elbv2)["LoadBalancerArn"] target_group_arn = get_load_balancer_https_target_group_arn(load_balancer_arn, client_elbv2) return get_target_health(target_group_arn, client_elbv2) diff --git a/manager/helpers.py b/manager/helpers.py index fafb2131ff..d42590e3b8 100644 --- a/manager/helpers.py +++ b/manager/helpers.py @@ -13,15 +13,29 @@ # limitations under the License. -def get_operator_load_balancer(cluster_name, client_elbv2): - return _get_load_balancer("operator", cluster_name, client_elbv2) +def get_operator_load_balancer_v2(cluster_name, client_elbv2): + return _get_load_balancer_v2("operator", cluster_name, client_elbv2) -def get_api_load_balancer(cluster_name, client_elbv2): - return _get_load_balancer("api", cluster_name, client_elbv2) +def get_api_load_balancer_v2(cluster_name, client_elbv2): + return _get_load_balancer_v2("api", cluster_name, client_elbv2) -def _get_load_balancer(load_balancer_tag, cluster_name, client_elbv2): +def get_api_load_balancer(cluster_name, client_elb): + return _get_load_balancer("api", cluster_name, client_elb) + + +def get_api_load_balancer_health(load_balancer_name, client_elb): + instance_health = client_elb.describe_instance_health( + LoadBalancerName=load_balancer_name, + ) + for instance_state in instance_health["InstanceStates"]: + if instance_state["State"] != "InService": + return "inactive" + return "active" + + +def _get_load_balancer_v2(load_balancer_tag, cluster_name, client_elbv2): paginator = client_elbv2.get_paginator("describe_load_balancers") for load_balancer_page in paginator.paginate(PaginationConfig={"PageSize": 20}): load_balancers = { @@ -43,3 +57,27 @@ def _get_load_balancer(load_balancer_tag, cluster_name, client_elbv2): return load_balancers[tag_description["ResourceArn"]] raise Exception(f"unable to find {load_balancer_tag} load balancer") + + +def _get_load_balancer(load_balancer_tag, cluster_name, client_elb): + paginator = client_elb.get_paginator("describe_load_balancers") + for load_balancer_page in paginator.paginate(PaginationConfig={"PageSize": 20}): + load_balancers = { + load_balancer["LoadBalancerName"]: load_balancer + for load_balancer in load_balancer_page["LoadBalancerDescriptions"] + } + tag_descriptions = client_elb.describe_tags(LoadBalancerNames=list(load_balancers.keys()))[ + "TagDescriptions" + ] + for tag_description in tag_descriptions: + foundClusterNameTag = False + foundLoadBalancerTag = False + for tags in tag_description["Tags"]: + if tags["Key"] == "cortex.dev/cluster-name" and tags["Value"] == cluster_name: + foundClusterNameTag = True + if tags["Key"] == "cortex.dev/load-balancer" and tags["Value"] == load_balancer_tag: + foundLoadBalancerTag = True + if foundClusterNameTag and foundLoadBalancerTag: + return load_balancers[tag_description["LoadBalancerName"]] + + raise Exception(f"unable to find {load_balancer_tag} load balancer") From a1f4a07821287705681cbc7bf0d7c3f75265ced8 Mon Sep 17 00:00:00 2001 From: Robert Lucian Chiriac Date: Thu, 6 Jan 2022 01:32:32 +0200 Subject: [PATCH 04/11] Get cmdInfo function to work with ELBs --- cli/cmd/cluster.go | 49 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/cli/cmd/cluster.go b/cli/cmd/cluster.go index ec29d3dcf3..414b2dcacb 100644 --- a/cli/cmd/cluster.go +++ b/cli/cmd/cluster.go @@ -29,6 +29,7 @@ import ( "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/eks" + "github.com/aws/aws-sdk-go/service/elb" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/aws/aws-sdk-go/service/s3" "github.com/cortexlabs/cortex/cli/cluster" @@ -302,7 +303,7 @@ var _clusterUpCmd = &cobra.Command{ exit.Error(ErrorClusterUp(out + helpStr)) } - loadBalancer, err := getLoadBalancer(clusterConfig.ClusterName, OperatorLoadBalancer, awsClient) + loadBalancer, err := getLoadBalancerV2(clusterConfig.ClusterName, OperatorLoadBalancer, awsClient) if err != nil { exit.Error(errors.Append(err, fmt.Sprintf("\n\nyou can attempt to resolve this issue and configure your cli environment by running `cortex cluster info --configure-env %s`", envName))) } @@ -522,7 +523,7 @@ var _clusterDownCmd = &cobra.Command{ } // updating CLI env is best-effort, so ignore errors - loadBalancer, _ := getLoadBalancer(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) + loadBalancer, _ := getLoadBalancerV2(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) fmt.Print("○ deleting sqs queues ... ") numDeleted, err := awsClient.DeleteQueuesWithPrefix(clusterconfig.SQSNamePrefix(accessConfig.ClusterName)) @@ -735,7 +736,7 @@ var _clusterExportCmd = &cobra.Command{ exit.Error(err) } - loadBalancer, err := getLoadBalancer(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) + loadBalancer, err := getLoadBalancerV2(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) if err != nil { exit.Error(err) } @@ -881,17 +882,27 @@ func cmdPrintConfig(awsClient *awslib.Client, accessConfig *clusterconfig.Access func cmdInfo(awsClient *awslib.Client, accessConfig *clusterconfig.AccessConfig, stacks clusterstate.ClusterStacks, outputType flags.OutputType, disallowPrompt bool) { clusterConfig := refreshCachedClusterConfig(awsClient, accessConfig, outputType == flags.PrettyOutputType) - operatorLoadBalancer, err := getLoadBalancer(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) + operatorLoadBalancer, err := getLoadBalancerV2(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) if err != nil { exit.Error(err) } - apiLoadBalancer, err := getLoadBalancer(accessConfig.ClusterName, APILoadBalancer, awsClient) - if err != nil { - exit.Error(err) - } - operatorEndpoint := s.EnsurePrefix(*operatorLoadBalancer.DNSName, "https://") - apiEndpoint := *apiLoadBalancer.DNSName + + var apiEndpoint string + if clusterConfig.APILoadBalancerType == clusterconfig.NLBLoadBalancerType { + apiLoadBalancer, err := getLoadBalancerV2(accessConfig.ClusterName, APILoadBalancer, awsClient) + if err != nil { + exit.Error(err) + } + apiEndpoint = *apiLoadBalancer.DNSName + } + if clusterConfig.APILoadBalancerType == clusterconfig.NLBLoadBalancerType { + apiLoadBalancer, err := getLoadBalancer(accessConfig.ClusterName, APILoadBalancer, awsClient) + if err != nil { + exit.Error(err) + } + apiEndpoint = *apiLoadBalancer.DNSName + } if outputType == flags.JSONOutputType || outputType == flags.YAMLOutputType { infoResponse, err := getInfoOperatorResponse(operatorEndpoint) @@ -1366,7 +1377,7 @@ func (lb LoadBalancer) String() string { } // Will return error if the load balancer can't be found -func getLoadBalancer(clusterName string, whichLB LoadBalancer, awsClient *awslib.Client) (*elbv2.LoadBalancer, error) { +func getLoadBalancerV2(clusterName string, whichLB LoadBalancer, awsClient *awslib.Client) (*elbv2.LoadBalancer, error) { loadBalancer, err := awsClient.FindLoadBalancerV2(map[string]string{ clusterconfig.ClusterNameTag: clusterName, "cortex.dev/load-balancer": whichLB.String(), @@ -1382,6 +1393,22 @@ func getLoadBalancer(clusterName string, whichLB LoadBalancer, awsClient *awslib return loadBalancer, nil } +func getLoadBalancer(clusterName string, whichLB LoadBalancer, awsClient *awslib.Client) (*elb.LoadBalancerDescription, error) { + loadBalancer, err := awsClient.FindLoadBalancer(map[string]string{ + clusterconfig.ClusterNameTag: clusterName, + "cortex.dev/load-balancer": whichLB.String(), + }) + if err != nil { + return nil, errors.Wrap(err, fmt.Sprintf("unable to locate %s load balancer", whichLB.String())) + } + + if loadBalancer == nil { + return nil, ErrorNoOperatorLoadBalancer(whichLB.String()) + } + + return loadBalancer, nil +} + func listPVCVolumesForCluster(awsClient *awslib.Client, clusterName string) ([]ec2.Volume, error) { return awsClient.ListVolumes(ec2.Tag{ Key: pointer.String(fmt.Sprintf("kubernetes.io/cluster/%s", clusterName)), From 4e31efaeba5ad8c40989241345658150dde6e128 Mon Sep 17 00:00:00 2001 From: Robert Lucian Chiriac Date: Thu, 6 Jan 2022 12:02:28 +0200 Subject: [PATCH 05/11] Fix get_operator_load_balancer_state func --- manager/get_operator_load_balancer_state.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manager/get_operator_load_balancer_state.py b/manager/get_operator_load_balancer_state.py index 169d8f0e6a..9a4d26f920 100644 --- a/manager/get_operator_load_balancer_state.py +++ b/manager/get_operator_load_balancer_state.py @@ -15,7 +15,7 @@ import boto3 import os -from helpers import get_operator_load_balancer +from helpers import get_operator_load_balancer_v2 def get_operator_load_balancer_state(): @@ -24,7 +24,7 @@ def get_operator_load_balancer_state(): client_elbv2 = boto3.client("elbv2", region_name=region) - load_balancer = get_operator_load_balancer(cluster_name, client_elbv2) + load_balancer = get_operator_load_balancer_v2(cluster_name, client_elbv2) return load_balancer["State"]["Code"] From 8b4d31598ee5fdcee6f5c55be4de1de3d80e8e0f Mon Sep 17 00:00:00 2001 From: Robert Lucian Chiriac Date: Thu, 6 Jan 2022 18:16:26 +0200 Subject: [PATCH 06/11] Fixes and cost info in info cmd and at cluster up --- cli/cmd/cluster.go | 18 +- cli/cmd/lib_cluster_config.go | 18 +- manager/get_api_load_balancer_state.py | 2 +- pkg/lib/aws/gen_resource_metadata.py | 42 +- pkg/lib/aws/resource_metadata.go | 693 +++++++++++++++++++++++++ 5 files changed, 767 insertions(+), 6 deletions(-) diff --git a/cli/cmd/cluster.go b/cli/cmd/cluster.go index 414b2dcacb..dab7e2be82 100644 --- a/cli/cmd/cluster.go +++ b/cli/cmd/cluster.go @@ -994,8 +994,17 @@ func printInfoPricing(infoResponse *schema.InfoResponse, clusterConfig clusterco prometheusEBSPrice := awslib.EBSMetadatas[clusterConfig.Region]["gp3"].PriceGB * 20 / 30 / 24 metricsEBSPrice := awslib.EBSMetadatas[clusterConfig.Region]["gp2"].PriceGB * (40 + 2) / 30 / 24 nlbPrice := awslib.NLBMetadatas[clusterConfig.Region].Price + elbPrice := awslib.ELBMetadatas[clusterConfig.Region].Price natUnitPrice := awslib.NATMetadatas[clusterConfig.Region].Price + var loadBalancersPrice float64 + usesELBForAPILoadBalancer := clusterConfig.APILoadBalancerType == clusterconfig.ELBLoadBalancerType + if usesELBForAPILoadBalancer { + loadBalancersPrice = nlbPrice + elbPrice + } else { + loadBalancersPrice = 2 * nlbPrice + } + headers := []table.Header{ {Title: "aws resource"}, {Title: "cost per hour"}, @@ -1044,12 +1053,17 @@ func printInfoPricing(infoResponse *schema.InfoResponse, clusterConfig clusterco } else if clusterConfig.NATGateway == clusterconfig.HighlyAvailableNATGateway { natTotalPrice = natUnitPrice * float64(len(clusterConfig.AvailabilityZones)) } - totalPrice := eksPrice + totalNodeGroupsPrice + operatorNodeGroupPrice + prometheusNodeGroupPrice + nlbPrice*2 + natTotalPrice + totalPrice := eksPrice + totalNodeGroupsPrice + operatorNodeGroupPrice + prometheusNodeGroupPrice + loadBalancersPrice + natTotalPrice fmt.Printf(console.Bold("\nyour cluster currently costs %s per hour\n\n"), s.DollarsAndCents(totalPrice)) rows = append(rows, []interface{}{fmt.Sprintf("%d t3.medium %s (cortex system)", len(infoResponse.OperatorNodeInfos), s.PluralS("instance", len(infoResponse.OperatorNodeInfos))), s.DollarsAndTenthsOfCents(operatorNodeGroupPrice) + " total"}) rows = append(rows, []interface{}{fmt.Sprintf("1 %s instance (prometheus)", clusterConfig.PrometheusInstanceType), s.DollarsAndTenthsOfCents(prometheusNodeGroupPrice)}) - rows = append(rows, []interface{}{"2 network load balancers", s.DollarsMaxPrecision(nlbPrice*2) + " total"}) + if usesELBForAPILoadBalancer { + rows = append(rows, []interface{}{"1 network load balancer", s.DollarsMaxPrecision(nlbPrice) + " total"}) + rows = append(rows, []interface{}{"1 classic load balancer", s.DollarsMaxPrecision(elbPrice) + " total"}) + } else { + rows = append(rows, []interface{}{"2 network load balancers", s.DollarsMaxPrecision(loadBalancersPrice) + " total"}) + } if clusterConfig.NATGateway == clusterconfig.SingleNATGateway { rows = append(rows, []interface{}{"1 nat gateway", s.DollarsMaxPrecision(natUnitPrice)}) diff --git a/cli/cmd/lib_cluster_config.go b/cli/cmd/lib_cluster_config.go index ac45306865..6dc4c2a732 100644 --- a/cli/cmd/lib_cluster_config.go +++ b/cli/cmd/lib_cluster_config.go @@ -169,8 +169,17 @@ func confirmInstallClusterConfig(clusterConfig *clusterconfig.Config, awsClient prometheusEBSPrice := aws.EBSMetadatas[clusterConfig.Region]["gp3"].PriceGB * 20 / 30 / 24 metricsEBSPrice := aws.EBSMetadatas[clusterConfig.Region]["gp2"].PriceGB * (40 + 2) / 30 / 24 nlbPrice := aws.NLBMetadatas[clusterConfig.Region].Price + elbPrice := aws.ELBMetadatas[clusterConfig.Region].Price natUnitPrice := aws.NATMetadatas[clusterConfig.Region].Price + var loadBalancersPrice float64 + usesELBForAPILoadBalancer := clusterConfig.APILoadBalancerType == clusterconfig.ELBLoadBalancerType + if usesELBForAPILoadBalancer { + loadBalancersPrice = nlbPrice + elbPrice + } else { + loadBalancersPrice = 2 * nlbPrice + } + var natTotalPrice float64 if clusterConfig.NATGateway == clusterconfig.SingleNATGateway { natTotalPrice = natUnitPrice @@ -187,7 +196,7 @@ func confirmInstallClusterConfig(clusterConfig *clusterconfig.Config, awsClient rows = append(rows, []interface{}{"1 eks cluster", s.DollarsMaxPrecision(eksPrice)}) ngNameToSpotInstancesUsed := map[string]int{} - fixedPrice := eksPrice + 2*(operatorInstancePrice+operatorEBSPrice) + prometheusInstancePrice + prometheusEBSPrice + metricsEBSPrice + 2*nlbPrice + natTotalPrice + fixedPrice := eksPrice + 2*(operatorInstancePrice+operatorEBSPrice) + prometheusInstancePrice + prometheusEBSPrice + metricsEBSPrice + loadBalancersPrice + natTotalPrice totalMinPrice := fixedPrice totalMaxPrice := fixedPrice for _, ng := range clusterConfig.NodeGroups { @@ -236,7 +245,12 @@ func confirmInstallClusterConfig(clusterConfig *clusterconfig.Config, awsClient prometheusNodeGroupPrice := prometheusInstancePrice + prometheusEBSPrice + metricsEBSPrice rows = append(rows, []interface{}{"2 t3.medium instances (cortex system)", s.DollarsAndTenthsOfCents(operatorNodeGroupPrice) + " total"}) rows = append(rows, []interface{}{fmt.Sprintf("1 %s instance (prometheus)", clusterConfig.PrometheusInstanceType), s.DollarsAndTenthsOfCents(prometheusNodeGroupPrice)}) - rows = append(rows, []interface{}{"2 network load balancers", s.DollarsMaxPrecision(nlbPrice) + " each"}) + if usesELBForAPILoadBalancer { + rows = append(rows, []interface{}{"1 network load balancer", s.DollarsMaxPrecision(nlbPrice) + " total"}) + rows = append(rows, []interface{}{"1 classic load balancer", s.DollarsMaxPrecision(elbPrice) + " total"}) + } else { + rows = append(rows, []interface{}{"2 network load balancers", s.DollarsMaxPrecision(loadBalancersPrice) + " total"}) + } if clusterConfig.NATGateway == clusterconfig.SingleNATGateway { rows = append(rows, []interface{}{"1 nat gateway", s.DollarsMaxPrecision(natUnitPrice)}) diff --git a/manager/get_api_load_balancer_state.py b/manager/get_api_load_balancer_state.py index 788f0d2a24..569479f4e6 100644 --- a/manager/get_api_load_balancer_state.py +++ b/manager/get_api_load_balancer_state.py @@ -21,7 +21,7 @@ def get_api_load_balancer_state(): cluster_name = os.environ["CORTEX_CLUSTER_NAME"] region = os.environ["CORTEX_REGION"] - load_balancer_type = os.environ["API_LOAD_BALANCER_TYPE"] + load_balancer_type = os.environ["CORTEX_API_LOAD_BALANCER_TYPE"] if load_balancer_type == "nlb": client_elbv2 = boto3.client("elbv2", region_name=region) diff --git a/pkg/lib/aws/gen_resource_metadata.py b/pkg/lib/aws/gen_resource_metadata.py index c7935a6ddb..7600ca28e8 100644 --- a/pkg/lib/aws/gen_resource_metadata.py +++ b/pkg/lib/aws/gen_resource_metadata.py @@ -126,6 +126,25 @@ def get_nlb_metadata(pricing): price = list(price_dimensions.values())[0]["pricePerUnit"]["USD"] return {"price": float(price)} +def get_elb_metadata(pricing): + for _, product in pricing["products"].items(): + if product.get("attributes") is None: + continue + if product.get("productFamily") != "Load Balancer": + continue + if product["attributes"].get("group") != "ELB:Balancer": + continue + if product["attributes"].get("operation") != "LoadBalancing": + continue + if "LoadBalancerUsage" not in product["attributes"].get("usagetype"): + continue + + price_dimensions = list(pricing["terms"]["OnDemand"][product["sku"]].values())[0][ + "priceDimensions" + ] + price = list(price_dimensions.values())[0]["pricePerUnit"]["USD"] + return {"price": float(price)} + def get_nat_metadata(pricing): for _, product in pricing["products"].items(): @@ -300,6 +319,11 @@ def get_eks_price(region): Price float64 `json:"price"` } +type ELBMetadata struct { + Region string `json:"region"` + Price float64 `json:"price"` +} + type NATMetadata struct { Region string `json:"region"` Price float64 `json:"price"` @@ -335,6 +359,11 @@ def get_eks_price(region): ${nlb_region_map} } +// region -> ELB metadata +var ELBMetadatas = map[string]ELBMetadata{ + ${elb_region_map} +} + // region -> NAT metadata var NATMetadatas = map[string]NATMetadata{ ${nat_region_map} @@ -377,13 +406,18 @@ def get_eks_price(region): """ ) +elb_region_map_template = Template( + """"${region}": {Region: "${region}", Price: ${price}}, +""" +) + nat_region_map_template = Template( """"${region}": {Region: "${region}", Price: ${price}}, """ ) ebs_region_map_template = Template( - """"${region}": map[string]EBSMetadata{ + """"${region}": { ${ebs_metadata} }, """ @@ -435,6 +469,7 @@ def main(): instance_types_map_str = "" instance_region_map_str = "" nlb_region_map_str = "" + elb_region_map_str = "" nat_region_map_str = "" ebs_region_map_str = "" eks_region_map_str = "" @@ -447,6 +482,7 @@ def main(): instance_types, instance_metadatas = get_instance_metadatas(pricing) nlb_metadata = get_nlb_metadata(pricing) + elb_metadata = get_elb_metadata(pricing) nat_metadata = get_nat_metadata(pricing) ebs_metadata = get_ebs_metadata(pricing) eks_price = get_eks_price(region) @@ -497,6 +533,9 @@ def main(): nlb_region_map_str += nlb_region_map_template.substitute( {"region": region, "price": nlb_metadata["price"]} ) + elb_region_map_str += elb_region_map_template.substitute( + {"region": region, "price": elb_metadata["price"]} + ) nat_region_map_str += nat_region_map_template.substitute( {"region": region, "price": nat_metadata["price"]} ) @@ -517,6 +556,7 @@ def main(): "instance_types_map": instance_types_map_str, "instance_region_map": instance_region_map_str, "nlb_region_map": nlb_region_map_str, + "elb_region_map": elb_region_map_str, "nat_region_map": nat_region_map_str, "ebs_region_map": ebs_region_map_str, "eks_region_map": eks_region_map_str, diff --git a/pkg/lib/aws/resource_metadata.go b/pkg/lib/aws/resource_metadata.go index 66dcb28c4f..e09aa20837 100644 --- a/pkg/lib/aws/resource_metadata.go +++ b/pkg/lib/aws/resource_metadata.go @@ -38,6 +38,11 @@ type NLBMetadata struct { Price float64 `json:"price"` } +type ELBMetadata struct { + Region string `json:"region"` + Price float64 `json:"price"` +} + type NATMetadata struct { Region string `json:"region"` Price float64 `json:"price"` @@ -197,6 +202,12 @@ var AllInstanceTypes = strset.New( "g5.16xlarge", "g5.24xlarge", "g5.48xlarge", + "g5g.xlarge", + "g5g.2xlarge", + "g5g.4xlarge", + "g5g.8xlarge", + "g5g.16xlarge", + "g5g.metal", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", @@ -222,10 +233,22 @@ var AllInstanceTypes = strset.New( "i3en.24xlarge", "i3en.metal", "i3p.16xlarge", + "im4gn.large", + "im4gn.xlarge", + "im4gn.2xlarge", + "im4gn.4xlarge", + "im4gn.8xlarge", + "im4gn.16xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", + "is4gen.medium", + "is4gen.large", + "is4gen.xlarge", + "is4gen.2xlarge", + "is4gen.4xlarge", + "is4gen.8xlarge", "m1.small", "m1.medium", "m1.large", @@ -302,6 +325,16 @@ var AllInstanceTypes = strset.New( "m5zn.6xlarge", "m5zn.12xlarge", "m5zn.metal", + "m6a.large", + "m6a.xlarge", + "m6a.2xlarge", + "m6a.4xlarge", + "m6a.8xlarge", + "m6a.12xlarge", + "m6a.16xlarge", + "m6a.24xlarge", + "m6a.32xlarge", + "m6a.48xlarge", "m6g.medium", "m6g.large", "m6g.xlarge", @@ -331,6 +364,7 @@ var AllInstanceTypes = strset.New( "m6i.32xlarge", "m6i.metal", "mac1.metal", + "mac2.metal", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", @@ -543,6 +577,13 @@ var InstanceTypes = map[string]strset.Set{ "c5d.18xlarge", "c5d.24xlarge", "c5d.metal", + "c5n.large", + "c5n.xlarge", + "c5n.2xlarge", + "c5n.4xlarge", + "c5n.9xlarge", + "c5n.18xlarge", + "c5n.metal", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", @@ -850,6 +891,16 @@ var InstanceTypes = map[string]strset.Set{ "c6gn.8xlarge", "c6gn.12xlarge", "c6gn.16xlarge", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6i.metal", "cc2.8xlarge", "cr1.8xlarge", "d2.xlarge", @@ -878,6 +929,12 @@ var InstanceTypes = map[string]strset.Set{ "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", + "g5g.xlarge", + "g5g.2xlarge", + "g5g.4xlarge", + "g5g.8xlarge", + "g5g.16xlarge", + "g5g.metal", "hs1.8xlarge", "i2.xlarge", "i2.2xlarge", @@ -1105,6 +1162,16 @@ var InstanceTypes = map[string]strset.Set{ "r6gd.12xlarge", "r6gd.16xlarge", "r6gd.metal", + "r6i.large", + "r6i.xlarge", + "r6i.2xlarge", + "r6i.4xlarge", + "r6i.8xlarge", + "r6i.12xlarge", + "r6i.16xlarge", + "r6i.24xlarge", + "r6i.32xlarge", + "r6i.metal", "t1.micro", "t2.nano", "t2.micro", @@ -1209,6 +1276,16 @@ var InstanceTypes = map[string]strset.Set{ "c6g.12xlarge", "c6g.16xlarge", "c6g.metal", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6i.metal", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", @@ -1226,6 +1303,12 @@ var InstanceTypes = map[string]strset.Set{ "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", + "g5g.xlarge", + "g5g.2xlarge", + "g5g.4xlarge", + "g5g.8xlarge", + "g5g.16xlarge", + "g5g.metal", "i2.xlarge", "i2.2xlarge", "i2.4xlarge", @@ -1390,6 +1473,16 @@ var InstanceTypes = map[string]strset.Set{ "r6g.12xlarge", "r6g.16xlarge", "r6g.metal", + "r6i.large", + "r6i.xlarge", + "r6i.2xlarge", + "r6i.4xlarge", + "r6i.8xlarge", + "r6i.12xlarge", + "r6i.16xlarge", + "r6i.24xlarge", + "r6i.32xlarge", + "r6i.metal", "t2.nano", "t2.micro", "t2.small", @@ -1633,6 +1726,16 @@ var InstanceTypes = map[string]strset.Set{ "c6gd.12xlarge", "c6gd.16xlarge", "c6gd.metal", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6i.metal", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", @@ -1806,6 +1909,16 @@ var InstanceTypes = map[string]strset.Set{ "r6g.12xlarge", "r6g.16xlarge", "r6g.metal", + "r6i.large", + "r6i.xlarge", + "r6i.2xlarge", + "r6i.4xlarge", + "r6i.8xlarge", + "r6i.12xlarge", + "r6i.16xlarge", + "r6i.24xlarge", + "r6i.32xlarge", + "r6i.metal", "t2.nano", "t2.micro", "t2.small", @@ -1933,6 +2046,16 @@ var InstanceTypes = map[string]strset.Set{ "c6gd.12xlarge", "c6gd.16xlarge", "c6gd.metal", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6i.metal", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", @@ -1953,6 +2076,12 @@ var InstanceTypes = map[string]strset.Set{ "g4dn.12xlarge", "g4dn.16xlarge", "g4dn.metal", + "g5g.xlarge", + "g5g.2xlarge", + "g5g.4xlarge", + "g5g.8xlarge", + "g5g.16xlarge", + "g5g.metal", "hs1.8xlarge", "i2.xlarge", "i2.2xlarge", @@ -2177,6 +2306,16 @@ var InstanceTypes = map[string]strset.Set{ "r6gd.12xlarge", "r6gd.16xlarge", "r6gd.metal", + "r6i.large", + "r6i.xlarge", + "r6i.2xlarge", + "r6i.4xlarge", + "r6i.8xlarge", + "r6i.12xlarge", + "r6i.16xlarge", + "r6i.24xlarge", + "r6i.32xlarge", + "r6i.metal", "t1.micro", "t2.nano", "t2.micro", @@ -2307,6 +2446,16 @@ var InstanceTypes = map[string]strset.Set{ "c6gd.12xlarge", "c6gd.16xlarge", "c6gd.metal", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6i.metal", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", @@ -2519,6 +2668,16 @@ var InstanceTypes = map[string]strset.Set{ "r6gd.12xlarge", "r6gd.16xlarge", "r6gd.metal", + "r6i.large", + "r6i.xlarge", + "r6i.2xlarge", + "r6i.4xlarge", + "r6i.8xlarge", + "r6i.12xlarge", + "r6i.16xlarge", + "r6i.24xlarge", + "r6i.32xlarge", + "r6i.metal", "t1.micro", "t2.nano", "t2.micro", @@ -2626,6 +2785,16 @@ var InstanceTypes = map[string]strset.Set{ "c6gd.12xlarge", "c6gd.16xlarge", "c6gd.metal", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6i.metal", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", @@ -2713,6 +2882,16 @@ var InstanceTypes = map[string]strset.Set{ "m6g.12xlarge", "m6g.16xlarge", "m6g.metal", + "m6i.large", + "m6i.xlarge", + "m6i.2xlarge", + "m6i.4xlarge", + "m6i.8xlarge", + "m6i.12xlarge", + "m6i.16xlarge", + "m6i.24xlarge", + "m6i.32xlarge", + "m6i.metal", "p3.2xlarge", "p3.8xlarge", "p3.16xlarge", @@ -3680,10 +3859,22 @@ var InstanceTypes = map[string]strset.Set{ "i3en.12xlarge", "i3en.24xlarge", "i3en.metal", + "im4gn.large", + "im4gn.xlarge", + "im4gn.2xlarge", + "im4gn.4xlarge", + "im4gn.8xlarge", + "im4gn.16xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", + "is4gen.medium", + "is4gen.large", + "is4gen.xlarge", + "is4gen.2xlarge", + "is4gen.4xlarge", + "is4gen.8xlarge", "m1.small", "m1.medium", "m1.large", @@ -3760,6 +3951,16 @@ var InstanceTypes = map[string]strset.Set{ "m5zn.6xlarge", "m5zn.12xlarge", "m5zn.metal", + "m6a.large", + "m6a.xlarge", + "m6a.2xlarge", + "m6a.4xlarge", + "m6a.8xlarge", + "m6a.12xlarge", + "m6a.16xlarge", + "m6a.24xlarge", + "m6a.32xlarge", + "m6a.48xlarge", "m6g.medium", "m6g.large", "m6g.xlarge", @@ -4020,6 +4221,16 @@ var InstanceTypes = map[string]strset.Set{ "c6gd.12xlarge", "c6gd.16xlarge", "c6gd.metal", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6i.metal", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", @@ -4123,6 +4334,16 @@ var InstanceTypes = map[string]strset.Set{ "m6gd.12xlarge", "m6gd.16xlarge", "m6gd.metal", + "m6i.large", + "m6i.xlarge", + "m6i.2xlarge", + "m6i.4xlarge", + "m6i.8xlarge", + "m6i.12xlarge", + "m6i.16xlarge", + "m6i.24xlarge", + "m6i.32xlarge", + "m6i.metal", "mac1.metal", "p3.2xlarge", "p3.8xlarge", @@ -4194,6 +4415,16 @@ var InstanceTypes = map[string]strset.Set{ "r6g.12xlarge", "r6g.16xlarge", "r6g.metal", + "r6i.large", + "r6i.xlarge", + "r6i.2xlarge", + "r6i.4xlarge", + "r6i.8xlarge", + "r6i.12xlarge", + "r6i.16xlarge", + "r6i.24xlarge", + "r6i.32xlarge", + "r6i.metal", "t2.nano", "t2.micro", "t2.small", @@ -4272,6 +4503,16 @@ var InstanceTypes = map[string]strset.Set{ "c6g.12xlarge", "c6g.16xlarge", "c6g.metal", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6i.metal", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", @@ -4413,6 +4654,16 @@ var InstanceTypes = map[string]strset.Set{ "r6g.12xlarge", "r6g.16xlarge", "r6g.metal", + "r6i.large", + "r6i.xlarge", + "r6i.2xlarge", + "r6i.4xlarge", + "r6i.8xlarge", + "r6i.12xlarge", + "r6i.16xlarge", + "r6i.24xlarge", + "r6i.32xlarge", + "r6i.metal", "t2.nano", "t2.micro", "t2.small", @@ -4633,6 +4884,16 @@ var InstanceTypes = map[string]strset.Set{ "c6g.12xlarge", "c6g.16xlarge", "c6g.metal", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6i.metal", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", @@ -4993,6 +5254,12 @@ var InstanceTypes = map[string]strset.Set{ "g5.16xlarge", "g5.24xlarge", "g5.48xlarge", + "g5g.xlarge", + "g5g.2xlarge", + "g5g.4xlarge", + "g5g.8xlarge", + "g5g.16xlarge", + "g5g.metal", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", @@ -5017,10 +5284,22 @@ var InstanceTypes = map[string]strset.Set{ "i3en.12xlarge", "i3en.24xlarge", "i3en.metal", + "im4gn.large", + "im4gn.xlarge", + "im4gn.2xlarge", + "im4gn.4xlarge", + "im4gn.8xlarge", + "im4gn.16xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", + "is4gen.medium", + "is4gen.large", + "is4gen.xlarge", + "is4gen.2xlarge", + "is4gen.4xlarge", + "is4gen.8xlarge", "m1.small", "m1.medium", "m1.large", @@ -5097,6 +5376,16 @@ var InstanceTypes = map[string]strset.Set{ "m5zn.6xlarge", "m5zn.12xlarge", "m5zn.metal", + "m6a.large", + "m6a.xlarge", + "m6a.2xlarge", + "m6a.4xlarge", + "m6a.8xlarge", + "m6a.12xlarge", + "m6a.16xlarge", + "m6a.24xlarge", + "m6a.32xlarge", + "m6a.48xlarge", "m6g.medium", "m6g.large", "m6g.xlarge", @@ -5126,6 +5415,7 @@ var InstanceTypes = map[string]strset.Set{ "m6i.32xlarge", "m6i.metal", "mac1.metal", + "mac2.metal", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", @@ -5437,10 +5727,22 @@ var InstanceTypes = map[string]strset.Set{ "i3en.12xlarge", "i3en.24xlarge", "i3en.metal", + "im4gn.large", + "im4gn.xlarge", + "im4gn.2xlarge", + "im4gn.4xlarge", + "im4gn.8xlarge", + "im4gn.16xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", + "is4gen.medium", + "is4gen.large", + "is4gen.xlarge", + "is4gen.2xlarge", + "is4gen.4xlarge", + "is4gen.8xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", @@ -6277,6 +6579,16 @@ var InstanceTypes = map[string]strset.Set{ "c6gd.12xlarge", "c6gd.16xlarge", "c6gd.metal", + "c6i.large", + "c6i.xlarge", + "c6i.2xlarge", + "c6i.4xlarge", + "c6i.8xlarge", + "c6i.12xlarge", + "c6i.16xlarge", + "c6i.24xlarge", + "c6i.32xlarge", + "c6i.metal", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", @@ -6474,6 +6786,16 @@ var InstanceTypes = map[string]strset.Set{ "r6gd.12xlarge", "r6gd.16xlarge", "r6gd.metal", + "r6i.large", + "r6i.xlarge", + "r6i.2xlarge", + "r6i.4xlarge", + "r6i.8xlarge", + "r6i.12xlarge", + "r6i.16xlarge", + "r6i.24xlarge", + "r6i.32xlarge", + "r6i.metal", "t1.micro", "t2.nano", "t2.micro", @@ -6654,6 +6976,12 @@ var InstanceTypes = map[string]strset.Set{ "g5.16xlarge", "g5.24xlarge", "g5.48xlarge", + "g5g.xlarge", + "g5g.2xlarge", + "g5g.4xlarge", + "g5g.8xlarge", + "g5g.16xlarge", + "g5g.metal", "h1.2xlarge", "h1.4xlarge", "h1.8xlarge", @@ -6678,10 +7006,22 @@ var InstanceTypes = map[string]strset.Set{ "i3en.12xlarge", "i3en.24xlarge", "i3en.metal", + "im4gn.large", + "im4gn.xlarge", + "im4gn.2xlarge", + "im4gn.4xlarge", + "im4gn.8xlarge", + "im4gn.16xlarge", "inf1.xlarge", "inf1.2xlarge", "inf1.6xlarge", "inf1.24xlarge", + "is4gen.medium", + "is4gen.large", + "is4gen.xlarge", + "is4gen.2xlarge", + "is4gen.4xlarge", + "is4gen.8xlarge", "m1.small", "m1.medium", "m1.large", @@ -6758,6 +7098,16 @@ var InstanceTypes = map[string]strset.Set{ "m5zn.6xlarge", "m5zn.12xlarge", "m5zn.metal", + "m6a.large", + "m6a.xlarge", + "m6a.2xlarge", + "m6a.4xlarge", + "m6a.8xlarge", + "m6a.12xlarge", + "m6a.16xlarge", + "m6a.24xlarge", + "m6a.32xlarge", + "m6a.48xlarge", "m6g.medium", "m6g.large", "m6g.xlarge", @@ -6787,6 +7137,7 @@ var InstanceTypes = map[string]strset.Set{ "m6i.32xlarge", "m6i.metal", "mac1.metal", + "mac2.metal", "p2.xlarge", "p2.8xlarge", "p2.16xlarge", @@ -6998,6 +7349,13 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "c5d.18xlarge": {Region: "af-south-1", Type: "c5d.18xlarge", Memory: kresource.MustParse("147456Mi"), CPU: kresource.MustParse("72"), GPU: 0, Inf: 0, Price: 4.68}, "c5d.24xlarge": {Region: "af-south-1", Type: "c5d.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 6.24}, "c5d.metal": {Region: "af-south-1", Type: "c5d.metal", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 6.24}, + "c5n.large": {Region: "af-south-1", Type: "c5n.large", Memory: kresource.MustParse("5376Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.145}, + "c5n.xlarge": {Region: "af-south-1", Type: "c5n.xlarge", Memory: kresource.MustParse("10752Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.29}, + "c5n.2xlarge": {Region: "af-south-1", Type: "c5n.2xlarge", Memory: kresource.MustParse("21504Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.581}, + "c5n.4xlarge": {Region: "af-south-1", Type: "c5n.4xlarge", Memory: kresource.MustParse("43008Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.162}, + "c5n.9xlarge": {Region: "af-south-1", Type: "c5n.9xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("36"), GPU: 0, Inf: 0, Price: 2.614}, + "c5n.18xlarge": {Region: "af-south-1", Type: "c5n.18xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("72"), GPU: 0, Inf: 0, Price: 5.227}, + "c5n.metal": {Region: "af-south-1", Type: "c5n.metal", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("72"), GPU: 0, Inf: 0, Price: 5.227}, "d2.xlarge": {Region: "af-south-1", Type: "d2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.875}, "d2.2xlarge": {Region: "af-south-1", Type: "d2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.75}, "d2.4xlarge": {Region: "af-south-1", Type: "d2.4xlarge", Memory: kresource.MustParse("124928Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 3.5}, @@ -7305,6 +7663,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "c6gn.8xlarge": {Region: "ap-northeast-1", Type: "c6gn.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.744}, "c6gn.12xlarge": {Region: "ap-northeast-1", Type: "c6gn.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.616}, "c6gn.16xlarge": {Region: "ap-northeast-1", Type: "c6gn.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.488}, + "c6i.large": {Region: "ap-northeast-1", Type: "c6i.large", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.107}, + "c6i.xlarge": {Region: "ap-northeast-1", Type: "c6i.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.214}, + "c6i.2xlarge": {Region: "ap-northeast-1", Type: "c6i.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.428}, + "c6i.4xlarge": {Region: "ap-northeast-1", Type: "c6i.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.856}, + "c6i.8xlarge": {Region: "ap-northeast-1", Type: "c6i.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.712}, + "c6i.12xlarge": {Region: "ap-northeast-1", Type: "c6i.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.568}, + "c6i.16xlarge": {Region: "ap-northeast-1", Type: "c6i.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.424}, + "c6i.24xlarge": {Region: "ap-northeast-1", Type: "c6i.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 5.136}, + "c6i.32xlarge": {Region: "ap-northeast-1", Type: "c6i.32xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.848}, + "c6i.metal": {Region: "ap-northeast-1", Type: "c6i.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.848}, "cc2.8xlarge": {Region: "ap-northeast-1", Type: "cc2.8xlarge", Memory: kresource.MustParse("61952Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.349}, "cr1.8xlarge": {Region: "ap-northeast-1", Type: "cr1.8xlarge", Memory: kresource.MustParse("249856Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 4.105}, "d2.xlarge": {Region: "ap-northeast-1", Type: "d2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.844}, @@ -7333,6 +7701,12 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "g4dn.12xlarge": {Region: "ap-northeast-1", Type: "g4dn.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 4, Inf: 0, Price: 5.281}, "g4dn.16xlarge": {Region: "ap-northeast-1", Type: "g4dn.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 1, Inf: 0, Price: 5.875}, "g4dn.metal": {Region: "ap-northeast-1", Type: "g4dn.metal", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("96"), GPU: 8, Inf: 0, Price: 10.562}, + "g5g.xlarge": {Region: "ap-northeast-1", Type: "g5g.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 1, Inf: 0, Price: 0.5669}, + "g5g.2xlarge": {Region: "ap-northeast-1", Type: "g5g.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 1, Inf: 0, Price: 0.7505}, + "g5g.4xlarge": {Region: "ap-northeast-1", Type: "g5g.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 1, Inf: 0, Price: 1.1176}, + "g5g.8xlarge": {Region: "ap-northeast-1", Type: "g5g.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 1, Inf: 0, Price: 1.8519}, + "g5g.16xlarge": {Region: "ap-northeast-1", Type: "g5g.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 2, Inf: 0, Price: 3.7039}, + "g5g.metal": {Region: "ap-northeast-1", Type: "g5g.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 2, Inf: 0, Price: 3.7039}, "hs1.8xlarge": {Region: "ap-northeast-1", Type: "hs1.8xlarge", Memory: kresource.MustParse("119808Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 5.4}, "i2.xlarge": {Region: "ap-northeast-1", Type: "i2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 1.001}, "i2.2xlarge": {Region: "ap-northeast-1", Type: "i2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 2.001}, @@ -7559,6 +7933,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "r6gd.12xlarge": {Region: "ap-northeast-1", Type: "r6gd.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.336}, "r6gd.16xlarge": {Region: "ap-northeast-1", Type: "r6gd.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.448}, "r6gd.metal": {Region: "ap-northeast-1", Type: "r6gd.metal", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.448}, + "r6i.large": {Region: "ap-northeast-1", Type: "r6i.large", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.152}, + "r6i.xlarge": {Region: "ap-northeast-1", Type: "r6i.xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.304}, + "r6i.2xlarge": {Region: "ap-northeast-1", Type: "r6i.2xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.608}, + "r6i.4xlarge": {Region: "ap-northeast-1", Type: "r6i.4xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.216}, + "r6i.8xlarge": {Region: "ap-northeast-1", Type: "r6i.8xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.432}, + "r6i.12xlarge": {Region: "ap-northeast-1", Type: "r6i.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.648}, + "r6i.16xlarge": {Region: "ap-northeast-1", Type: "r6i.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.864}, + "r6i.24xlarge": {Region: "ap-northeast-1", Type: "r6i.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 7.296}, + "r6i.32xlarge": {Region: "ap-northeast-1", Type: "r6i.32xlarge", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.728}, + "r6i.metal": {Region: "ap-northeast-1", Type: "r6i.metal", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.728}, "t1.micro": {Region: "ap-northeast-1", Type: "t1.micro", Memory: kresource.MustParse("627Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.026}, "t2.nano": {Region: "ap-northeast-1", Type: "t2.nano", Memory: kresource.MustParse("512Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0076}, "t2.micro": {Region: "ap-northeast-1", Type: "t2.micro", Memory: kresource.MustParse("1024Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0152}, @@ -7660,6 +8044,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "c6g.12xlarge": {Region: "ap-northeast-2", Type: "c6g.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 1.848}, "c6g.16xlarge": {Region: "ap-northeast-2", Type: "c6g.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.464}, "c6g.metal": {Region: "ap-northeast-2", Type: "c6g.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.464}, + "c6i.large": {Region: "ap-northeast-2", Type: "c6i.large", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.096}, + "c6i.xlarge": {Region: "ap-northeast-2", Type: "c6i.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.192}, + "c6i.2xlarge": {Region: "ap-northeast-2", Type: "c6i.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.384}, + "c6i.4xlarge": {Region: "ap-northeast-2", Type: "c6i.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.768}, + "c6i.8xlarge": {Region: "ap-northeast-2", Type: "c6i.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.536}, + "c6i.12xlarge": {Region: "ap-northeast-2", Type: "c6i.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.304}, + "c6i.16xlarge": {Region: "ap-northeast-2", Type: "c6i.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.072}, + "c6i.24xlarge": {Region: "ap-northeast-2", Type: "c6i.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 4.608}, + "c6i.32xlarge": {Region: "ap-northeast-2", Type: "c6i.32xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.144}, + "c6i.metal": {Region: "ap-northeast-2", Type: "c6i.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.144}, "d2.xlarge": {Region: "ap-northeast-2", Type: "d2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.844}, "d2.2xlarge": {Region: "ap-northeast-2", Type: "d2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.688}, "d2.4xlarge": {Region: "ap-northeast-2", Type: "d2.4xlarge", Memory: kresource.MustParse("124928Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 3.376}, @@ -7677,6 +8071,12 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "g4dn.12xlarge": {Region: "ap-northeast-2", Type: "g4dn.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 4, Inf: 0, Price: 4.812}, "g4dn.16xlarge": {Region: "ap-northeast-2", Type: "g4dn.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 1, Inf: 0, Price: 5.353}, "g4dn.metal": {Region: "ap-northeast-2", Type: "g4dn.metal", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("96"), GPU: 8, Inf: 0, Price: 9.624}, + "g5g.xlarge": {Region: "ap-northeast-2", Type: "g5g.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 1, Inf: 0, Price: 0.5166}, + "g5g.2xlarge": {Region: "ap-northeast-2", Type: "g5g.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 1, Inf: 0, Price: 0.6839}, + "g5g.4xlarge": {Region: "ap-northeast-2", Type: "g5g.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 1, Inf: 0, Price: 1.0185}, + "g5g.8xlarge": {Region: "ap-northeast-2", Type: "g5g.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 1, Inf: 0, Price: 1.6876}, + "g5g.16xlarge": {Region: "ap-northeast-2", Type: "g5g.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 2, Inf: 0, Price: 3.3752}, + "g5g.metal": {Region: "ap-northeast-2", Type: "g5g.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 2, Inf: 0, Price: 3.3752}, "i2.xlarge": {Region: "ap-northeast-2", Type: "i2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 1.001}, "i2.2xlarge": {Region: "ap-northeast-2", Type: "i2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 2.001}, "i2.4xlarge": {Region: "ap-northeast-2", Type: "i2.4xlarge", Memory: kresource.MustParse("124928Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 4.002}, @@ -7840,6 +8240,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "r6g.12xlarge": {Region: "ap-northeast-2", Type: "r6g.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.928}, "r6g.16xlarge": {Region: "ap-northeast-2", Type: "r6g.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.904}, "r6g.metal": {Region: "ap-northeast-2", Type: "r6g.metal", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.904}, + "r6i.large": {Region: "ap-northeast-2", Type: "r6i.large", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.152}, + "r6i.xlarge": {Region: "ap-northeast-2", Type: "r6i.xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.304}, + "r6i.2xlarge": {Region: "ap-northeast-2", Type: "r6i.2xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.608}, + "r6i.4xlarge": {Region: "ap-northeast-2", Type: "r6i.4xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.216}, + "r6i.8xlarge": {Region: "ap-northeast-2", Type: "r6i.8xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.432}, + "r6i.12xlarge": {Region: "ap-northeast-2", Type: "r6i.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.648}, + "r6i.16xlarge": {Region: "ap-northeast-2", Type: "r6i.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.864}, + "r6i.24xlarge": {Region: "ap-northeast-2", Type: "r6i.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 7.296}, + "r6i.32xlarge": {Region: "ap-northeast-2", Type: "r6i.32xlarge", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.728}, + "r6i.metal": {Region: "ap-northeast-2", Type: "r6i.metal", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.728}, "t2.nano": {Region: "ap-northeast-2", Type: "t2.nano", Memory: kresource.MustParse("512Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0072}, "t2.micro": {Region: "ap-northeast-2", Type: "t2.micro", Memory: kresource.MustParse("1024Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0144}, "t2.small": {Region: "ap-northeast-2", Type: "t2.small", Memory: kresource.MustParse("2048Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0288}, @@ -8077,6 +8487,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "c6gd.12xlarge": {Region: "ap-south-1", Type: "c6gd.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 1.176}, "c6gd.16xlarge": {Region: "ap-south-1", Type: "c6gd.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 1.568}, "c6gd.metal": {Region: "ap-south-1", Type: "c6gd.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 1.568}, + "c6i.large": {Region: "ap-south-1", Type: "c6i.large", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.085}, + "c6i.xlarge": {Region: "ap-south-1", Type: "c6i.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.17}, + "c6i.2xlarge": {Region: "ap-south-1", Type: "c6i.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.34}, + "c6i.4xlarge": {Region: "ap-south-1", Type: "c6i.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.68}, + "c6i.8xlarge": {Region: "ap-south-1", Type: "c6i.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.36}, + "c6i.12xlarge": {Region: "ap-south-1", Type: "c6i.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.04}, + "c6i.16xlarge": {Region: "ap-south-1", Type: "c6i.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.72}, + "c6i.24xlarge": {Region: "ap-south-1", Type: "c6i.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 4.08}, + "c6i.32xlarge": {Region: "ap-south-1", Type: "c6i.32xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 5.44}, + "c6i.metal": {Region: "ap-south-1", Type: "c6i.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 5.44}, "d2.xlarge": {Region: "ap-south-1", Type: "d2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.827}, "d2.2xlarge": {Region: "ap-south-1", Type: "d2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.653}, "d2.4xlarge": {Region: "ap-south-1", Type: "d2.4xlarge", Memory: kresource.MustParse("124928Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 3.306}, @@ -8249,6 +8669,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "r6g.12xlarge": {Region: "ap-south-1", Type: "r6g.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 1.56}, "r6g.16xlarge": {Region: "ap-south-1", Type: "r6g.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.08}, "r6g.metal": {Region: "ap-south-1", Type: "r6g.metal", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.08}, + "r6i.large": {Region: "ap-south-1", Type: "r6i.large", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.13}, + "r6i.xlarge": {Region: "ap-south-1", Type: "r6i.xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.26}, + "r6i.2xlarge": {Region: "ap-south-1", Type: "r6i.2xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.52}, + "r6i.4xlarge": {Region: "ap-south-1", Type: "r6i.4xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.04}, + "r6i.8xlarge": {Region: "ap-south-1", Type: "r6i.8xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.08}, + "r6i.12xlarge": {Region: "ap-south-1", Type: "r6i.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.12}, + "r6i.16xlarge": {Region: "ap-south-1", Type: "r6i.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.16}, + "r6i.24xlarge": {Region: "ap-south-1", Type: "r6i.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 6.24}, + "r6i.32xlarge": {Region: "ap-south-1", Type: "r6i.32xlarge", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 8.32}, + "r6i.metal": {Region: "ap-south-1", Type: "r6i.metal", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 8.32}, "t2.nano": {Region: "ap-south-1", Type: "t2.nano", Memory: kresource.MustParse("512Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0062}, "t2.micro": {Region: "ap-south-1", Type: "t2.micro", Memory: kresource.MustParse("1024Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0124}, "t2.small": {Region: "ap-south-1", Type: "t2.small", Memory: kresource.MustParse("2048Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0248}, @@ -8373,6 +8803,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "c6gd.12xlarge": {Region: "ap-southeast-1", Type: "c6gd.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.16}, "c6gd.16xlarge": {Region: "ap-southeast-1", Type: "c6gd.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.88}, "c6gd.metal": {Region: "ap-southeast-1", Type: "c6gd.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.88}, + "c6i.large": {Region: "ap-southeast-1", Type: "c6i.large", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.098}, + "c6i.xlarge": {Region: "ap-southeast-1", Type: "c6i.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.196}, + "c6i.2xlarge": {Region: "ap-southeast-1", Type: "c6i.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.392}, + "c6i.4xlarge": {Region: "ap-southeast-1", Type: "c6i.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.784}, + "c6i.8xlarge": {Region: "ap-southeast-1", Type: "c6i.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.568}, + "c6i.12xlarge": {Region: "ap-southeast-1", Type: "c6i.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.352}, + "c6i.16xlarge": {Region: "ap-southeast-1", Type: "c6i.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.136}, + "c6i.24xlarge": {Region: "ap-southeast-1", Type: "c6i.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 4.704}, + "c6i.32xlarge": {Region: "ap-southeast-1", Type: "c6i.32xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.272}, + "c6i.metal": {Region: "ap-southeast-1", Type: "c6i.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.272}, "d2.xlarge": {Region: "ap-southeast-1", Type: "d2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.87}, "d2.2xlarge": {Region: "ap-southeast-1", Type: "d2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.74}, "d2.4xlarge": {Region: "ap-southeast-1", Type: "d2.4xlarge", Memory: kresource.MustParse("124928Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 3.48}, @@ -8393,6 +8833,12 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "g4dn.12xlarge": {Region: "ap-southeast-1", Type: "g4dn.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 4, Inf: 0, Price: 5.474}, "g4dn.16xlarge": {Region: "ap-southeast-1", Type: "g4dn.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 1, Inf: 0, Price: 6.089}, "g4dn.metal": {Region: "ap-southeast-1", Type: "g4dn.metal", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("96"), GPU: 8, Inf: 0, Price: 10.948}, + "g5g.xlarge": {Region: "ap-southeast-1", Type: "g5g.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 1, Inf: 0, Price: 0.5877}, + "g5g.2xlarge": {Region: "ap-southeast-1", Type: "g5g.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 1, Inf: 0, Price: 0.778}, + "g5g.4xlarge": {Region: "ap-southeast-1", Type: "g5g.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 1, Inf: 0, Price: 1.1586}, + "g5g.8xlarge": {Region: "ap-southeast-1", Type: "g5g.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 1, Inf: 0, Price: 1.9198}, + "g5g.16xlarge": {Region: "ap-southeast-1", Type: "g5g.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 2, Inf: 0, Price: 3.8395}, + "g5g.metal": {Region: "ap-southeast-1", Type: "g5g.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 2, Inf: 0, Price: 3.8395}, "hs1.8xlarge": {Region: "ap-southeast-1", Type: "hs1.8xlarge", Memory: kresource.MustParse("119808Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 5.57}, "i2.xlarge": {Region: "ap-southeast-1", Type: "i2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 1.018}, "i2.2xlarge": {Region: "ap-southeast-1", Type: "i2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 2.035}, @@ -8616,6 +9062,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "r6gd.12xlarge": {Region: "ap-southeast-1", Type: "r6gd.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.336}, "r6gd.16xlarge": {Region: "ap-southeast-1", Type: "r6gd.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.448}, "r6gd.metal": {Region: "ap-southeast-1", Type: "r6gd.metal", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.448}, + "r6i.large": {Region: "ap-southeast-1", Type: "r6i.large", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.152}, + "r6i.xlarge": {Region: "ap-southeast-1", Type: "r6i.xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.304}, + "r6i.2xlarge": {Region: "ap-southeast-1", Type: "r6i.2xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.608}, + "r6i.4xlarge": {Region: "ap-southeast-1", Type: "r6i.4xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.216}, + "r6i.8xlarge": {Region: "ap-southeast-1", Type: "r6i.8xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.432}, + "r6i.12xlarge": {Region: "ap-southeast-1", Type: "r6i.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.648}, + "r6i.16xlarge": {Region: "ap-southeast-1", Type: "r6i.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.864}, + "r6i.24xlarge": {Region: "ap-southeast-1", Type: "r6i.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 7.296}, + "r6i.32xlarge": {Region: "ap-southeast-1", Type: "r6i.32xlarge", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.728}, + "r6i.metal": {Region: "ap-southeast-1", Type: "r6i.metal", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.728}, "t1.micro": {Region: "ap-southeast-1", Type: "t1.micro", Memory: kresource.MustParse("627Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.02}, "t2.nano": {Region: "ap-southeast-1", Type: "t2.nano", Memory: kresource.MustParse("512Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0073}, "t2.micro": {Region: "ap-southeast-1", Type: "t2.micro", Memory: kresource.MustParse("1024Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0146}, @@ -8743,6 +9199,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "c6gd.12xlarge": {Region: "ap-southeast-2", Type: "c6gd.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.424}, "c6gd.16xlarge": {Region: "ap-southeast-2", Type: "c6gd.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.232}, "c6gd.metal": {Region: "ap-southeast-2", Type: "c6gd.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.232}, + "c6i.large": {Region: "ap-southeast-2", Type: "c6i.large", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.111}, + "c6i.xlarge": {Region: "ap-southeast-2", Type: "c6i.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.222}, + "c6i.2xlarge": {Region: "ap-southeast-2", Type: "c6i.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.444}, + "c6i.4xlarge": {Region: "ap-southeast-2", Type: "c6i.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.888}, + "c6i.8xlarge": {Region: "ap-southeast-2", Type: "c6i.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.776}, + "c6i.12xlarge": {Region: "ap-southeast-2", Type: "c6i.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.664}, + "c6i.16xlarge": {Region: "ap-southeast-2", Type: "c6i.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.552}, + "c6i.24xlarge": {Region: "ap-southeast-2", Type: "c6i.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 5.328}, + "c6i.32xlarge": {Region: "ap-southeast-2", Type: "c6i.32xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 7.104}, + "c6i.metal": {Region: "ap-southeast-2", Type: "c6i.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 7.104}, "d2.xlarge": {Region: "ap-southeast-2", Type: "d2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.87}, "d2.2xlarge": {Region: "ap-southeast-2", Type: "d2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.74}, "d2.4xlarge": {Region: "ap-southeast-2", Type: "d2.4xlarge", Memory: kresource.MustParse("124928Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 3.48}, @@ -8954,6 +9420,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "r6gd.12xlarge": {Region: "ap-southeast-2", Type: "r6gd.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.336}, "r6gd.16xlarge": {Region: "ap-southeast-2", Type: "r6gd.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.448}, "r6gd.metal": {Region: "ap-southeast-2", Type: "r6gd.metal", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.448}, + "r6i.large": {Region: "ap-southeast-2", Type: "r6i.large", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.151}, + "r6i.xlarge": {Region: "ap-southeast-2", Type: "r6i.xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.302}, + "r6i.2xlarge": {Region: "ap-southeast-2", Type: "r6i.2xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.604}, + "r6i.4xlarge": {Region: "ap-southeast-2", Type: "r6i.4xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.208}, + "r6i.8xlarge": {Region: "ap-southeast-2", Type: "r6i.8xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.416}, + "r6i.12xlarge": {Region: "ap-southeast-2", Type: "r6i.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.624}, + "r6i.16xlarge": {Region: "ap-southeast-2", Type: "r6i.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.832}, + "r6i.24xlarge": {Region: "ap-southeast-2", Type: "r6i.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 7.248}, + "r6i.32xlarge": {Region: "ap-southeast-2", Type: "r6i.32xlarge", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.664}, + "r6i.metal": {Region: "ap-southeast-2", Type: "r6i.metal", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.664}, "t1.micro": {Region: "ap-southeast-2", Type: "t1.micro", Memory: kresource.MustParse("627Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.02}, "t2.nano": {Region: "ap-southeast-2", Type: "t2.nano", Memory: kresource.MustParse("512Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0073}, "t2.micro": {Region: "ap-southeast-2", Type: "t2.micro", Memory: kresource.MustParse("1024Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0146}, @@ -9058,6 +9534,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "c6gd.12xlarge": {Region: "ca-central-1", Type: "c6gd.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.0352}, "c6gd.16xlarge": {Region: "ca-central-1", Type: "c6gd.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.7136}, "c6gd.metal": {Region: "ca-central-1", Type: "c6gd.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.7136}, + "c6i.large": {Region: "ca-central-1", Type: "c6i.large", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.093}, + "c6i.xlarge": {Region: "ca-central-1", Type: "c6i.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.186}, + "c6i.2xlarge": {Region: "ca-central-1", Type: "c6i.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.372}, + "c6i.4xlarge": {Region: "ca-central-1", Type: "c6i.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.744}, + "c6i.8xlarge": {Region: "ca-central-1", Type: "c6i.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.488}, + "c6i.12xlarge": {Region: "ca-central-1", Type: "c6i.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.232}, + "c6i.16xlarge": {Region: "ca-central-1", Type: "c6i.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.976}, + "c6i.24xlarge": {Region: "ca-central-1", Type: "c6i.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 4.464}, + "c6i.32xlarge": {Region: "ca-central-1", Type: "c6i.32xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 5.952}, + "c6i.metal": {Region: "ca-central-1", Type: "c6i.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 5.952}, "d2.xlarge": {Region: "ca-central-1", Type: "d2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.759}, "d2.2xlarge": {Region: "ca-central-1", Type: "d2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.518}, "d2.4xlarge": {Region: "ca-central-1", Type: "d2.4xlarge", Memory: kresource.MustParse("124928Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 3.036}, @@ -9145,6 +9631,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "m6g.12xlarge": {Region: "ca-central-1", Type: "m6g.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.0544}, "m6g.16xlarge": {Region: "ca-central-1", Type: "m6g.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.7392}, "m6g.metal": {Region: "ca-central-1", Type: "m6g.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.7392}, + "m6i.large": {Region: "ca-central-1", Type: "m6i.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.107}, + "m6i.xlarge": {Region: "ca-central-1", Type: "m6i.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.214}, + "m6i.2xlarge": {Region: "ca-central-1", Type: "m6i.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.428}, + "m6i.4xlarge": {Region: "ca-central-1", Type: "m6i.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.856}, + "m6i.8xlarge": {Region: "ca-central-1", Type: "m6i.8xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.712}, + "m6i.12xlarge": {Region: "ca-central-1", Type: "m6i.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.568}, + "m6i.16xlarge": {Region: "ca-central-1", Type: "m6i.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.424}, + "m6i.24xlarge": {Region: "ca-central-1", Type: "m6i.24xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 5.136}, + "m6i.32xlarge": {Region: "ca-central-1", Type: "m6i.32xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.848}, + "m6i.metal": {Region: "ca-central-1", Type: "m6i.metal", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.848}, "p3.2xlarge": {Region: "ca-central-1", Type: "p3.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 1, Inf: 0, Price: 3.366}, "p3.8xlarge": {Region: "ca-central-1", Type: "p3.8xlarge", Memory: kresource.MustParse("249856Mi"), CPU: kresource.MustParse("32"), GPU: 4, Inf: 0, Price: 13.464}, "p3.16xlarge": {Region: "ca-central-1", Type: "p3.16xlarge", Memory: kresource.MustParse("499712Mi"), CPU: kresource.MustParse("64"), GPU: 8, Inf: 0, Price: 26.928}, @@ -10106,10 +10602,22 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "i3en.12xlarge": {Region: "eu-west-1", Type: "i3en.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 6.0}, "i3en.24xlarge": {Region: "eu-west-1", Type: "i3en.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 12.0}, "i3en.metal": {Region: "eu-west-1", Type: "i3en.metal", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 12.0}, + "im4gn.large": {Region: "eu-west-1", Type: "im4gn.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.20055}, + "im4gn.xlarge": {Region: "eu-west-1", Type: "im4gn.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.4011}, + "im4gn.2xlarge": {Region: "eu-west-1", Type: "im4gn.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.80221}, + "im4gn.4xlarge": {Region: "eu-west-1", Type: "im4gn.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.60442}, + "im4gn.8xlarge": {Region: "eu-west-1", Type: "im4gn.8xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 3.20883}, + "im4gn.16xlarge": {Region: "eu-west-1", Type: "im4gn.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 6.41766}, "inf1.xlarge": {Region: "eu-west-1", Type: "inf1.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 1, Price: 0.254}, "inf1.2xlarge": {Region: "eu-west-1", Type: "inf1.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 1, Price: 0.403}, "inf1.6xlarge": {Region: "eu-west-1", Type: "inf1.6xlarge", Memory: kresource.MustParse("49152Mi"), CPU: kresource.MustParse("24"), GPU: 0, Inf: 4, Price: 1.315}, "inf1.24xlarge": {Region: "eu-west-1", Type: "inf1.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 16, Price: 5.26}, + "is4gen.medium": {Region: "eu-west-1", Type: "is4gen.medium", Memory: kresource.MustParse("6144Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.15938}, + "is4gen.large": {Region: "eu-west-1", Type: "is4gen.large", Memory: kresource.MustParse("12288Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.31875}, + "is4gen.xlarge": {Region: "eu-west-1", Type: "is4gen.xlarge", Memory: kresource.MustParse("24576Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.6375}, + "is4gen.2xlarge": {Region: "eu-west-1", Type: "is4gen.2xlarge", Memory: kresource.MustParse("49152Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.275}, + "is4gen.4xlarge": {Region: "eu-west-1", Type: "is4gen.4xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 2.55}, + "is4gen.8xlarge": {Region: "eu-west-1", Type: "is4gen.8xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 5.1}, "m1.small": {Region: "eu-west-1", Type: "m1.small", Memory: kresource.MustParse("1740Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.047}, "m1.medium": {Region: "eu-west-1", Type: "m1.medium", Memory: kresource.MustParse("3840Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.095}, "m1.large": {Region: "eu-west-1", Type: "m1.large", Memory: kresource.MustParse("7680Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.19}, @@ -10186,6 +10694,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "m5zn.6xlarge": {Region: "eu-west-1", Type: "m5zn.6xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("24"), GPU: 0, Inf: 0, Price: 2.2092}, "m5zn.12xlarge": {Region: "eu-west-1", Type: "m5zn.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 4.4184}, "m5zn.metal": {Region: "eu-west-1", Type: "m5zn.metal", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 4.4184}, + "m6a.large": {Region: "eu-west-1", Type: "m6a.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.0963}, + "m6a.xlarge": {Region: "eu-west-1", Type: "m6a.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.1926}, + "m6a.2xlarge": {Region: "eu-west-1", Type: "m6a.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.3852}, + "m6a.4xlarge": {Region: "eu-west-1", Type: "m6a.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.7704}, + "m6a.8xlarge": {Region: "eu-west-1", Type: "m6a.8xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.5408}, + "m6a.12xlarge": {Region: "eu-west-1", Type: "m6a.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.3112}, + "m6a.16xlarge": {Region: "eu-west-1", Type: "m6a.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.0816}, + "m6a.24xlarge": {Region: "eu-west-1", Type: "m6a.24xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 4.6224}, + "m6a.32xlarge": {Region: "eu-west-1", Type: "m6a.32xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.1632}, + "m6a.48xlarge": {Region: "eu-west-1", Type: "m6a.48xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("192"), GPU: 0, Inf: 0, Price: 9.2448}, "m6g.medium": {Region: "eu-west-1", Type: "m6g.medium", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.043}, "m6g.large": {Region: "eu-west-1", Type: "m6g.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.086}, "m6g.xlarge": {Region: "eu-west-1", Type: "m6g.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.172}, @@ -10440,6 +10958,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "c6gd.12xlarge": {Region: "eu-west-2", Type: "c6gd.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.208}, "c6gd.16xlarge": {Region: "eu-west-2", Type: "c6gd.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.944}, "c6gd.metal": {Region: "eu-west-2", Type: "c6gd.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.944}, + "c6i.large": {Region: "eu-west-2", Type: "c6i.large", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.101}, + "c6i.xlarge": {Region: "eu-west-2", Type: "c6i.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.202}, + "c6i.2xlarge": {Region: "eu-west-2", Type: "c6i.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.404}, + "c6i.4xlarge": {Region: "eu-west-2", Type: "c6i.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.808}, + "c6i.8xlarge": {Region: "eu-west-2", Type: "c6i.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.616}, + "c6i.12xlarge": {Region: "eu-west-2", Type: "c6i.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.424}, + "c6i.16xlarge": {Region: "eu-west-2", Type: "c6i.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.232}, + "c6i.24xlarge": {Region: "eu-west-2", Type: "c6i.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 4.848}, + "c6i.32xlarge": {Region: "eu-west-2", Type: "c6i.32xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.464}, + "c6i.metal": {Region: "eu-west-2", Type: "c6i.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.464}, "d2.xlarge": {Region: "eu-west-2", Type: "d2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.772}, "d2.2xlarge": {Region: "eu-west-2", Type: "d2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.544}, "d2.4xlarge": {Region: "eu-west-2", Type: "d2.4xlarge", Memory: kresource.MustParse("124928Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 3.087}, @@ -10543,6 +11071,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "m6gd.12xlarge": {Region: "eu-west-2", Type: "m6gd.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.5152}, "m6gd.16xlarge": {Region: "eu-west-2", Type: "m6gd.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.3536}, "m6gd.metal": {Region: "eu-west-2", Type: "m6gd.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.3536}, + "m6i.large": {Region: "eu-west-2", Type: "m6i.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.111}, + "m6i.xlarge": {Region: "eu-west-2", Type: "m6i.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.222}, + "m6i.2xlarge": {Region: "eu-west-2", Type: "m6i.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.444}, + "m6i.4xlarge": {Region: "eu-west-2", Type: "m6i.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.888}, + "m6i.8xlarge": {Region: "eu-west-2", Type: "m6i.8xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.776}, + "m6i.12xlarge": {Region: "eu-west-2", Type: "m6i.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.664}, + "m6i.16xlarge": {Region: "eu-west-2", Type: "m6i.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.552}, + "m6i.24xlarge": {Region: "eu-west-2", Type: "m6i.24xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 5.328}, + "m6i.32xlarge": {Region: "eu-west-2", Type: "m6i.32xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 7.104}, + "m6i.metal": {Region: "eu-west-2", Type: "m6i.metal", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 7.104}, "p3.2xlarge": {Region: "eu-west-2", Type: "p3.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 1, Inf: 0, Price: 3.589}, "p3.8xlarge": {Region: "eu-west-2", Type: "p3.8xlarge", Memory: kresource.MustParse("249856Mi"), CPU: kresource.MustParse("32"), GPU: 4, Inf: 0, Price: 14.356}, "p3.16xlarge": {Region: "eu-west-2", Type: "p3.16xlarge", Memory: kresource.MustParse("499712Mi"), CPU: kresource.MustParse("64"), GPU: 8, Inf: 0, Price: 28.712}, @@ -10613,6 +11151,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "r6g.12xlarge": {Region: "eu-west-2", Type: "r6g.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.8416}, "r6g.16xlarge": {Region: "eu-west-2", Type: "r6g.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.7888}, "r6g.metal": {Region: "eu-west-2", Type: "r6g.metal", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.7888}, + "r6i.large": {Region: "eu-west-2", Type: "r6i.large", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.148}, + "r6i.xlarge": {Region: "eu-west-2", Type: "r6i.xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.296}, + "r6i.2xlarge": {Region: "eu-west-2", Type: "r6i.2xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.592}, + "r6i.4xlarge": {Region: "eu-west-2", Type: "r6i.4xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.184}, + "r6i.8xlarge": {Region: "eu-west-2", Type: "r6i.8xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.368}, + "r6i.12xlarge": {Region: "eu-west-2", Type: "r6i.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.552}, + "r6i.16xlarge": {Region: "eu-west-2", Type: "r6i.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.736}, + "r6i.24xlarge": {Region: "eu-west-2", Type: "r6i.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 7.104}, + "r6i.32xlarge": {Region: "eu-west-2", Type: "r6i.32xlarge", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.472}, + "r6i.metal": {Region: "eu-west-2", Type: "r6i.metal", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.472}, "t2.nano": {Region: "eu-west-2", Type: "t2.nano", Memory: kresource.MustParse("512Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0066}, "t2.micro": {Region: "eu-west-2", Type: "t2.micro", Memory: kresource.MustParse("1024Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0132}, "t2.small": {Region: "eu-west-2", Type: "t2.small", Memory: kresource.MustParse("2048Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.026}, @@ -10691,6 +11239,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "c6g.12xlarge": {Region: "eu-west-3", Type: "c6g.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 1.944}, "c6g.16xlarge": {Region: "eu-west-3", Type: "c6g.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.592}, "c6g.metal": {Region: "eu-west-3", Type: "c6g.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.592}, + "c6i.large": {Region: "eu-west-3", Type: "c6i.large", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.101}, + "c6i.xlarge": {Region: "eu-west-3", Type: "c6i.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.202}, + "c6i.2xlarge": {Region: "eu-west-3", Type: "c6i.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.404}, + "c6i.4xlarge": {Region: "eu-west-3", Type: "c6i.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.808}, + "c6i.8xlarge": {Region: "eu-west-3", Type: "c6i.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.616}, + "c6i.12xlarge": {Region: "eu-west-3", Type: "c6i.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.424}, + "c6i.16xlarge": {Region: "eu-west-3", Type: "c6i.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.232}, + "c6i.24xlarge": {Region: "eu-west-3", Type: "c6i.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 4.848}, + "c6i.32xlarge": {Region: "eu-west-3", Type: "c6i.32xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.464}, + "c6i.metal": {Region: "eu-west-3", Type: "c6i.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.464}, "d2.xlarge": {Region: "eu-west-3", Type: "d2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.772}, "d2.2xlarge": {Region: "eu-west-3", Type: "d2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.544}, "d2.4xlarge": {Region: "eu-west-3", Type: "d2.4xlarge", Memory: kresource.MustParse("124928Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 3.088}, @@ -10832,6 +11390,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "r6g.12xlarge": {Region: "eu-west-3", Type: "r6g.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.832}, "r6g.16xlarge": {Region: "eu-west-3", Type: "r6g.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.776}, "r6g.metal": {Region: "eu-west-3", Type: "r6g.metal", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.776}, + "r6i.large": {Region: "eu-west-3", Type: "r6i.large", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.148}, + "r6i.xlarge": {Region: "eu-west-3", Type: "r6i.xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.296}, + "r6i.2xlarge": {Region: "eu-west-3", Type: "r6i.2xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.592}, + "r6i.4xlarge": {Region: "eu-west-3", Type: "r6i.4xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.184}, + "r6i.8xlarge": {Region: "eu-west-3", Type: "r6i.8xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.368}, + "r6i.12xlarge": {Region: "eu-west-3", Type: "r6i.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.552}, + "r6i.16xlarge": {Region: "eu-west-3", Type: "r6i.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.736}, + "r6i.24xlarge": {Region: "eu-west-3", Type: "r6i.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 7.104}, + "r6i.32xlarge": {Region: "eu-west-3", Type: "r6i.32xlarge", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.472}, + "r6i.metal": {Region: "eu-west-3", Type: "r6i.metal", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 9.472}, "t2.nano": {Region: "eu-west-3", Type: "t2.nano", Memory: kresource.MustParse("512Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0066}, "t2.micro": {Region: "eu-west-3", Type: "t2.micro", Memory: kresource.MustParse("1024Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0132}, "t2.small": {Region: "eu-west-3", Type: "t2.small", Memory: kresource.MustParse("2048Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0264}, @@ -11052,6 +11620,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "c6g.12xlarge": {Region: "sa-east-1", Type: "c6g.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.5152}, "c6g.16xlarge": {Region: "sa-east-1", Type: "c6g.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.3536}, "c6g.metal": {Region: "sa-east-1", Type: "c6g.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.3536}, + "c6i.large": {Region: "sa-east-1", Type: "c6i.large", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.131}, + "c6i.xlarge": {Region: "sa-east-1", Type: "c6i.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.262}, + "c6i.2xlarge": {Region: "sa-east-1", Type: "c6i.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.524}, + "c6i.4xlarge": {Region: "sa-east-1", Type: "c6i.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.048}, + "c6i.8xlarge": {Region: "sa-east-1", Type: "c6i.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.096}, + "c6i.12xlarge": {Region: "sa-east-1", Type: "c6i.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.144}, + "c6i.16xlarge": {Region: "sa-east-1", Type: "c6i.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.192}, + "c6i.24xlarge": {Region: "sa-east-1", Type: "c6i.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 6.288}, + "c6i.32xlarge": {Region: "sa-east-1", Type: "c6i.32xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 8.384}, + "c6i.metal": {Region: "sa-east-1", Type: "c6i.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 8.384}, "g4dn.xlarge": {Region: "sa-east-1", Type: "g4dn.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 1, Inf: 0, Price: 0.894}, "g4dn.2xlarge": {Region: "sa-east-1", Type: "g4dn.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 1, Inf: 0, Price: 1.278}, "g4dn.4xlarge": {Region: "sa-east-1", Type: "g4dn.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 1, Inf: 0, Price: 2.046}, @@ -11398,6 +11976,12 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "g5.16xlarge": {Region: "us-east-1", Type: "g5.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 1, Inf: 0, Price: 4.096}, "g5.24xlarge": {Region: "us-east-1", Type: "g5.24xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("96"), GPU: 4, Inf: 0, Price: 8.144}, "g5.48xlarge": {Region: "us-east-1", Type: "g5.48xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("192"), GPU: 8, Inf: 0, Price: 16.288}, + "g5g.xlarge": {Region: "us-east-1", Type: "g5g.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 1, Inf: 0, Price: 0.42}, + "g5g.2xlarge": {Region: "us-east-1", Type: "g5g.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 1, Inf: 0, Price: 0.556}, + "g5g.4xlarge": {Region: "us-east-1", Type: "g5g.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 1, Inf: 0, Price: 0.828}, + "g5g.8xlarge": {Region: "us-east-1", Type: "g5g.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 1, Inf: 0, Price: 1.372}, + "g5g.16xlarge": {Region: "us-east-1", Type: "g5g.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 2, Inf: 0, Price: 2.744}, + "g5g.metal": {Region: "us-east-1", Type: "g5g.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 2, Inf: 0, Price: 2.744}, "h1.2xlarge": {Region: "us-east-1", Type: "h1.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.468}, "h1.4xlarge": {Region: "us-east-1", Type: "h1.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.936}, "h1.8xlarge": {Region: "us-east-1", Type: "h1.8xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.872}, @@ -11422,10 +12006,22 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "i3en.12xlarge": {Region: "us-east-1", Type: "i3en.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 5.424}, "i3en.24xlarge": {Region: "us-east-1", Type: "i3en.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 10.848}, "i3en.metal": {Region: "us-east-1", Type: "i3en.metal", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 10.848}, + "im4gn.large": {Region: "us-east-1", Type: "im4gn.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.1819}, + "im4gn.xlarge": {Region: "us-east-1", Type: "im4gn.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.36379}, + "im4gn.2xlarge": {Region: "us-east-1", Type: "im4gn.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.72758}, + "im4gn.4xlarge": {Region: "us-east-1", Type: "im4gn.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.45517}, + "im4gn.8xlarge": {Region: "us-east-1", Type: "im4gn.8xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.91034}, + "im4gn.16xlarge": {Region: "us-east-1", Type: "im4gn.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 5.82067}, "inf1.xlarge": {Region: "us-east-1", Type: "inf1.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 1, Price: 0.228}, "inf1.2xlarge": {Region: "us-east-1", Type: "inf1.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 1, Price: 0.362}, "inf1.6xlarge": {Region: "us-east-1", Type: "inf1.6xlarge", Memory: kresource.MustParse("49152Mi"), CPU: kresource.MustParse("24"), GPU: 0, Inf: 4, Price: 1.18}, "inf1.24xlarge": {Region: "us-east-1", Type: "inf1.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 16, Price: 4.721}, + "is4gen.medium": {Region: "us-east-1", Type: "is4gen.medium", Memory: kresource.MustParse("6144Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.14408}, + "is4gen.large": {Region: "us-east-1", Type: "is4gen.large", Memory: kresource.MustParse("12288Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.28815}, + "is4gen.xlarge": {Region: "us-east-1", Type: "is4gen.xlarge", Memory: kresource.MustParse("24576Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.5763}, + "is4gen.2xlarge": {Region: "us-east-1", Type: "is4gen.2xlarge", Memory: kresource.MustParse("49152Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.1526}, + "is4gen.4xlarge": {Region: "us-east-1", Type: "is4gen.4xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 2.3052}, + "is4gen.8xlarge": {Region: "us-east-1", Type: "is4gen.8xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 4.6104}, "m1.small": {Region: "us-east-1", Type: "m1.small", Memory: kresource.MustParse("1740Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.044}, "m1.medium": {Region: "us-east-1", Type: "m1.medium", Memory: kresource.MustParse("3840Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.087}, "m1.large": {Region: "us-east-1", Type: "m1.large", Memory: kresource.MustParse("7680Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.175}, @@ -11502,6 +12098,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "m5zn.6xlarge": {Region: "us-east-1", Type: "m5zn.6xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("24"), GPU: 0, Inf: 0, Price: 1.982}, "m5zn.12xlarge": {Region: "us-east-1", Type: "m5zn.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.9641}, "m5zn.metal": {Region: "us-east-1", Type: "m5zn.metal", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.9641}, + "m6a.large": {Region: "us-east-1", Type: "m6a.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.0864}, + "m6a.xlarge": {Region: "us-east-1", Type: "m6a.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.1728}, + "m6a.2xlarge": {Region: "us-east-1", Type: "m6a.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.3456}, + "m6a.4xlarge": {Region: "us-east-1", Type: "m6a.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.6912}, + "m6a.8xlarge": {Region: "us-east-1", Type: "m6a.8xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.3824}, + "m6a.12xlarge": {Region: "us-east-1", Type: "m6a.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.0736}, + "m6a.16xlarge": {Region: "us-east-1", Type: "m6a.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.7648}, + "m6a.24xlarge": {Region: "us-east-1", Type: "m6a.24xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 4.1472}, + "m6a.32xlarge": {Region: "us-east-1", Type: "m6a.32xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 5.5296}, + "m6a.48xlarge": {Region: "us-east-1", Type: "m6a.48xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("192"), GPU: 0, Inf: 0, Price: 8.2944}, "m6g.medium": {Region: "us-east-1", Type: "m6g.medium", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0385}, "m6g.large": {Region: "us-east-1", Type: "m6g.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.077}, "m6g.xlarge": {Region: "us-east-1", Type: "m6g.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.154}, @@ -11835,10 +12441,22 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "i3en.12xlarge": {Region: "us-east-2", Type: "i3en.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 5.424}, "i3en.24xlarge": {Region: "us-east-2", Type: "i3en.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 10.848}, "i3en.metal": {Region: "us-east-2", Type: "i3en.metal", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 10.848}, + "im4gn.large": {Region: "us-east-2", Type: "im4gn.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.1819}, + "im4gn.xlarge": {Region: "us-east-2", Type: "im4gn.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.36379}, + "im4gn.2xlarge": {Region: "us-east-2", Type: "im4gn.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.72758}, + "im4gn.4xlarge": {Region: "us-east-2", Type: "im4gn.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.45517}, + "im4gn.8xlarge": {Region: "us-east-2", Type: "im4gn.8xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.91034}, + "im4gn.16xlarge": {Region: "us-east-2", Type: "im4gn.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 5.82067}, "inf1.xlarge": {Region: "us-east-2", Type: "inf1.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 1, Price: 0.228}, "inf1.2xlarge": {Region: "us-east-2", Type: "inf1.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 1, Price: 0.362}, "inf1.6xlarge": {Region: "us-east-2", Type: "inf1.6xlarge", Memory: kresource.MustParse("49152Mi"), CPU: kresource.MustParse("24"), GPU: 0, Inf: 4, Price: 1.18}, "inf1.24xlarge": {Region: "us-east-2", Type: "inf1.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 16, Price: 4.721}, + "is4gen.medium": {Region: "us-east-2", Type: "is4gen.medium", Memory: kresource.MustParse("6144Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.14408}, + "is4gen.large": {Region: "us-east-2", Type: "is4gen.large", Memory: kresource.MustParse("12288Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.28815}, + "is4gen.xlarge": {Region: "us-east-2", Type: "is4gen.xlarge", Memory: kresource.MustParse("24576Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.5763}, + "is4gen.2xlarge": {Region: "us-east-2", Type: "is4gen.2xlarge", Memory: kresource.MustParse("49152Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.1526}, + "is4gen.4xlarge": {Region: "us-east-2", Type: "is4gen.4xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 2.3052}, + "is4gen.8xlarge": {Region: "us-east-2", Type: "is4gen.8xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 4.6104}, "m4.large": {Region: "us-east-2", Type: "m4.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.1}, "m4.xlarge": {Region: "us-east-2", Type: "m4.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.2}, "m4.2xlarge": {Region: "us-east-2", Type: "m4.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.4}, @@ -12661,6 +13279,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "c6gd.12xlarge": {Region: "us-west-1", Type: "c6gd.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.304}, "c6gd.16xlarge": {Region: "us-west-1", Type: "c6gd.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.072}, "c6gd.metal": {Region: "us-west-1", Type: "c6gd.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.072}, + "c6i.large": {Region: "us-west-1", Type: "c6i.large", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.106}, + "c6i.xlarge": {Region: "us-west-1", Type: "c6i.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.212}, + "c6i.2xlarge": {Region: "us-west-1", Type: "c6i.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.424}, + "c6i.4xlarge": {Region: "us-west-1", Type: "c6i.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.848}, + "c6i.8xlarge": {Region: "us-west-1", Type: "c6i.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.696}, + "c6i.12xlarge": {Region: "us-west-1", Type: "c6i.12xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.544}, + "c6i.16xlarge": {Region: "us-west-1", Type: "c6i.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 3.392}, + "c6i.24xlarge": {Region: "us-west-1", Type: "c6i.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 5.088}, + "c6i.32xlarge": {Region: "us-west-1", Type: "c6i.32xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.784}, + "c6i.metal": {Region: "us-west-1", Type: "c6i.metal", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 6.784}, "d2.xlarge": {Region: "us-west-1", Type: "d2.xlarge", Memory: kresource.MustParse("31232Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.781}, "d2.2xlarge": {Region: "us-west-1", Type: "d2.2xlarge", Memory: kresource.MustParse("62464Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.563}, "d2.4xlarge": {Region: "us-west-1", Type: "d2.4xlarge", Memory: kresource.MustParse("124928Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 3.125}, @@ -12858,6 +13486,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "r6gd.12xlarge": {Region: "us-west-1", Type: "r6gd.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.12}, "r6gd.16xlarge": {Region: "us-west-1", Type: "r6gd.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.16}, "r6gd.metal": {Region: "us-west-1", Type: "r6gd.metal", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.16}, + "r6i.large": {Region: "us-west-1", Type: "r6i.large", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.14}, + "r6i.xlarge": {Region: "us-west-1", Type: "r6i.xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.28}, + "r6i.2xlarge": {Region: "us-west-1", Type: "r6i.2xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.56}, + "r6i.4xlarge": {Region: "us-west-1", Type: "r6i.4xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.12}, + "r6i.8xlarge": {Region: "us-west-1", Type: "r6i.8xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.24}, + "r6i.12xlarge": {Region: "us-west-1", Type: "r6i.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.36}, + "r6i.16xlarge": {Region: "us-west-1", Type: "r6i.16xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 4.48}, + "r6i.24xlarge": {Region: "us-west-1", Type: "r6i.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 6.72}, + "r6i.32xlarge": {Region: "us-west-1", Type: "r6i.32xlarge", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 8.96}, + "r6i.metal": {Region: "us-west-1", Type: "r6i.metal", Memory: kresource.MustParse("1048576Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 8.96}, "t1.micro": {Region: "us-west-1", Type: "t1.micro", Memory: kresource.MustParse("627Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.025}, "t2.nano": {Region: "us-west-1", Type: "t2.nano", Memory: kresource.MustParse("512Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0069}, "t2.micro": {Region: "us-west-1", Type: "t2.micro", Memory: kresource.MustParse("1024Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0138}, @@ -13037,6 +13675,12 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "g5.16xlarge": {Region: "us-west-2", Type: "g5.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 1, Inf: 0, Price: 4.096}, "g5.24xlarge": {Region: "us-west-2", Type: "g5.24xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("96"), GPU: 4, Inf: 0, Price: 8.144}, "g5.48xlarge": {Region: "us-west-2", Type: "g5.48xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("192"), GPU: 8, Inf: 0, Price: 16.288}, + "g5g.xlarge": {Region: "us-west-2", Type: "g5g.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 1, Inf: 0, Price: 0.42}, + "g5g.2xlarge": {Region: "us-west-2", Type: "g5g.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 1, Inf: 0, Price: 0.556}, + "g5g.4xlarge": {Region: "us-west-2", Type: "g5g.4xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("16"), GPU: 1, Inf: 0, Price: 0.828}, + "g5g.8xlarge": {Region: "us-west-2", Type: "g5g.8xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("32"), GPU: 1, Inf: 0, Price: 1.372}, + "g5g.16xlarge": {Region: "us-west-2", Type: "g5g.16xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 2, Inf: 0, Price: 2.744}, + "g5g.metal": {Region: "us-west-2", Type: "g5g.metal", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("64"), GPU: 2, Inf: 0, Price: 2.744}, "h1.2xlarge": {Region: "us-west-2", Type: "h1.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.468}, "h1.4xlarge": {Region: "us-west-2", Type: "h1.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.936}, "h1.8xlarge": {Region: "us-west-2", Type: "h1.8xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.872}, @@ -13061,10 +13705,22 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "i3en.12xlarge": {Region: "us-west-2", Type: "i3en.12xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 5.424}, "i3en.24xlarge": {Region: "us-west-2", Type: "i3en.24xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 10.848}, "i3en.metal": {Region: "us-west-2", Type: "i3en.metal", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 10.848}, + "im4gn.large": {Region: "us-west-2", Type: "im4gn.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.1819}, + "im4gn.xlarge": {Region: "us-west-2", Type: "im4gn.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.36379}, + "im4gn.2xlarge": {Region: "us-west-2", Type: "im4gn.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.72758}, + "im4gn.4xlarge": {Region: "us-west-2", Type: "im4gn.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 1.45517}, + "im4gn.8xlarge": {Region: "us-west-2", Type: "im4gn.8xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 2.91034}, + "im4gn.16xlarge": {Region: "us-west-2", Type: "im4gn.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 5.82067}, "inf1.xlarge": {Region: "us-west-2", Type: "inf1.xlarge", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 1, Price: 0.228}, "inf1.2xlarge": {Region: "us-west-2", Type: "inf1.2xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 1, Price: 0.362}, "inf1.6xlarge": {Region: "us-west-2", Type: "inf1.6xlarge", Memory: kresource.MustParse("49152Mi"), CPU: kresource.MustParse("24"), GPU: 0, Inf: 4, Price: 1.18}, "inf1.24xlarge": {Region: "us-west-2", Type: "inf1.24xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 16, Price: 4.721}, + "is4gen.medium": {Region: "us-west-2", Type: "is4gen.medium", Memory: kresource.MustParse("6144Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.14408}, + "is4gen.large": {Region: "us-west-2", Type: "is4gen.large", Memory: kresource.MustParse("12288Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.28815}, + "is4gen.xlarge": {Region: "us-west-2", Type: "is4gen.xlarge", Memory: kresource.MustParse("24576Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.5763}, + "is4gen.2xlarge": {Region: "us-west-2", Type: "is4gen.2xlarge", Memory: kresource.MustParse("49152Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 1.1526}, + "is4gen.4xlarge": {Region: "us-west-2", Type: "is4gen.4xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 2.3052}, + "is4gen.8xlarge": {Region: "us-west-2", Type: "is4gen.8xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 4.6104}, "m1.small": {Region: "us-west-2", Type: "m1.small", Memory: kresource.MustParse("1740Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.044}, "m1.medium": {Region: "us-west-2", Type: "m1.medium", Memory: kresource.MustParse("3840Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.087}, "m1.large": {Region: "us-west-2", Type: "m1.large", Memory: kresource.MustParse("7680Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.175}, @@ -13141,6 +13797,16 @@ var InstanceMetadatas = map[string]map[string]InstanceMetadata{ "m5zn.6xlarge": {Region: "us-west-2", Type: "m5zn.6xlarge", Memory: kresource.MustParse("98304Mi"), CPU: kresource.MustParse("24"), GPU: 0, Inf: 0, Price: 1.982}, "m5zn.12xlarge": {Region: "us-west-2", Type: "m5zn.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.9641}, "m5zn.metal": {Region: "us-west-2", Type: "m5zn.metal", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 3.9641}, + "m6a.large": {Region: "us-west-2", Type: "m6a.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.0864}, + "m6a.xlarge": {Region: "us-west-2", Type: "m6a.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.1728}, + "m6a.2xlarge": {Region: "us-west-2", Type: "m6a.2xlarge", Memory: kresource.MustParse("32768Mi"), CPU: kresource.MustParse("8"), GPU: 0, Inf: 0, Price: 0.3456}, + "m6a.4xlarge": {Region: "us-west-2", Type: "m6a.4xlarge", Memory: kresource.MustParse("65536Mi"), CPU: kresource.MustParse("16"), GPU: 0, Inf: 0, Price: 0.6912}, + "m6a.8xlarge": {Region: "us-west-2", Type: "m6a.8xlarge", Memory: kresource.MustParse("131072Mi"), CPU: kresource.MustParse("32"), GPU: 0, Inf: 0, Price: 1.3824}, + "m6a.12xlarge": {Region: "us-west-2", Type: "m6a.12xlarge", Memory: kresource.MustParse("196608Mi"), CPU: kresource.MustParse("48"), GPU: 0, Inf: 0, Price: 2.0736}, + "m6a.16xlarge": {Region: "us-west-2", Type: "m6a.16xlarge", Memory: kresource.MustParse("262144Mi"), CPU: kresource.MustParse("64"), GPU: 0, Inf: 0, Price: 2.7648}, + "m6a.24xlarge": {Region: "us-west-2", Type: "m6a.24xlarge", Memory: kresource.MustParse("393216Mi"), CPU: kresource.MustParse("96"), GPU: 0, Inf: 0, Price: 4.1472}, + "m6a.32xlarge": {Region: "us-west-2", Type: "m6a.32xlarge", Memory: kresource.MustParse("524288Mi"), CPU: kresource.MustParse("128"), GPU: 0, Inf: 0, Price: 5.5296}, + "m6a.48xlarge": {Region: "us-west-2", Type: "m6a.48xlarge", Memory: kresource.MustParse("786432Mi"), CPU: kresource.MustParse("192"), GPU: 0, Inf: 0, Price: 8.2944}, "m6g.medium": {Region: "us-west-2", Type: "m6g.medium", Memory: kresource.MustParse("4096Mi"), CPU: kresource.MustParse("1"), GPU: 0, Inf: 0, Price: 0.0385}, "m6g.large": {Region: "us-west-2", Type: "m6g.large", Memory: kresource.MustParse("8192Mi"), CPU: kresource.MustParse("2"), GPU: 0, Inf: 0, Price: 0.077}, "m6g.xlarge": {Region: "us-west-2", Type: "m6g.xlarge", Memory: kresource.MustParse("16384Mi"), CPU: kresource.MustParse("4"), GPU: 0, Inf: 0, Price: 0.154}, @@ -13367,6 +14033,33 @@ var NLBMetadatas = map[string]NLBMetadata{ "us-west-2": {Region: "us-west-2", Price: 0.0225}, } +// region -> ELB metadata +var ELBMetadatas = map[string]ELBMetadata{ + "af-south-1": {Region: "af-south-1", Price: 0.03332}, + "ap-east-1": {Region: "ap-east-1", Price: 0.0308}, + "ap-northeast-1": {Region: "ap-northeast-1", Price: 0.027}, + "ap-northeast-2": {Region: "ap-northeast-2", Price: 0.025}, + "ap-northeast-3": {Region: "ap-northeast-3", Price: 0.027}, + "ap-south-1": {Region: "ap-south-1", Price: 0.0266}, + "ap-southeast-1": {Region: "ap-southeast-1", Price: 0.028}, + "ap-southeast-2": {Region: "ap-southeast-2", Price: 0.028}, + "ca-central-1": {Region: "ca-central-1", Price: 0.0275}, + "eu-central-1": {Region: "eu-central-1", Price: 0.03}, + "eu-north-1": {Region: "eu-north-1", Price: 0.0266}, + "eu-south-1": {Region: "eu-south-1", Price: 0.0294}, + "eu-west-1": {Region: "eu-west-1", Price: 0.028}, + "eu-west-2": {Region: "eu-west-2", Price: 0.0294}, + "eu-west-3": {Region: "eu-west-3", Price: 0.0294}, + "me-south-1": {Region: "me-south-1", Price: 0.0308}, + "sa-east-1": {Region: "sa-east-1", Price: 0.034}, + "us-east-1": {Region: "us-east-1", Price: 0.025}, + "us-east-2": {Region: "us-east-2", Price: 0.025}, + "us-gov-east-1": {Region: "us-gov-east-1", Price: 0.032}, + "us-gov-west-1": {Region: "us-gov-west-1", Price: 0.032}, + "us-west-1": {Region: "us-west-1", Price: 0.028}, + "us-west-2": {Region: "us-west-2", Price: 0.025}, +} + // region -> NAT metadata var NATMetadatas = map[string]NATMetadata{ "af-south-1": {Region: "af-south-1", Price: 0.057}, From 69a0c12d773c581979e32eea8742e4a47a6a3b32 Mon Sep 17 00:00:00 2001 From: Robert Lucian Chiriac Date: Thu, 6 Jan 2022 18:21:04 +0200 Subject: [PATCH 07/11] Update the docs --- docs/clusters/management/create.md | 3 ++ docs/clusters/management/production.md | 4 ++ docs/clusters/networking/api-gateway.md | 2 + docs/clusters/networking/load-balancers.md | 2 + docs/overview.md | 2 +- go.mod | 53 ---------------------- go.sum | 1 + pkg/lib/aws/gen_resource_metadata.py | 1 + 8 files changed, 14 insertions(+), 54 deletions(-) diff --git a/docs/clusters/management/create.md b/docs/clusters/management/create.md index 3ca9dd2d8d..6528cadb6b 100644 --- a/docs/clusters/management/create.md +++ b/docs/clusters/management/create.md @@ -61,6 +61,9 @@ nat_gateway: none # API load balancer scheme [internet-facing | internal] api_load_balancer_scheme: internet-facing +# API load balancer type [nlb | elb] +api_load_balancer_type: nlb + # operator load balancer scheme [internet-facing | internal] # note: if using "internal", you must configure VPC Peering to connect your CLI to your cluster operator operator_load_balancer_scheme: internet-facing diff --git a/docs/clusters/management/production.md b/docs/clusters/management/production.md index 06189708c0..c8536fd13b 100644 --- a/docs/clusters/management/production.md +++ b/docs/clusters/management/production.md @@ -45,6 +45,10 @@ operator_load_balancer_cidr_white_list: [0.0.0.0/0] See [here](../networking/load-balancers.md) for more information about the load balancers. +### Workload load-balancing + +Depending on your application's requirements, you might have different needs from the cluster's api load balancer. By default, the api load balancer is a [Network load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html) (NLB) that works at L4 and it's highly performant. Alternatively, a [Classic load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/introduction.html) (ELB) can be set `api_load_balancer_type: elb` in your cluster config. An ELB works at both layers L4 and L7, but it's less performant. This choice can only be made before spinning up your cluster. + ### Ensure node provisioning You can take advantage of the cost savings of spot instances and the reliability of on-demand instances by utilizing the `priority` field in node groups. You can deploy two node groups, one that is spot and another that is on-demand. Set the priority of the spot node group to be higher than the priority of the on-demand node group. This encourages the cluster-autoscaler to try to spin up instances from the spot node group first. If there are no more spot instances available, the on-demand node group will be used instead. diff --git a/docs/clusters/networking/api-gateway.md b/docs/clusters/networking/api-gateway.md index c6bbf0ce26..c403bb6e49 100644 --- a/docs/clusters/networking/api-gateway.md +++ b/docs/clusters/networking/api-gateway.md @@ -4,6 +4,8 @@ This guide shows how set up AWS API Gateway for your Cortex APIs, which is the s Please note that one limitation of API Gateway is that there is a 30-second time limit for all requests. +A requirement that needs to be met for this guide is that the `api_load_balancer_type` field has to be set to `nlb` in your cluster configuration file before creating the cluster. By default, the field is set to `nlb`. + If your API load balancer is internet-facing (which is the default, or you set `api_load_balancer_scheme: internet-facing` in your cluster configuration file before creating your cluster), use the [first section](#internet-facing-load-balancer) of this guide. If your API load balancer is internal (i.e. you set `api_load_balancer_scheme: internal` in your cluster configuration file before creating your cluster), use the [second section](#internal-load-balancer) of this guide. diff --git a/docs/clusters/networking/load-balancers.md b/docs/clusters/networking/load-balancers.md index 2d0ff5861f..57148a811a 100644 --- a/docs/clusters/networking/load-balancers.md +++ b/docs/clusters/networking/load-balancers.md @@ -7,3 +7,5 @@ All APIs share a single API load balancer. By default, the API load balancer is The SSL certificate on the API load balancer is autogenerated during installation using `localhost` as the Common Name (CN). Therefore, clients will need to skip certificate verification when making HTTPS requests to your APIs (e.g. `curl -k https://***`), or make HTTP requests instead (e.g. `curl http://***`). Alternatively, you can enable HTTPS by using a [custom domain](custom-domain.md) and setting up [https](https.md) or by [creating an API Gateway](api-gateway.md) to forward requests to your API load balancer. There is a separate load balancer for the Cortex operator. By default, the operator load balancer is public. You can configure your operator load balancer to be private by setting `operator_load_balancer_scheme: internal` in your cluster configuration file (before creating your cluster). You can use [VPC Peering](vpc-peering.md) to enable your Cortex CLI to connect to your cluster operator from another VPC. You can enforce that incoming requests to the Cortex operator must originate from specific ip address ranges by specifying `operator_load_balancer_cidr_white_list: []` in your cluster configuration. + +A difference between the operator load balancer and the api load balancer is that the latter can also be configured to be of a different type. By default, both load balancers are Network load balancers (NLB), but the api load balancer can optionally be configured as a classic load balancer (ELB). This option gives the user access to a wider range of load-balancing functionalities that a single type cannot cover. The api load balancer type can only be specified before creating your cluster and not while it's running. diff --git a/docs/overview.md b/docs/overview.md index 52c8ab506c..23bb7f29fe 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -14,7 +14,7 @@ Cortex uses the Kubernetes Cluster Autoscaler to scale the appropriate node grou By default, a new dedicated VPC is created for the cluster during installation. -Two network load balancers (NLBs) are created to route traffic to the cluster. One load balancer is dedicated for traffic to your APIs, and the other load balancer is dedicated for API management requests to Cortex from your CLI or Python client. Traffic to the load balancers can be secured and restricted based on your cluster configuration. +Two network load balancers (NLBs) are created to route traffic to the cluster. One load balancer is dedicated for traffic to your APIs, and the other load balancer is dedicated for API management requests to Cortex from your CLI or Python client. Optionally, the API load balancer can be a classic load balancer (ELB). Traffic to the load balancers can be secured and restricted based on your cluster configuration. ### Observability diff --git a/go.mod b/go.mod index fdd4b565df..bdb4b5e577 100644 --- a/go.mod +++ b/go.mod @@ -49,98 +49,45 @@ require ( ) require ( - cloud.google.com/go v0.81.0 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.12 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/logger v0.2.0 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Microsoft/go-winio v0.5.0 // indirect - github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/StackExchange/wmi v0.0.0-20210224194228-fe8f1750fd46 // indirect - github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.1.1 // indirect - github.com/cespare/xxhash/v2 v2.1.1 // indirect github.com/containerd/containerd v1.5.4 // indirect - github.com/containerd/continuity v0.1.0 // indirect github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect - github.com/docker/cli v20.10.7+incompatible // indirect - github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/go-connections v0.4.0 // indirect - github.com/docker/go-units v0.4.0 // indirect - github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 // indirect github.com/evanphx/json-patch v4.11.0+incompatible // indirect github.com/felixge/httpsnoop v1.0.2 // indirect - github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-logr/zapr v0.4.0 // indirect github.com/go-ole/go-ole v1.2.5 // indirect - github.com/gofrs/flock v0.7.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.6 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/googleapis/gnostic v0.5.5 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/json-iterator/go v1.1.11 // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.11 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect - github.com/nxadm/tail v1.4.8 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.0.1 // indirect github.com/opencontainers/runc v1.0.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/procfs v0.6.0 // indirect github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect github.com/stretchr/objx v0.3.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.2.0 // indirect go.uber.org/multierr v1.7.0 // indirect - golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect - golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 // indirect golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3 // indirect golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect - golang.org/x/text v0.3.6 // indirect golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 // indirect golang.org/x/tools v0.1.7 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210701133433-6b8dcf568a95 // indirect google.golang.org/grpc v1.39.0 // indirect - google.golang.org/protobuf v1.27.1 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect - gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect - gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - istio.io/gogo-genproto v0.0.0-20210113155706-4daf5697332f // indirect k8s.io/apiextensions-apiserver v0.20.8 // indirect - k8s.io/component-base v0.20.8 // indirect k8s.io/klog/v2 v2.9.0 // indirect k8s.io/kube-openapi v0.0.0-20210527164424-3c818078ee3d // indirect k8s.io/utils v0.0.0-20210629042839-4a2b36d8d73f // indirect sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect - sigs.k8s.io/yaml v1.2.0 // indirect ) replace github.com/docker/docker => github.com/docker/engine v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible diff --git a/go.sum b/go.sum index 6fcef84d32..1b75f0ef12 100644 --- a/go.sum +++ b/go.sum @@ -1119,6 +1119,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/pkg/lib/aws/gen_resource_metadata.py b/pkg/lib/aws/gen_resource_metadata.py index 7600ca28e8..5b09e46657 100644 --- a/pkg/lib/aws/gen_resource_metadata.py +++ b/pkg/lib/aws/gen_resource_metadata.py @@ -126,6 +126,7 @@ def get_nlb_metadata(pricing): price = list(price_dimensions.values())[0]["pricePerUnit"]["USD"] return {"price": float(price)} + def get_elb_metadata(pricing): for _, product in pricing["products"].items(): if product.get("attributes") is None: From 4c7fbdfbf6c7d447881efe078b3570bad5a0394f Mon Sep 17 00:00:00 2001 From: Robert Lucian Chiriac Date: Thu, 6 Jan 2022 19:12:24 +0200 Subject: [PATCH 08/11] Reset go.mod/go.sum files --- go.mod | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ go.sum | 1 - 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index bdb4b5e577..fdd4b565df 100644 --- a/go.mod +++ b/go.mod @@ -49,45 +49,98 @@ require ( ) require ( + cloud.google.com/go v0.81.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.12 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect + github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect + github.com/Azure/go-autorest/logger v0.2.0 // indirect + github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/Microsoft/go-winio v0.5.0 // indirect + github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/StackExchange/wmi v0.0.0-20210224194228-fe8f1750fd46 // indirect + github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.1.1 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect github.com/containerd/containerd v1.5.4 // indirect + github.com/containerd/continuity v0.1.0 // indirect github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect + github.com/docker/cli v20.10.7+incompatible // indirect + github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.4.0 // indirect + github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 // indirect github.com/evanphx/json-patch v4.11.0+incompatible // indirect github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-logr/zapr v0.4.0 // indirect github.com/go-ole/go-ole v1.2.5 // indirect + github.com/gofrs/flock v0.7.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.6 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/googleapis/gnostic v0.5.5 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/json-iterator/go v1.1.11 // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.11 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect + github.com/nxadm/tail v1.4.8 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.0.1 // indirect github.com/opencontainers/runc v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/procfs v0.6.0 // indirect github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3 // indirect + github.com/sirupsen/logrus v1.8.1 // indirect github.com/stretchr/objx v0.3.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 // indirect go.uber.org/multierr v1.7.0 // indirect + golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect + golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 // indirect golang.org/x/sys v0.0.0-20211109184856-51b60fd695b3 // indirect golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect + golang.org/x/text v0.3.6 // indirect golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 // indirect golang.org/x/tools v0.1.7 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210701133433-6b8dcf568a95 // indirect google.golang.org/grpc v1.39.0 // indirect + google.golang.org/protobuf v1.27.1 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + istio.io/gogo-genproto v0.0.0-20210113155706-4daf5697332f // indirect k8s.io/apiextensions-apiserver v0.20.8 // indirect + k8s.io/component-base v0.20.8 // indirect k8s.io/klog/v2 v2.9.0 // indirect k8s.io/kube-openapi v0.0.0-20210527164424-3c818078ee3d // indirect k8s.io/utils v0.0.0-20210629042839-4a2b36d8d73f // indirect sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect ) replace github.com/docker/docker => github.com/docker/engine v17.12.0-ce-rc1.0.20200916142827-bd33bbf0497b+incompatible diff --git a/go.sum b/go.sum index 1b75f0ef12..6fcef84d32 100644 --- a/go.sum +++ b/go.sum @@ -1119,7 +1119,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= From c2db29d9dfc137fdb0bc85bb1658c8ca5667814d Mon Sep 17 00:00:00 2001 From: Robert Lucian Chiriac Date: Thu, 6 Jan 2022 19:38:27 +0200 Subject: [PATCH 09/11] Nits --- cli/cmd/cluster.go | 1 + docs/clusters/management/production.md | 2 +- docs/clusters/networking/load-balancers.md | 2 +- pkg/types/clusterconfig/cluster_config.go | 1 - 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/cmd/cluster.go b/cli/cmd/cluster.go index dab7e2be82..e509060607 100644 --- a/cli/cmd/cluster.go +++ b/cli/cmd/cluster.go @@ -1407,6 +1407,7 @@ func getLoadBalancerV2(clusterName string, whichLB LoadBalancer, awsClient *awsl return loadBalancer, nil } +// Will return error if the load balancer can't be found func getLoadBalancer(clusterName string, whichLB LoadBalancer, awsClient *awslib.Client) (*elb.LoadBalancerDescription, error) { loadBalancer, err := awsClient.FindLoadBalancer(map[string]string{ clusterconfig.ClusterNameTag: clusterName, diff --git a/docs/clusters/management/production.md b/docs/clusters/management/production.md index c8536fd13b..5445b73965 100644 --- a/docs/clusters/management/production.md +++ b/docs/clusters/management/production.md @@ -47,7 +47,7 @@ See [here](../networking/load-balancers.md) for more information about the load ### Workload load-balancing -Depending on your application's requirements, you might have different needs from the cluster's api load balancer. By default, the api load balancer is a [Network load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html) (NLB) that works at L4 and it's highly performant. Alternatively, a [Classic load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/introduction.html) (ELB) can be set `api_load_balancer_type: elb` in your cluster config. An ELB works at both layers L4 and L7, but it's less performant. This choice can only be made before spinning up your cluster. +Depending on your application's requirements, you might have different needs from the cluster's api load balancer. By default, the api load balancer is a [Network load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html) (NLB) that works at L4 and it's highly performant. Alternatively, a [Classic load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/introduction.html) (ELB) can be set `api_load_balancer_type: elb` in your cluster config. An ELB works at both L4 and L7 layers, but it's less performant. This selection can only be made before spinning up your cluster. ### Ensure node provisioning diff --git a/docs/clusters/networking/load-balancers.md b/docs/clusters/networking/load-balancers.md index 57148a811a..854d40b3ba 100644 --- a/docs/clusters/networking/load-balancers.md +++ b/docs/clusters/networking/load-balancers.md @@ -8,4 +8,4 @@ The SSL certificate on the API load balancer is autogenerated during installatio There is a separate load balancer for the Cortex operator. By default, the operator load balancer is public. You can configure your operator load balancer to be private by setting `operator_load_balancer_scheme: internal` in your cluster configuration file (before creating your cluster). You can use [VPC Peering](vpc-peering.md) to enable your Cortex CLI to connect to your cluster operator from another VPC. You can enforce that incoming requests to the Cortex operator must originate from specific ip address ranges by specifying `operator_load_balancer_cidr_white_list: []` in your cluster configuration. -A difference between the operator load balancer and the api load balancer is that the latter can also be configured to be of a different type. By default, both load balancers are Network load balancers (NLB), but the api load balancer can optionally be configured as a classic load balancer (ELB). This option gives the user access to a wider range of load-balancing functionalities that a single type cannot cover. The api load balancer type can only be specified before creating your cluster and not while it's running. +A difference between the operator load balancer and the api load balancer is that the latter can also be configured to be of a different type. By default, both load balancers are [Network load balancers](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html) (NLB), but the api load balancer can optionally be configured as a [Classic load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/introduction.html) (ELB). This option gives the user access to a wider range of load-balancing functionalities that a single type cannot cover. The api load balancer type can only be specified before creating your cluster and not while it's running. diff --git a/pkg/types/clusterconfig/cluster_config.go b/pkg/types/clusterconfig/cluster_config.go index cd29f28b1d..20e3adbc4f 100644 --- a/pkg/types/clusterconfig/cluster_config.go +++ b/pkg/types/clusterconfig/cluster_config.go @@ -324,7 +324,6 @@ var CoreConfigStructFieldValidations = []*cr.StructFieldValidation{ StringValidation: &cr.StringValidation{ MinLength: 1, Default: "t3.medium", - // TODO could add a ValidatorWithField field to avoid having to validate for the nlb stuff in the validate function (from cluster config) Validator: validatePrometheusInstanceType, }, }, From 567ac056261e799108e0ca9ab2c12dc9662fb626 Mon Sep 17 00:00:00 2001 From: David Eliahu Date: Thu, 6 Jan 2022 12:18:23 -0800 Subject: [PATCH 10/11] Validate new instance types --- pkg/lib/aws/ec2.go | 48 +++++++++++++++++++++++ pkg/lib/aws/servicequotas.go | 2 +- pkg/types/clusterconfig/cluster_config.go | 32 +++++++++++++++ pkg/types/clusterconfig/errors.go | 32 +++++++++++++++ 4 files changed, 113 insertions(+), 1 deletion(-) diff --git a/pkg/lib/aws/ec2.go b/pkg/lib/aws/ec2.go index 66b2f94fb6..22ddc0eb1b 100644 --- a/pkg/lib/aws/ec2.go +++ b/pkg/lib/aws/ec2.go @@ -177,6 +177,15 @@ func IsInferentiaInstance(instanceType string) (bool, error) { return parsedType.Family == "inf", nil } +func IsTrainiumInstance(instanceType string) (bool, error) { + parsedType, err := ParseInstanceType(instanceType) + if err != nil { + return false, err + } + + return parsedType.Family == "trn", nil +} + func IsMacInstance(instanceType string) (bool, error) { parsedType, err := ParseInstanceType(instanceType) if err != nil { @@ -190,6 +199,45 @@ func IsMacInstance(instanceType string) (bool, error) { return false, nil } +func IsFPGAInstance(instanceType string) (bool, error) { + parsedType, err := ParseInstanceType(instanceType) + if err != nil { + return false, err + } + + if parsedType.Family == "f" { + return true, nil + } + + return false, nil +} + +func IsAlevoInstance(instanceType string) (bool, error) { + parsedType, err := ParseInstanceType(instanceType) + if err != nil { + return false, err + } + + if parsedType.Family == "vt" { + return true, nil + } + + return false, nil +} + +func IsGaudiInstance(instanceType string) (bool, error) { + parsedType, err := ParseInstanceType(instanceType) + if err != nil { + return false, err + } + + if parsedType.Family == "dl" { + return true, nil + } + + return false, nil +} + func (c *Client) SpotInstancePrice(instanceType string) (float64, error) { result, err := c.EC2().DescribeSpotPriceHistory(&ec2.DescribeSpotPriceHistoryInput{ InstanceTypes: []*string{aws.String(instanceType)}, diff --git a/pkg/lib/aws/servicequotas.go b/pkg/lib/aws/servicequotas.go index b136408d3c..9239b5e23c 100644 --- a/pkg/lib/aws/servicequotas.go +++ b/pkg/lib/aws/servicequotas.go @@ -27,7 +27,7 @@ import ( ) var _standardInstanceFamilies = strset.New("a", "c", "d", "h", "i", "m", "r", "t", "z") -var _knownInstanceFamilies = strset.Union(_standardInstanceFamilies, strset.New("p", "g", "inf", "x", "f", "mac", "vt")) +var _knownInstanceFamilies = strset.Union(_standardInstanceFamilies, strset.New("p", "g", "inf", "x", "f", "mac", "vt", "dl", "trn", "im", "is")) const ( // 11 inbound rules diff --git a/pkg/types/clusterconfig/cluster_config.go b/pkg/types/clusterconfig/cluster_config.go index 20e3adbc4f..d8e5060e19 100644 --- a/pkg/types/clusterconfig/cluster_config.go +++ b/pkg/types/clusterconfig/cluster_config.go @@ -1588,6 +1588,38 @@ func validateInstanceType(instanceType string) (string, error) { return "", ErrorMacInstancesNotSupported(instanceType) } + isFPGA, err := aws.IsFPGAInstance(instanceType) + if err != nil { + return "", err + } + if isFPGA { + return "", ErrorFPGAInstancesNotSupported(instanceType) + } + + isAlevo, err := aws.IsAlevoInstance(instanceType) + if err != nil { + return "", err + } + if isAlevo { + return "", ErrorAlevoInstancesNotSupported(instanceType) + } + + isGaudi, err := aws.IsGaudiInstance(instanceType) + if err != nil { + return "", err + } + if isGaudi { + return "", ErrorGaudiInstancesNotSupported(instanceType) + } + + isTrainium, err := aws.IsTrainiumInstance(instanceType) + if err != nil { + return "", err + } + if isTrainium { + return "", ErrorTrainiumInstancesNotSupported(instanceType) + } + if _, ok := awsutils.InstanceNetworkingLimits[instanceType]; !ok { return "", ErrorInstanceTypeNotSupportedByCortex(instanceType) } diff --git a/pkg/types/clusterconfig/errors.go b/pkg/types/clusterconfig/errors.go index 769f746417..cf7bc50d47 100644 --- a/pkg/types/clusterconfig/errors.go +++ b/pkg/types/clusterconfig/errors.go @@ -51,6 +51,10 @@ const ( ErrGPUInstancesNotSupported = "clusterconfig.gpu_instance_not_supported" ErrInferentiaInstancesNotSupported = "clusterconfig.inferentia_instances_not_supported" ErrMacInstancesNotSupported = "clusterconfig.mac_instances_not_supported" + ErrFPGAInstancesNotSupported = "clusterconfig.fpga_instances_not_supported" + ErrAlevoInstancesNotSupported = "clusterconfig.alevo_instances_not_supported" + ErrGaudiInstancesNotSupported = "clusterconfig.gaudi_instances_not_supported" + ErrTrainiumInstancesNotSupported = "clusterconfig.trainium_instances_not_supported" ErrAtLeastOneInstanceDistribution = "clusterconfig.at_least_one_instance_distribution" ErrNoCompatibleSpotInstanceFound = "clusterconfig.no_compatible_spot_instance_found" ErrConfiguredWhenSpotIsNotEnabled = "clusterconfig.configured_when_spot_is_not_enabled" @@ -242,6 +246,34 @@ func ErrorMacInstancesNotSupported(instanceType string) error { }) } +func ErrorFPGAInstancesNotSupported(instanceType string) error { + return errors.WithStack(&errors.Error{ + Kind: ErrFPGAInstancesNotSupported, + Message: fmt.Sprintf("FPGA instances (including %s) are not supported by cortex", instanceType), + }) +} + +func ErrorAlevoInstancesNotSupported(instanceType string) error { + return errors.WithStack(&errors.Error{ + Kind: ErrAlevoInstancesNotSupported, + Message: fmt.Sprintf("Alevo instances (including %s) are not supported by cortex", instanceType), + }) +} + +func ErrorGaudiInstancesNotSupported(instanceType string) error { + return errors.WithStack(&errors.Error{ + Kind: ErrGaudiInstancesNotSupported, + Message: fmt.Sprintf("Gaudi instances (including %s) are not supported by cortex", instanceType), + }) +} + +func ErrorTrainiumInstancesNotSupported(instanceType string) error { + return errors.WithStack(&errors.Error{ + Kind: ErrTrainiumInstancesNotSupported, + Message: fmt.Sprintf("Trainium instances (including %s) are not supported by cortex", instanceType), + }) +} + func ErrorConfiguredWhenSpotIsNotEnabled(configKey string) error { return errors.WithStack(&errors.Error{ Kind: ErrConfiguredWhenSpotIsNotEnabled, From f9b88e27e8376182889a7dc6e13e21e3c39afc6e Mon Sep 17 00:00:00 2001 From: David Eliahu Date: Thu, 6 Jan 2022 12:54:20 -0800 Subject: [PATCH 11/11] Nits --- cli/cmd/cluster.go | 22 +++++++++++----------- cli/cmd/lib_cluster_config.go | 4 ++-- docs/clusters/management/create.md | 6 +++--- docs/clusters/management/production.md | 2 +- docs/clusters/networking/api-gateway.md | 2 -- docs/clusters/networking/load-balancers.md | 2 +- docs/overview.md | 2 +- pkg/health/health.go | 17 +++++++++++------ 8 files changed, 30 insertions(+), 27 deletions(-) diff --git a/cli/cmd/cluster.go b/cli/cmd/cluster.go index e509060607..3240c560de 100644 --- a/cli/cmd/cluster.go +++ b/cli/cmd/cluster.go @@ -303,7 +303,7 @@ var _clusterUpCmd = &cobra.Command{ exit.Error(ErrorClusterUp(out + helpStr)) } - loadBalancer, err := getLoadBalancerV2(clusterConfig.ClusterName, OperatorLoadBalancer, awsClient) + loadBalancer, err := getNLBLoadBalancer(clusterConfig.ClusterName, OperatorLoadBalancer, awsClient) if err != nil { exit.Error(errors.Append(err, fmt.Sprintf("\n\nyou can attempt to resolve this issue and configure your cli environment by running `cortex cluster info --configure-env %s`", envName))) } @@ -523,7 +523,7 @@ var _clusterDownCmd = &cobra.Command{ } // updating CLI env is best-effort, so ignore errors - loadBalancer, _ := getLoadBalancerV2(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) + loadBalancer, _ := getNLBLoadBalancer(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) fmt.Print("○ deleting sqs queues ... ") numDeleted, err := awsClient.DeleteQueuesWithPrefix(clusterconfig.SQSNamePrefix(accessConfig.ClusterName)) @@ -736,7 +736,7 @@ var _clusterExportCmd = &cobra.Command{ exit.Error(err) } - loadBalancer, err := getLoadBalancerV2(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) + loadBalancer, err := getNLBLoadBalancer(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) if err != nil { exit.Error(err) } @@ -882,7 +882,7 @@ func cmdPrintConfig(awsClient *awslib.Client, accessConfig *clusterconfig.Access func cmdInfo(awsClient *awslib.Client, accessConfig *clusterconfig.AccessConfig, stacks clusterstate.ClusterStacks, outputType flags.OutputType, disallowPrompt bool) { clusterConfig := refreshCachedClusterConfig(awsClient, accessConfig, outputType == flags.PrettyOutputType) - operatorLoadBalancer, err := getLoadBalancerV2(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) + operatorLoadBalancer, err := getNLBLoadBalancer(accessConfig.ClusterName, OperatorLoadBalancer, awsClient) if err != nil { exit.Error(err) } @@ -890,14 +890,14 @@ func cmdInfo(awsClient *awslib.Client, accessConfig *clusterconfig.AccessConfig, var apiEndpoint string if clusterConfig.APILoadBalancerType == clusterconfig.NLBLoadBalancerType { - apiLoadBalancer, err := getLoadBalancerV2(accessConfig.ClusterName, APILoadBalancer, awsClient) + apiLoadBalancer, err := getNLBLoadBalancer(accessConfig.ClusterName, APILoadBalancer, awsClient) if err != nil { exit.Error(err) } apiEndpoint = *apiLoadBalancer.DNSName } - if clusterConfig.APILoadBalancerType == clusterconfig.NLBLoadBalancerType { - apiLoadBalancer, err := getLoadBalancer(accessConfig.ClusterName, APILoadBalancer, awsClient) + if clusterConfig.APILoadBalancerType == clusterconfig.ELBLoadBalancerType { + apiLoadBalancer, err := getELBLoadBalancer(accessConfig.ClusterName, APILoadBalancer, awsClient) if err != nil { exit.Error(err) } @@ -1059,8 +1059,8 @@ func printInfoPricing(infoResponse *schema.InfoResponse, clusterConfig clusterco rows = append(rows, []interface{}{fmt.Sprintf("%d t3.medium %s (cortex system)", len(infoResponse.OperatorNodeInfos), s.PluralS("instance", len(infoResponse.OperatorNodeInfos))), s.DollarsAndTenthsOfCents(operatorNodeGroupPrice) + " total"}) rows = append(rows, []interface{}{fmt.Sprintf("1 %s instance (prometheus)", clusterConfig.PrometheusInstanceType), s.DollarsAndTenthsOfCents(prometheusNodeGroupPrice)}) if usesELBForAPILoadBalancer { - rows = append(rows, []interface{}{"1 network load balancer", s.DollarsMaxPrecision(nlbPrice) + " total"}) - rows = append(rows, []interface{}{"1 classic load balancer", s.DollarsMaxPrecision(elbPrice) + " total"}) + rows = append(rows, []interface{}{"1 network load balancer", s.DollarsMaxPrecision(nlbPrice)}) + rows = append(rows, []interface{}{"1 classic load balancer", s.DollarsMaxPrecision(elbPrice)}) } else { rows = append(rows, []interface{}{"2 network load balancers", s.DollarsMaxPrecision(loadBalancersPrice) + " total"}) } @@ -1391,7 +1391,7 @@ func (lb LoadBalancer) String() string { } // Will return error if the load balancer can't be found -func getLoadBalancerV2(clusterName string, whichLB LoadBalancer, awsClient *awslib.Client) (*elbv2.LoadBalancer, error) { +func getNLBLoadBalancer(clusterName string, whichLB LoadBalancer, awsClient *awslib.Client) (*elbv2.LoadBalancer, error) { loadBalancer, err := awsClient.FindLoadBalancerV2(map[string]string{ clusterconfig.ClusterNameTag: clusterName, "cortex.dev/load-balancer": whichLB.String(), @@ -1408,7 +1408,7 @@ func getLoadBalancerV2(clusterName string, whichLB LoadBalancer, awsClient *awsl } // Will return error if the load balancer can't be found -func getLoadBalancer(clusterName string, whichLB LoadBalancer, awsClient *awslib.Client) (*elb.LoadBalancerDescription, error) { +func getELBLoadBalancer(clusterName string, whichLB LoadBalancer, awsClient *awslib.Client) (*elb.LoadBalancerDescription, error) { loadBalancer, err := awsClient.FindLoadBalancer(map[string]string{ clusterconfig.ClusterNameTag: clusterName, "cortex.dev/load-balancer": whichLB.String(), diff --git a/cli/cmd/lib_cluster_config.go b/cli/cmd/lib_cluster_config.go index 6dc4c2a732..3a3f5f7686 100644 --- a/cli/cmd/lib_cluster_config.go +++ b/cli/cmd/lib_cluster_config.go @@ -246,8 +246,8 @@ func confirmInstallClusterConfig(clusterConfig *clusterconfig.Config, awsClient rows = append(rows, []interface{}{"2 t3.medium instances (cortex system)", s.DollarsAndTenthsOfCents(operatorNodeGroupPrice) + " total"}) rows = append(rows, []interface{}{fmt.Sprintf("1 %s instance (prometheus)", clusterConfig.PrometheusInstanceType), s.DollarsAndTenthsOfCents(prometheusNodeGroupPrice)}) if usesELBForAPILoadBalancer { - rows = append(rows, []interface{}{"1 network load balancer", s.DollarsMaxPrecision(nlbPrice) + " total"}) - rows = append(rows, []interface{}{"1 classic load balancer", s.DollarsMaxPrecision(elbPrice) + " total"}) + rows = append(rows, []interface{}{"1 network load balancer", s.DollarsMaxPrecision(nlbPrice)}) + rows = append(rows, []interface{}{"1 classic load balancer", s.DollarsMaxPrecision(elbPrice)}) } else { rows = append(rows, []interface{}{"2 network load balancers", s.DollarsMaxPrecision(loadBalancersPrice) + " total"}) } diff --git a/docs/clusters/management/create.md b/docs/clusters/management/create.md index 6528cadb6b..069c947e46 100644 --- a/docs/clusters/management/create.md +++ b/docs/clusters/management/create.md @@ -58,12 +58,12 @@ subnet_visibility: public # NAT gateway (required when using private subnets) [none | single | highly_available (a NAT gateway per availability zone)] nat_gateway: none -# API load balancer scheme [internet-facing | internal] -api_load_balancer_scheme: internet-facing - # API load balancer type [nlb | elb] api_load_balancer_type: nlb +# API load balancer scheme [internet-facing | internal] +api_load_balancer_scheme: internet-facing + # operator load balancer scheme [internet-facing | internal] # note: if using "internal", you must configure VPC Peering to connect your CLI to your cluster operator operator_load_balancer_scheme: internet-facing diff --git a/docs/clusters/management/production.md b/docs/clusters/management/production.md index 5445b73965..0770f61c25 100644 --- a/docs/clusters/management/production.md +++ b/docs/clusters/management/production.md @@ -47,7 +47,7 @@ See [here](../networking/load-balancers.md) for more information about the load ### Workload load-balancing -Depending on your application's requirements, you might have different needs from the cluster's api load balancer. By default, the api load balancer is a [Network load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html) (NLB) that works at L4 and it's highly performant. Alternatively, a [Classic load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/introduction.html) (ELB) can be set `api_load_balancer_type: elb` in your cluster config. An ELB works at both L4 and L7 layers, but it's less performant. This selection can only be made before spinning up your cluster. +Depending on your application's requirements, you might have different needs from the cluster's api load balancer. By default, the api load balancer is a [Network load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html) (NLB). In some situations, a [Classic load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/introduction.html) (ELB) may be preferred, and can be selected in your cluster config by setting `api_load_balancer_type: elb`. This selection can only be made before creating your cluster. ### Ensure node provisioning diff --git a/docs/clusters/networking/api-gateway.md b/docs/clusters/networking/api-gateway.md index c403bb6e49..c6bbf0ce26 100644 --- a/docs/clusters/networking/api-gateway.md +++ b/docs/clusters/networking/api-gateway.md @@ -4,8 +4,6 @@ This guide shows how set up AWS API Gateway for your Cortex APIs, which is the s Please note that one limitation of API Gateway is that there is a 30-second time limit for all requests. -A requirement that needs to be met for this guide is that the `api_load_balancer_type` field has to be set to `nlb` in your cluster configuration file before creating the cluster. By default, the field is set to `nlb`. - If your API load balancer is internet-facing (which is the default, or you set `api_load_balancer_scheme: internet-facing` in your cluster configuration file before creating your cluster), use the [first section](#internet-facing-load-balancer) of this guide. If your API load balancer is internal (i.e. you set `api_load_balancer_scheme: internal` in your cluster configuration file before creating your cluster), use the [second section](#internal-load-balancer) of this guide. diff --git a/docs/clusters/networking/load-balancers.md b/docs/clusters/networking/load-balancers.md index 854d40b3ba..610671c489 100644 --- a/docs/clusters/networking/load-balancers.md +++ b/docs/clusters/networking/load-balancers.md @@ -8,4 +8,4 @@ The SSL certificate on the API load balancer is autogenerated during installatio There is a separate load balancer for the Cortex operator. By default, the operator load balancer is public. You can configure your operator load balancer to be private by setting `operator_load_balancer_scheme: internal` in your cluster configuration file (before creating your cluster). You can use [VPC Peering](vpc-peering.md) to enable your Cortex CLI to connect to your cluster operator from another VPC. You can enforce that incoming requests to the Cortex operator must originate from specific ip address ranges by specifying `operator_load_balancer_cidr_white_list: []` in your cluster configuration. -A difference between the operator load balancer and the api load balancer is that the latter can also be configured to be of a different type. By default, both load balancers are [Network load balancers](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html) (NLB), but the api load balancer can optionally be configured as a [Classic load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/introduction.html) (ELB). This option gives the user access to a wider range of load-balancing functionalities that a single type cannot cover. The api load balancer type can only be specified before creating your cluster and not while it's running. +By default, the API load balancer and Operator load balancer are both [Network load balancers](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/introduction.html) (NLB). The api load balancer can be configured as a [Classic load balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/introduction.html) (ELB) instead if desired. The API load balancer type must be specified before creating your cluster. diff --git a/docs/overview.md b/docs/overview.md index 23bb7f29fe..361afa4d7f 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -14,7 +14,7 @@ Cortex uses the Kubernetes Cluster Autoscaler to scale the appropriate node grou By default, a new dedicated VPC is created for the cluster during installation. -Two network load balancers (NLBs) are created to route traffic to the cluster. One load balancer is dedicated for traffic to your APIs, and the other load balancer is dedicated for API management requests to Cortex from your CLI or Python client. Optionally, the API load balancer can be a classic load balancer (ELB). Traffic to the load balancers can be secured and restricted based on your cluster configuration. +Two AWS load balancers are created to route traffic to the cluster. One load balancer is dedicated for traffic to your APIs, and the other load balancer is dedicated for API management requests to Cortex from your CLI or Python client. Traffic to the load balancers can be secured and restricted based on your cluster configuration. ### Observability diff --git a/pkg/health/health.go b/pkg/health/health.go index f0dcc93fa1..2bea475a38 100644 --- a/pkg/health/health.go +++ b/pkg/health/health.go @@ -293,14 +293,16 @@ func getLoadBalancerHealth(awsClient *awslib.Client, clusterName string, loadBal "cortex.dev/load-balancer": loadBalancerName, }) loadBalancerV2Exists := err == nil && loadBalancerV2 != nil - if !testClassicLB && !loadBalancerV2Exists { - return false, errors.Wrap(err, fmt.Sprintf("unable to locate %s nlb load balancer", loadBalancerName)) - } - if loadBalancerV2Exists && aws.IsLoadBalancerV2Healthy(*loadBalancerV2) { - return true, nil + + if loadBalancerV2Exists { + return aws.IsLoadBalancerV2Healthy(*loadBalancerV2), nil } + if !testClassicLB { - return false, nil + if err == nil { + return false, errors.ErrorUnexpected(fmt.Sprintf("unable to locate %s nlb load balancer", loadBalancerName)) + } + return false, errors.Wrap(err, fmt.Sprintf("unable to locate %s nlb load balancer", loadBalancerName)) } loadBalancer, err := awsClient.FindLoadBalancer(map[string]string{ @@ -309,6 +311,9 @@ func getLoadBalancerHealth(awsClient *awslib.Client, clusterName string, loadBal }) loadBalancerExists := err == nil && loadBalancer != nil if !loadBalancerExists { + if err == nil { + return false, errors.ErrorUnexpected(fmt.Sprintf("unable to locate %s elb load balancer", loadBalancerName)) + } return false, errors.Wrap(err, fmt.Sprintf("unable to locate %s elb load balancer", loadBalancerName)) } healthy, err := awsClient.IsLoadBalancerHealthy(*loadBalancer.LoadBalancerName)