Skip to content

Commit aaa382e

Browse files
authored
Misc cleanup (#2074)
1 parent 6336187 commit aaa382e

File tree

7 files changed

+26
-253
lines changed

7 files changed

+26
-253
lines changed

cli/cmd/cluster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ var _clusterCmd = &cobra.Command{
129129
}
130130

131131
var _clusterUpCmd = &cobra.Command{
132-
Use: "up [CLUSTER_CONFIG_FILE]",
132+
Use: "up CLUSTER_CONFIG_FILE",
133133
Short: "spin up a cluster on aws",
134134
Args: cobra.ExactArgs(1),
135135
Run: func(cmd *cobra.Command, args []string) {
@@ -743,7 +743,7 @@ func printInfoOperatorResponse(clusterConfig clusterconfig.Config, operatorEndpo
743743
infoResponse.ClusterConfig.Config = clusterConfig
744744

745745
fmt.Println(console.Bold("cluster config:"))
746-
fmt.Println(fmt.Sprintf("%s: %s", clusterconfig.APIVersionUserKey, infoResponse.ClusterConfig.APIVersion))
746+
fmt.Println(fmt.Sprintf("cluster version: %s", infoResponse.ClusterConfig.APIVersion))
747747
fmt.Print(yamlString)
748748

749749
printInfoPricing(infoResponse, clusterConfig)

docs/clients/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Flags:
9898
spin up a cluster on aws
9999
100100
Usage:
101-
cortex cluster up [CLUSTER_CONFIG_FILE] [flags]
101+
cortex cluster up CLUSTER_CONFIG_FILE [flags]
102102
103103
Flags:
104104
-e, --configure-env string name of environment to configure (default "aws")

docs/clusters/instances/spot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ node_groups:
77
- name: node-group-1
88

99
# whether to use spot instances for this node group (default: false)
10-
spot: false
10+
spot: false # this must be set to true to use spot instances
1111

1212
spot_config:
1313
# additional instance types with identical or better specs than the primary cluster instance type (defaults to only the primary instance type)

docs/clusters/management/create.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ node_groups:
3838
instance_volume_size: 50 # disk storage size per instance (GB)
3939
instance_volume_type: gp2 # instance volume type [gp2 | io1 | st1 | sc1]
4040
# instance_volume_iops: 3000 # instance volume iops (only applicable to io1)
41-
spot: false # enable spot instances
41+
spot: false # whether to use spot instances
4242

4343
- name: ng-gpu
4444
instance_type: g4dn.xlarge
@@ -48,15 +48,6 @@ node_groups:
4848
instance_volume_type: gp2
4949
# instance_volume_iops: 3000
5050
spot: false
51-
52-
- name: ng-inferentia
53-
instance_type: inf1.xlarge
54-
min_instances: 1
55-
max_instances: 5
56-
instance_volume_size: 50
57-
instance_volume_type: gp2
58-
# instance_volume_iops: 3000
59-
spot: false
6051
...
6152

6253
# subnet visibility [public (instances will have public IPs) | private (instances will not have public IPs)]

manager/refresh_cluster_config.py

Lines changed: 0 additions & 173 deletions
This file was deleted.

pkg/operator/resources/asyncapi/api.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,6 @@ func GetAllAPIs(pods []kcore.Pod, deployments []kapps.Deployment) ([]schema.APIR
218218
return nil, err
219219
}
220220

221-
//allMetrics, err := GetMultipleMetrics(apis)
222-
//if err != nil {
223-
// return nil, err
224-
//}
225-
226221
realtimeAPIs := make([]schema.APIResponse, len(apis))
227222

228223
for i := range apis {
@@ -233,9 +228,8 @@ func GetAllAPIs(pods []kcore.Pod, deployments []kapps.Deployment) ([]schema.APIR
233228
}
234229

235230
realtimeAPIs[i] = schema.APIResponse{
236-
Spec: api,
237-
Status: &statuses[i],
238-
//Metrics: &allMetrics[i],
231+
Spec: api,
232+
Status: &statuses[i],
239233
Endpoint: endpoint,
240234
}
241235
}

pkg/types/clusterconfig/config_key.go

Lines changed: 19 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -34,62 +34,23 @@ const (
3434
InstanceVolumeIOPSKey = "instance_volume_iops"
3535
InstancePoolsKey = "instance_pools"
3636
MaxPriceKey = "max_price"
37-
38-
NetworkKey = "network"
39-
SubnetKey = "subnet"
40-
TagsKey = "tags"
41-
ClusterNameKey = "cluster_name"
42-
RegionKey = "region"
43-
AvailabilityZonesKey = "availability_zones"
44-
SubnetsKey = "subnets"
45-
AvailabilityZoneKey = "availability_zone"
46-
SubnetIDKey = "subnet_id"
47-
SSLCertificateARNKey = "ssl_certificate_arn"
48-
CortexPolicyARNKey = "cortex_policy_arn"
49-
IAMPolicyARNsKey = "iam_policy_arns"
50-
BucketKey = "bucket"
51-
SubnetVisibilityKey = "subnet_visibility"
52-
NATGatewayKey = "nat_gateway"
53-
APILoadBalancerSchemeKey = "api_load_balancer_scheme"
54-
OperatorLoadBalancerSchemeKey = "operator_load_balancer_scheme"
55-
VPCCIDRKey = "vpc_cidr"
56-
TelemetryKey = "telemetry"
57-
58-
// User facing string
59-
NodeGroupsUserKey = "node groups"
60-
SpotUserKey = "use spot instances"
61-
InstanceTypeUserKey = "instance type"
62-
AcceleratorTypeUserKey = "accelerator type"
63-
AcceleratorsPerInstanceUserKey = "accelerators per instance"
64-
MinInstancesUserKey = "min instances"
65-
MaxInstancesUserKey = "max instances"
66-
InstanceVolumeSizeUserKey = "instance volume size (Gi)"
67-
InstanceVolumeTypeUserKey = "instance volume type"
68-
InstanceVolumeIOPSUserKey = "instance volume iops"
69-
InstanceDistributionUserKey = "spot instance distribution"
70-
OnDemandBaseCapacityUserKey = "spot on demand base capacity"
71-
OnDemandPercentageAboveBaseCapacityUserKey = "spot on demand percentage above base capacity"
72-
MaxPriceUserKey = "spot max price ($ per hour)"
73-
InstancePoolsUserKey = "spot instance pools"
74-
75-
APIVersionUserKey = "cluster version"
76-
ClusterNameUserKey = "cluster name"
77-
RegionUserKey = "aws region"
78-
AvailabilityZonesUserKey = "availability zones"
79-
AvailabilityZoneUserKey = "availability zone"
80-
SubnetsUserKey = "subnets"
81-
SubnetIDUserKey = "subnet id"
82-
TagsUserKey = "tags"
83-
SSLCertificateARNUserKey = "ssl certificate arn"
84-
CortexPolicyARNUserKey = "cortex policy arn"
85-
IAMPolicyARNsUserKey = "iam policy arns"
86-
BucketUserKey = "s3 bucket"
87-
NetworkUserKey = "network"
88-
SubnetUserKey = "subnet"
89-
SubnetVisibilityUserKey = "subnet visibility"
90-
NATGatewayUserKey = "nat gateway"
91-
APILoadBalancerSchemeUserKey = "api load balancer scheme"
92-
OperatorLoadBalancerSchemeUserKey = "operator load balancer scheme"
93-
VPCCIDRUserKey = "vpc cidr"
94-
TelemetryUserKey = "telemetry"
37+
NetworkKey = "network"
38+
SubnetKey = "subnet"
39+
TagsKey = "tags"
40+
ClusterNameKey = "cluster_name"
41+
RegionKey = "region"
42+
AvailabilityZonesKey = "availability_zones"
43+
SubnetsKey = "subnets"
44+
AvailabilityZoneKey = "availability_zone"
45+
SubnetIDKey = "subnet_id"
46+
SSLCertificateARNKey = "ssl_certificate_arn"
47+
CortexPolicyARNKey = "cortex_policy_arn"
48+
IAMPolicyARNsKey = "iam_policy_arns"
49+
BucketKey = "bucket"
50+
SubnetVisibilityKey = "subnet_visibility"
51+
NATGatewayKey = "nat_gateway"
52+
APILoadBalancerSchemeKey = "api_load_balancer_scheme"
53+
OperatorLoadBalancerSchemeKey = "operator_load_balancer_scheme"
54+
VPCCIDRKey = "vpc_cidr"
55+
TelemetryKey = "telemetry"
9556
)

0 commit comments

Comments
 (0)