You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement 'no-limit' and 'max' options for CPU/Memory (#183)
* implement no-limit and max for memory
* remove unused transform/validate functions
* update test output
* add tests for memory util
* regenerate schema
* ensure quotes are escaped during build
* revert cpu type temporarily
* feat: Add CPU max and no-limit support with new state utility function
* fix: Parse CPU string to integer in GetCPUs function
* fix: Handle negative CPU count and error cases in GetCPUs function
* chore: Import fmt package for potential error formatting in CPU utility
* feat: Add memory converter and validator utility functions with comprehensive tests
* feat: Update minikube cluster schema with memory and CPU type improvements
* test: Add unit tests for memory and CPU configuration scenarios in minikube cluster
* test: Update test configurations for memory and CPU limit scenarios
* test: Enhance cluster tests with memory and CPU configurations, integrating new state utilities for validation and conversion
Description: "Amount of RAM to allocate to Kubernetes (format: <number>[<unit>(case-insensitive)], where unit = b, k, kb, m, mb, g or gb)",
61
+
Description: "Amount of RAM to allocate to Kubernetes (format: <number>[<unit>], where unit = b, k, m or g). Use \\\"max\\\" to use the maximum amount of memory. Use \\\"no-limit\\\" to not specify a limit (Docker/Podman only))",
Description: "Amount of CPUs to allocate to Kubernetes",
76
-
Type: Int,
74
+
Default: "2",
75
+
Description: "Number of CPUs allocated to Kubernetes. Use \\\"max\\\" to use the maximum number of CPUs. Use \\\"no-limit\\\" to not specify a limit (Docker/Podman only)",
76
+
Type: String,
77
+
StateFunc: "state_utils.CPUConverter()",
78
+
ValidateDiagFunc: "state_utils.CPUValidator()",
77
79
},
78
80
// Customize the description to be the fullset of drivers
Description: "Amount of RAM to allocate to Kubernetes (format: <number>[<unit>(case-insensitive)], where unit = b, k, kb, m, mb, g or gb)",
363
+
Description: "Amount of RAM to allocate to Kubernetes (format: <number>[<unit>], where unit = b, k, m or g). Use \"max\" to use the maximum amount of memory. Use \"no-limit\" to not specify a limit (Docker/Podman only))",
Description: "Amount of CPUs to allocate to Kubernetes",
194
+
Type: schema.TypeString,
195
+
Description: "Number of CPUs allocated to Kubernetes. Use \"max\"to use the maximum number of CPUs. Use \"no-limit\" to not specify a limit (Docker/Podman only)",
196
196
197
197
Optional: true,
198
198
ForceNew: true,
199
199
200
-
Default: 2,
200
+
Default: "2",
201
+
StateFunc: state_utils.CPUConverter(),
202
+
ValidateDiagFunc: state_utils.CPUValidator(),
201
203
},
202
204
203
205
"cri_socket": {
@@ -413,7 +415,7 @@ var (
413
415
414
416
"gpus": {
415
417
Type: schema.TypeString,
416
-
Description: "Allow pods to use your NVIDIA GPUs. Options include: [all,nvidia] (Docker driver with Docker container-runtime only)",
418
+
Description: "Allow pods to use your GPUs. Options include: [all,nvidia,amd] (Docker driver with Docker container-runtime only)",
417
419
418
420
Optional: true,
419
421
ForceNew: true,
@@ -598,7 +600,7 @@ var (
598
600
599
601
"kubernetes_version": {
600
602
Type: schema.TypeString,
601
-
Description: "The Kubernetes version that the minikube VM will use (ex: v1.2.3, 'stable' for v1.31.0, 'latest' for v1.31.0). Defaults to 'stable'.",
603
+
Description: "The Kubernetes version that the minikube VM will use (ex: v1.2.3, 'stable' for v1.32.0, 'latest' for v1.32.0). Defaults to 'stable'.",
602
604
603
605
Optional: true,
604
606
ForceNew: true,
@@ -668,14 +670,14 @@ var (
668
670
669
671
"memory": {
670
672
Type: schema.TypeString,
671
-
Description: "Amount of RAM to allocate to Kubernetes (format: <number>[<unit>(case-insensitive)], where unit = b, k, kb, m, mb, g or gb)",
673
+
Description: "Amount of RAM to allocate to Kubernetes (format: <number>[<unit>], where unit = b, k, m or g). Use \"max\" to use the maximum amount of memory. Use \"no-limit\" to not specify a limit (Docker/Podman only))",
0 commit comments