diff --git a/specification/resources/kubernetes/models/cluster.yml b/specification/resources/kubernetes/models/cluster.yml index 6411eb76..d4302a3a 100644 --- a/specification/resources/kubernetes/models/cluster.yml +++ b/specification/resources/kubernetes/models/cluster.yml @@ -67,10 +67,10 @@ properties: items: type: string example: - - k8s - - k8s:bd5f5959-5e1e-4205-a714-a914373942af - - production - - web-team + - k8s + - k8s:bd5f5959-5e1e-4205-a714-a914373942af + - production + - web-team description: An array of tags applied to the Kubernetes cluster. All clusters are automatically tagged `k8s` and `k8s:$K8S_CLUSTER_ID`. @@ -79,10 +79,10 @@ properties: description: An object specifying the details of the worker nodes available to the Kubernetes cluster. items: - $ref: 'node_pool.yml#/kubernetes_node_pool' + $ref: "node_pool.yml#/kubernetes_node_pool" maintenance_policy: - $ref: 'maintenance_policy.yml' + $ref: "maintenance_policy.yml" auto_upgrade: type: boolean @@ -100,13 +100,13 @@ properties: state: type: string enum: - - running - - provisioning - - degraded - - error - - deleted - - upgrading - - deleting + - running + - provisioning + - degraded + - error + - deleted + - upgrading + - deleting example: provisioning description: A string indicating the current status of the cluster. message: @@ -156,7 +156,10 @@ properties: integrated with the cluster. control_plane_firewall: - $ref: 'control_plane_firewall.yml' + $ref: "control_plane_firewall.yml" + + cluster_autoscaler_configuration: + $ref: "cluster_autoscaler_configuration.yml" required: - name diff --git a/specification/resources/kubernetes/models/cluster_autoscaler_configuration.yml b/specification/resources/kubernetes/models/cluster_autoscaler_configuration.yml new file mode 100644 index 00000000..420e1aea --- /dev/null +++ b/specification/resources/kubernetes/models/cluster_autoscaler_configuration.yml @@ -0,0 +1,13 @@ +type: object +nullable: true +description: An object specifying custom cluster autoscaler configuration. +properties: + scale_down_utilization_threshold: + type: number + description: Used to customize when cluster autoscaler scales down non-empty nodes by setting the node utilization threshold. + example: 0.65 + + scale_down_unneeded_time: + type: string + description: Used to customize how long a node is unneeded before being scaled down. + example: "1m0s" diff --git a/specification/resources/kubernetes/models/cluster_update.yml b/specification/resources/kubernetes/models/cluster_update.yml index 5fcc7b02..33f8fb51 100644 --- a/specification/resources/kubernetes/models/cluster_update.yml +++ b/specification/resources/kubernetes/models/cluster_update.yml @@ -48,5 +48,8 @@ properties: control_plane_firewall: $ref: 'control_plane_firewall.yml' + cluster_autoscaler_configuration: + $ref: 'cluster_autoscaler_configuration.yml' + required: - name diff --git a/specification/resources/kubernetes/responses/examples.yml b/specification/resources/kubernetes/responses/examples.yml index 05079644..5f989e8c 100644 --- a/specification/resources/kubernetes/responses/examples.yml +++ b/specification/resources/kubernetes/responses/examples.yml @@ -103,6 +103,9 @@ kubernetes_clusters_all: allowed_addresses: - "1.2.3.4/32" - "1.1.0.0/16" + cluster_autoscaler_configuration: + scale_down_utilization_threshold: 0.65 + scale_down_unneeded_time: "1m" meta: total: 1 @@ -210,6 +213,9 @@ kubernetes_single: allowed_addresses: - "1.2.3.4/32" - "1.1.0.0/16" + cluster_autoscaler_configuration: + scale_down_utilization_threshold: 0.65 + scale_down_unneeded_time: "1m" kubernetes_updated: value: @@ -315,6 +321,9 @@ kubernetes_updated: allowed_addresses: - "1.2.3.4/32" - "1.1.0.0/16" + cluster_autoscaler_configuration: + scale_down_utilization_threshold: 0.65 + scale_down_unneeded_time: "1m" kubernetes_clusters_create_basic_response: value: @@ -385,6 +394,9 @@ kubernetes_clusters_create_basic_response: allowed_addresses: - "1.2.3.4/32" - "1.1.0.0/16" + cluster_autoscaler_configuration: + scale_down_utilization_threshold: 0.65 + scale_down_unneeded_time: "1m" kubernetes_clusters_multi_pool_response: value: @@ -492,6 +504,9 @@ kubernetes_clusters_multi_pool_response: allowed_addresses: - "1.2.3.4/32" - "1.1.0.0/16" + cluster_autoscaler_configuration: + scale_down_utilization_threshold: 0.65 + scale_down_unneeded_time: "1m" kubernetes_options: value: