Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API definitions and responses to reflect cluster_autoscaler_configuration support #960

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions specification/resources/kubernetes/models/cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
3 changes: 3 additions & 0 deletions specification/resources/kubernetes/models/cluster_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@ properties:
control_plane_firewall:
$ref: 'control_plane_firewall.yml'

cluster_autoscaler_configuration:
$ref: 'cluster_autoscaler_configuration.yml'

required:
- name
15 changes: 15 additions & 0 deletions specification/resources/kubernetes/responses/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Loading