Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SKS nodepool: allow specifying kubelet image gc parameters on creation (
#586) # Description <!-- * Prefix: the title with the component name being changed. Add a short and self describing sentence to ease the review * Please add a few lines providing context and describing the change * Please self comment changes whenever applicable to help with the review process * Please keep the checklist as part of the PR. Tick what applies to this change. --> Adds the following flags: On SKS Cluster creation: * nodepool-image-gc-low-threshold * nodepool-image-gc-high-threshold * nodepool-image-gc-min-age The equivalent on SKS Nodepool add: * image-gc-low-threshold * image-gc-high-threshold * image-gc-min-age ## Checklist (For exoscale contributors) * [x] Changelog updated (under *Unreleased* block) * [x] Testing ## Testing <!-- Describe the tests you did --> ``` # creating with custom gc params ➜ ~/exo/cli git:(tgrondier/sc-66948/cli) go run . compute sks create my-test-cluster \ --zone de-muc-1 \ --service-level starter \ --nodepool-name my-test-nodepool \ --nodepool-size 3 \ --nodepool-security-group sks-security-group --nodepool-image-gc-high-threshold 66 --nodepool-image-gc-low-threshold 33 --nodepool-image-gc-min-age "6m" ✔ Creating SKS cluster "my-test-cluster"... 2m3s ✔ Adding Nodepool "my-test-nodepool"... 33s ┼───────────────┼──────────────────────────────────────────────────────────────────┼ │ SKS CLUSTER │ │ ┼───────────────┼──────────────────────────────────────────────────────────────────┼ │ ID │ f9a80f9c-c51a-4245-93c1-a99bf22f57d7 │ │ Name │ my-test-cluster │ │ Description │ │ │ Zone │ de-muc-1 │ │ Creation Date │ 2024-04-08 08:04:24 +0000 UTC │ │ Auto-upgrade │ false │ │ Endpoint │ https://f9a80f9c-c51a-4245-93c1-a99bf22f57d7.sks-de-muc-1.exo.io │ │ Version │ 1.29.2 │ │ Service Level │ starter │ │ CNI │ calico │ │ Add-Ons │ exoscale-cloud-controller │ │ │ metrics-server │ │ State │ running │ │ Labels │ n/a │ │ Nodepools │ edb63168-65ae-4650-a30f-0b2bb479d01e | my-test-nodepool │ ┼───────────────┼──────────────────────────────────────────────────────────────────┼ ➜ ~/exo/cli git:(tgrondier/sc-66948/cli) go run . compute sks nodepool show my-test-cluster my-test-nodepool ┼─────────────────────────┼──────────────────────────────────────┼ │ SKS NODEPOOL │ │ ┼─────────────────────────┼──────────────────────────────────────┼ │ ID │ edb63168-65ae-4650-a30f-0b2bb479d01e │ │ Name │ my-test-nodepool │ │ Description │ │ │ Creation Date │ 2024-04-08 08:06:28 +0000 UTC │ │ Instance Pool ID │ 8b386584-117d-44f2-aa32-575b045abf01 │ │ Instance Prefix │ pool │ │ Instance Type │ medium │ │ Template │ sks-node-1.29.jammy │ │ Disk Size │ 50 │ │ Anti Affinity Groups │ n/a │ │ Security Groups │ sks-security-group │ │ Private Networks │ n/a │ │ Version │ 1.29.2 │ │ Size │ 3 │ │ State │ running │ │ Taints │ n/a │ │ Labels │ n/a │ │ Add Ons │ n/a │ │ Image GC Min │ 6m │ │ Image Gc Low Threshold │ 33 │ │ Image Gc High Threshold │ 66 │ ┼─────────────────────────┼──────────────────────────────────────┼ # creating with default values ➜ ~/exo/cli git:(tgrondier/sc-66948/cli) go run . compute sks create my-test-cluster \ --zone de-muc-1 \ --service-level starter \ --nodepool-name my-test-nodepool \ --nodepool-size 1 \ --nodepool-security-group sks-security-group ✔ Creating SKS cluster "my-test-cluster"... 2m0s ✔ Adding Nodepool "my-test-nodepool"... 24s ┼───────────────┼──────────────────────────────────────────────────────────────────┼ │ SKS CLUSTER │ │ ┼───────────────┼──────────────────────────────────────────────────────────────────┼ │ ID │ 7f55fe93-d0ea-494c-ab80-e798e3291404 │ │ Name │ my-test-cluster │ │ Description │ │ │ Zone │ de-muc-1 │ │ Creation Date │ 2024-04-08 07:59:42 +0000 UTC │ │ Auto-upgrade │ false │ │ Endpoint │ https://7f55fe93-d0ea-494c-ab80-e798e3291404.sks-de-muc-1.exo.io │ │ Version │ 1.29.2 │ │ Service Level │ starter │ │ CNI │ calico │ │ Add-Ons │ exoscale-cloud-controller │ │ │ metrics-server │ │ State │ running │ │ Labels │ n/a │ │ Nodepools │ c7fcd079-29eb-490a-96a0-0444e1875c6d | my-test-nodepool │ ┼───────────────┼──────────────────────────────────────────────────────────────────┼ ➜ ~/exo/cli git:(tgrondier/sc-66948/cli) go run . compute sks nodepool show my-test-cluster my-test-nodepool ┼─────────────────────────┼──────────────────────────────────────┼ │ SKS NODEPOOL │ │ ┼─────────────────────────┼──────────────────────────────────────┼ │ ID │ c7fcd079-29eb-490a-96a0-0444e1875c6d │ │ Name │ my-test-nodepool │ │ Description │ │ │ Creation Date │ 2024-04-08 08:01:43 +0000 UTC │ │ Instance Pool ID │ a2a738e0-3708-45a4-af1c-d02f67f0bffb │ │ Instance Prefix │ pool │ │ Instance Type │ medium │ │ Template │ sks-node-1.29.jammy │ │ Disk Size │ 50 │ │ Anti Affinity Groups │ n/a │ │ Security Groups │ sks-security-group │ │ Private Networks │ n/a │ │ Version │ 1.29.2 │ │ Size │ 1 │ │ State │ running │ │ Taints │ n/a │ │ Labels │ n/a │ │ Add Ons │ n/a │ │ Image GC Min │ 2m │ │ Image Gc Low Threshold │ 80 │ │ Image Gc High Threshold │ 85 │ ┼─────────────────────────┼──────────────────────────────────────┼ # adding nodepool with custom gc params ➜ ~/exo/cli git:(tgrondier/sc-66948/cli) go run . compute sks nodepool add my-test-cluster my-test-bar --size 1 --image-gc-high-threshold 90 --image-gc-low-threshold 70 --image-gc-min-age "3m" ✔ Adding Nodepool "my-test-bar"... 24s ┼─────────────────────────┼──────────────────────────────────────┼ │ SKS NODEPOOL │ │ ┼─────────────────────────┼──────────────────────────────────────┼ │ ID │ 8536338b-f865-41fa-a2b6-bb075161de8c │ │ Name │ my-test-bar │ │ Description │ │ │ Creation Date │ 2024-04-08 08:02:45 +0000 UTC │ │ Instance Pool ID │ 37ec10e5-7465-480a-b1ec-00eb0634f4f9 │ │ Instance Prefix │ pool │ │ Instance Type │ medium │ │ Template │ sks-node-1.29.jammy │ │ Disk Size │ 50 │ │ Anti Affinity Groups │ n/a │ │ Security Groups │ n/a │ │ Private Networks │ n/a │ │ Version │ 1.29.2 │ │ Size │ 1 │ │ State │ running │ │ Taints │ n/a │ │ Labels │ n/a │ │ Add Ons │ n/a │ │ Image GC Min │ 3m │ │ Image Gc Low Threshold │ 70 │ │ Image Gc High Threshold │ 90 │ ┼─────────────────────────┼──────────────────────────────────────┼ # adding nodepool with default params ➜ ~/exo/cli git:(tgrondier/sc-66948/cli) go run . compute sks nodepool add my-test-cluster my-test-bar --size 1 ✔ Adding Nodepool "my-test-bar"... 27s ┼─────────────────────────┼──────────────────────────────────────┼ │ SKS NODEPOOL │ │ ┼─────────────────────────┼──────────────────────────────────────┼ │ ID │ 10e64207-8d67-4372-affd-f5cf4338f746 │ │ Name │ my-test-bar │ │ Description │ │ │ Creation Date │ 2024-04-08 08:07:59 +0000 UTC │ │ Instance Pool ID │ 0d324d1f-a870-4216-9d43-66bae836b4c9 │ │ Instance Prefix │ pool │ │ Instance Type │ medium │ │ Template │ sks-node-1.29.jammy │ │ Disk Size │ 50 │ │ Anti Affinity Groups │ n/a │ │ Security Groups │ n/a │ │ Private Networks │ n/a │ │ Version │ 1.29.2 │ │ Size │ 1 │ │ State │ running │ │ Taints │ n/a │ │ Labels │ n/a │ │ Add Ons │ n/a │ │ Image GC Min │ 2m │ │ Image Gc Low Threshold │ 80 │ │ Image Gc High Threshold │ 85 │ ┼─────────────────────────┼──────────────────────────────────────┼ ```
- Loading branch information