From aedfa77bab2692b30ecc14fc766b3ed265408cc0 Mon Sep 17 00:00:00 2001 From: Ivan Stankov Date: Wed, 20 Dec 2023 07:43:53 +0200 Subject: [PATCH] Add a flag so Partial matching could be an opt-in feature --- castai/sdk/api.gen.go | 15 ++++++++++----- .../aks/aks_cluster_autoscaler_policies/castai.tf | 1 + .../eks/eks_cluster_autoscaler_policies/castai.tf | 1 + .../gke/gke_cluster_autoscaler_policies/castai.tf | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/castai/sdk/api.gen.go b/castai/sdk/api.gen.go index 4054d4d9..c4fd6afa 100644 --- a/castai/sdk/api.gen.go +++ b/castai/sdk/api.gen.go @@ -7,8 +7,6 @@ import ( "encoding/json" "fmt" "time" - - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" ) const ( @@ -1994,10 +1992,17 @@ type PoliciesV1Evictor struct { // Enable/disable the Evictor policy. This will either install or uninstall the Evictor component in your cluster. Enabled *bool `json:"enabled"` + // If enabled then Evictor will attempt to evict pods that have pod disruption budgets configured. + IgnorePodDisruptionBudgets *bool `json:"ignorePodDisruptionBudgets"` + // Configure the node grace period which controls the duration which must pass after a node has been created before // Evictor starts considering that node. NodeGracePeriodMinutes *int32 `json:"nodeGracePeriodMinutes"` + // Configure the pod eviction failure back off interval. If pod eviction fails then Evictor will attempt + // to evict it again after the amount of time specified here. + PodEvictionFailureBackOffInterval *string `json:"podEvictionFailureBackOffInterval"` + // Enable/disable scoped mode. By default, Evictor targets all nodes in the cluster. This mode will constrain in to // just the nodes which were created by CAST AI. ScopedMode *bool `json:"scopedMode"` @@ -2092,6 +2097,9 @@ type PoliciesV1Policies struct { // Node Downscaler defines policies for removing nodes based on the configured conditions. NodeDownscaler *PoliciesV1NodeDownscaler `json:"nodeDownscaler,omitempty"` + // Marks whether partial matching should be used when deciding which custom node template to select. + NodeTemplatesPartialMatchingEnabled *bool `json:"nodeTemplatesPartialMatchingEnabled"` + // Policy defining whether autoscaler can use spot instances for provisioning additional workloads. SpotInstances *PoliciesV1SpotInstances `json:"spotInstances,omitempty"` @@ -2317,9 +2325,6 @@ type ScheduledrebalancingV1TriggerConditions struct { SavingsPercentage *float32 `json:"savingsPercentage,omitempty"` } -// HeaderOrganizationId defines model for headerOrganizationId. -type HeaderOrganizationId = openapi_types.UUID - // AuthTokenAPIListAuthTokensParams defines parameters for AuthTokenAPIListAuthTokens. type AuthTokenAPIListAuthTokensParams struct { UserId *string `form:"userId,omitempty" json:"userId,omitempty"` diff --git a/examples/aks/aks_cluster_autoscaler_policies/castai.tf b/examples/aks/aks_cluster_autoscaler_policies/castai.tf index 3453ecb5..2886a879 100644 --- a/examples/aks/aks_cluster_autoscaler_policies/castai.tf +++ b/examples/aks/aks_cluster_autoscaler_policies/castai.tf @@ -128,6 +128,7 @@ module "castai-aks-cluster" { "scopedMode": false } }, + "nodeTemplatesPartialMatchingEnabled": false, "clusterLimits": { "cpu": { "maxCores": 20, diff --git a/examples/eks/eks_cluster_autoscaler_policies/castai.tf b/examples/eks/eks_cluster_autoscaler_policies/castai.tf index 665bf2e7..67058e0e 100644 --- a/examples/eks/eks_cluster_autoscaler_policies/castai.tf +++ b/examples/eks/eks_cluster_autoscaler_policies/castai.tf @@ -180,6 +180,7 @@ module "castai-eks-cluster" { "scopedMode": false } }, + "nodeTemplatesPartialMatchingEnabled": false, "clusterLimits": { "cpu": { "maxCores": 20, diff --git a/examples/gke/gke_cluster_autoscaler_policies/castai.tf b/examples/gke/gke_cluster_autoscaler_policies/castai.tf index 31b4ce4d..6bdc2734 100644 --- a/examples/gke/gke_cluster_autoscaler_policies/castai.tf +++ b/examples/gke/gke_cluster_autoscaler_policies/castai.tf @@ -139,6 +139,7 @@ module "castai-gke-cluster" { "scopedMode": false } }, + "nodeTemplatesPartialMatchingEnabled": false, "clusterLimits": { "cpu": { "maxCores": 20,