Skip to content

Commit 28ba4e8

Browse files
maaftmaaft
authored andcommitted
CI checks
1 parent c3208e9 commit 28ba4e8

File tree

5 files changed

+24
-20
lines changed

5 files changed

+24
-20
lines changed

cluster-autoscaler/cloudprovider/datacrunch/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Configure node pools via JSON configuration:
123123
| `taints` | []object | Kubernetes taints that created nodes will have |
124124
| `labels` | map | Labels that created nodes will have |
125125

126-
**Note**: It's your responsibilty to make sure that override_num_gpus (if used), taints and labels are correct. This is usually done as part of your startup-script.
126+
**Note**: It's your responsibility to make sure that override_num_gpus (if used), taints and labels are correct. This is usually done as part of your startup-script.
127127

128128
### Command Line Arguments
129129

cluster-autoscaler/cloudprovider/datacrunch/datacrunch-go/types.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,36 +33,35 @@ type Instance struct {
3333
Pricing string `json:"pricing"`
3434
}
3535

36+
// CPU represents a CPU in DataCrunch.
3637
type CPU struct {
3738
Description string `json:"description"`
3839
NumberOfCores int `json:"number_of_cores"`
3940
}
4041

42+
// GPU represents a GPU in DataCrunch.
4143
type GPU struct {
4244
Description string `json:"description"`
4345
NumberOfGPUs int `json:"number_of_gpus"`
4446
}
4547

48+
// GPUMem represents a GPU memory in DataCrunch.
4649
type GPUMem struct {
4750
Description string `json:"description"`
4851
SizeInGigabytes int `json:"size_in_gigabytes"`
4952
}
5053

54+
// Memory represents a memory in DataCrunch.
5155
type Memory struct {
5256
Description string `json:"description"`
5357
SizeInGigabytes int `json:"size_in_gigabytes"`
5458
}
5559

60+
// Storage represents a storage in DataCrunch.
5661
type Storage struct {
5762
Description string `json:"description"`
5863
}
5964

60-
type Location struct {
61-
Code string `json:"code"`
62-
Name string `json:"name"`
63-
CountryCode string `json:"country_code"`
64-
}
65-
6665
// InstanceList is a list of instances.
6766
type InstanceList []Instance
6867

@@ -84,11 +83,13 @@ type DeployInstanceRequest struct {
8483
Pricing string `json:"pricing,omitempty"`
8584
}
8685

86+
// OSVolume represents an OS volume in DataCrunch when creating a new instance.
8787
type OSVolume struct {
8888
Name string `json:"name"`
8989
Size int `json:"size"`
9090
}
9191

92+
// DeployVolume represents a deploy volume in DataCrunch when creating a new instance.
9293
type DeployVolume struct {
9394
Name string `json:"name"`
9495
Size int `json:"size"`
@@ -131,6 +132,7 @@ type InstanceType struct {
131132
DisplayName string `json:"display_name"`
132133
}
133134

135+
// InstanceTypeList is a list of instance types.
134136
type InstanceTypeList []InstanceType
135137

136138
// PriceHistoryEntry represents a price history entry for an instance type.
@@ -141,6 +143,7 @@ type PriceHistoryEntry struct {
141143
Currency string `json:"currency"`
142144
}
143145

146+
// PriceHistory is a map of instance types to price history entries.
144147
type PriceHistory map[string][]PriceHistoryEntry
145148

146149
// InstanceAvailability represents instance availability for a location.
@@ -149,6 +152,7 @@ type InstanceAvailability struct {
149152
Availabilities []string `json:"availabilities"`
150153
}
151154

155+
// InstanceAvailabilityList is a list of instance availabilities.
152156
type InstanceAvailabilityList []InstanceAvailability
153157

154158
// StartupScript represents a startup script in DataCrunch.

cluster-autoscaler/cloudprovider/datacrunch/datacrunch_manager.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,27 @@ type ClusterConfig struct {
4848
NodeConfigs map[string]*NodeConfig `json:"node_configs"`
4949
}
5050

51+
// InstanceOption is the option for the instance type
5152
type InstanceOption string
5253

5354
const (
54-
InstanceOptionPreferSpot InstanceOption = "prefer_spot"
55+
// InstanceOptionPreferSpot is the option to prefer spot instances
56+
InstanceOptionPreferSpot InstanceOption = "prefer_spot"
57+
// InstanceOptionPreferOnDemand is the option to prefer on-demand instances
5558
InstanceOptionPreferOnDemand InstanceOption = "prefer_on_demand"
56-
InstanceOptionSpotOnly InstanceOption = "spot_only"
57-
InstanceOptionOnDemandOnly InstanceOption = "on_demand_only"
59+
// InstanceOptionSpotOnly is the option to only use spot instances
60+
InstanceOptionSpotOnly InstanceOption = "spot_only"
61+
// InstanceOptionOnDemandOnly is the option to only use on-demand instances
62+
InstanceOptionOnDemandOnly InstanceOption = "on_demand_only"
5863
)
5964

65+
// PricingOption is the option for the pricing type
6066
type PricingOption string
6167

6268
const (
63-
PricingOptionFixed PricingOption = "fixed"
69+
// PricingOptionFixed is the option to use fixed pricing
70+
PricingOptionFixed PricingOption = "fixed"
71+
// PricingOptionDynamic is the option to use dynamic pricing
6472
PricingOptionDynamic PricingOption = "dynamic"
6573
)
6674

cluster-autoscaler/cloudprovider/datacrunch/datacrunch_node_group.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import (
3939
)
4040

4141
const (
42+
// ResourceGPU is the resource name for GPU
4243
ResourceGPU apiv1.ResourceName = "nvidia.com/gpu"
4344
)
4445

cluster-autoscaler/cloudprovider/datacrunch/examples/startup-script-server.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@ import (
1212
datacrunchclient "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/datacrunch/datacrunch-go"
1313
)
1414

15-
type ScriptRequest struct {
16-
// Optionally allow overrides in the future
17-
}
18-
19-
type ScriptResponse struct {
20-
Script string `json:"script"`
21-
ScriptID string `json:"script_id"`
22-
}
23-
2415
func main() {
2516
http.HandleFunc("/script", handleGenerateScript)
2617
port := os.Getenv("PORT")

0 commit comments

Comments
 (0)