Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
433ac0b
Use cortexlabs's version kubexit
vishalbollu Jun 18, 2021
a30641b
Add newline
vishalbollu Jun 18, 2021
3c754a9
Add comment describing where the dockerfile is from
vishalbollu Jun 18, 2021
233bae6
Merge branch 'master' into build-cortexlabs-kubexit
vishalbollu Jun 18, 2021
46609de
WIP on the addition of arm instances
RobertLucian Jun 18, 2021
1ddc52b
Add target os/arch to async gateway
RobertLucian Jun 18, 2021
4e54300
Merge branch 'build-cortexlabs-kubexit' into feature/arm-instances
RobertLucian Jun 18, 2021
6069f8b
Add Amr64 AMI images
RobertLucian Jun 18, 2021
463f193
Build kube-rbac-proxy for amd64/arm64
RobertLucian Jun 18, 2021
cef68f8
Add kube-proxy to eks template and update vpc-cni
RobertLucian Jun 21, 2021
fcb4e5a
Makefile changes
RobertLucian Jun 21, 2021
ba9edce
Uncomment images
RobertLucian Jun 21, 2021
5672309
WIP arm instances
RobertLucian Jun 21, 2021
d0e37b8
Simplify registry.sh script
RobertLucian Jun 21, 2021
ba7cf0a
Changes to make-ci-* cmds
RobertLucian Jun 21, 2021
3dd47a9
Fixes and nits
RobertLucian Jun 21, 2021
26e0758
Fixes
RobertLucian Jun 21, 2021
f8747bf
Remove cache builder from registry.sh
RobertLucian Jun 21, 2021
05ef1ba
Nits
RobertLucian Jun 21, 2021
18b759a
Fix
RobertLucian Jun 21, 2021
69df020
Nits
RobertLucian Jun 21, 2021
c4e5571
Revert empty line
RobertLucian Jun 21, 2021
0d5076d
Fixes
RobertLucian Jun 21, 2021
fdf2da9
Update messages
deliahu Jun 21, 2021
2f41154
Go get vpc cni 1.8.0
RobertLucian Jun 21, 2021
e9eb643
Block mac instances
deliahu Jun 21, 2021
036a9b7
Add back the Arm validator utility function
RobertLucian Jun 21, 2021
fc5b8d8
Nits and fixes
RobertLucian Jun 22, 2021
7e775f7
Fix arm hello-world test api
RobertLucian Jun 22, 2021
dcca924
Fix cluster configure cmd
RobertLucian Jun 22, 2021
f2859f1
Merge branch 'master' into feature/arm-instances
RobertLucian Jun 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Block mac instances
  • Loading branch information
deliahu committed Jun 21, 2021
commit e9eb6437d9ae5ed924f2a769da4e5333c3d3ca6c
2 changes: 1 addition & 1 deletion dev/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ see https://github.com/moby/moby/issues/39302#issuecomment-639687466_
1. `rm -rf go.mod go.sum && go mod init && go clean -modcache`
1. `go get k8s.io/client-go@v0.17.6 && go get k8s.io/apimachinery@v0.17.6 && go get k8s.io/api@v0.17.6`
1. `go get istio.io/client-go@1.7.3 && go get istio.io/api@1.7.3`
1. `go get github.com/aws/amazon-vpc-cni-k8s/pkg/awsutils@v1.7.10`
1. `go get github.com/aws/amazon-vpc-cni-k8s/pkg/awsutils@v1.8.0`
1. `go get github.com/cortexlabs/yaml@581aea36a2e4db10f8696587e48cac5248d64f4d`
1. `go get github.com/cortexlabs/go-input@8b67a7a7b28d1c45f5c588171b3b50148462b247`
1. `echo -e '\nreplace github.com/docker/docker => github.com/docker/engine v19.03.12' >> go.mod`
Expand Down
13 changes: 13 additions & 0 deletions pkg/lib/aws/ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,19 @@ func IsAMDGPUInstance(instanceType string) (bool, error) {
return false, nil
}

func IsMacInstance(instanceType string) (bool, error) {
parsedType, err := ParseInstanceType(instanceType)
if err != nil {
return false, err
}

if parsedType.Family == "mac" {
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)},
Expand Down
8 changes: 8 additions & 0 deletions pkg/types/clusterconfig/cluster_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,14 @@ func validateInstanceType(instanceType string) (string, error) {
return "", ErrorAMDGPUInstancesNotSupported(instanceType)
}

isMac, err := aws.IsMacInstance(instanceType)
if err != nil {
return "", err
}
if isMac {
return "", ErrorMacInstancesNotSupported(instanceType)
}

if _, ok := awsutils.InstanceNetworkingLimits[instanceType]; !ok {
return "", ErrorInstanceTypeNotSupportedByCortex(instanceType)
}
Expand Down
8 changes: 8 additions & 0 deletions pkg/types/clusterconfig/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const (
ErrSpotPriceGreaterThanMaxPrice = "clusterconfig.spot_price_greater_than_max_price"
ErrInstanceTypeNotSupportedByCortex = "clusterconfig.instance_type_not_supported_by_cortex"
ErrAMDGPUInstancesNotSupported = "clusterconfig.amd_gpu_instances_not_supported"
ErrMacInstancesNotSupported = "clusterconfig.mac_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"
Expand Down Expand Up @@ -209,6 +210,13 @@ func ErrorAMDGPUInstancesNotSupported(instanceType string) error {
})
}

func ErrorMacInstancesNotSupported(instanceType string) error {
return errors.WithStack(&errors.Error{
Kind: ErrMacInstancesNotSupported,
Message: fmt.Sprintf("mac instances (including %s) are not supported by cortex", instanceType),
})
}

func ErrorConfiguredWhenSpotIsNotEnabled(configKey string) error {
return errors.WithStack(&errors.Error{
Kind: ErrConfiguredWhenSpotIsNotEnabled,
Expand Down