From 9faa7745ea078e60a36ac3cb5274f3853bff3ec2 Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Fri, 2 Jan 2026 22:10:20 +0000 Subject: [PATCH 1/2] add non-essential property to clusters --- .../infrastructure/clusters/Cluster.yml | 5 ++++- .../paths/infrastructure/clusters/cluster.yml | 6 +++++- .../infrastructure/clusters/clusters.yml | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/components/schemas/infrastructure/clusters/Cluster.yml b/components/schemas/infrastructure/clusters/Cluster.yml index e1439b0d..4fa84be3 100644 --- a/components/schemas/infrastructure/clusters/Cluster.yml +++ b/components/schemas/infrastructure/clusters/Cluster.yml @@ -7,6 +7,7 @@ required: - creator - hub_id - state + - non_essential - features - events properties: @@ -23,7 +24,9 @@ properties: anyOf: - $ref: ../../common/ACL.yml - type: "null" - state: + non_essential: + type: boolean + description: Marks a cluster as non-essential. Non-essential cluster resources are excluded by default from certain metrics and summaries unless opted in. $ref: ./ClusterState.yml features: type: object diff --git a/platform/paths/infrastructure/clusters/cluster.yml b/platform/paths/infrastructure/clusters/cluster.yml index 96914e55..ba366f88 100644 --- a/platform/paths/infrastructure/clusters/cluster.yml +++ b/platform/paths/infrastructure/clusters/cluster.yml @@ -47,7 +47,11 @@ patch: application/json: schema: type: object - + properties: + non_essential: + type: boolean + description: > + Set to true to mark the cluster as 'non-essential'. Non-essential cluster resources are excluded by default from certain metrics and summaries unless opted in. responses: 200: description: Returns a cluster. diff --git a/platform/paths/infrastructure/clusters/clusters.yml b/platform/paths/infrastructure/clusters/clusters.yml index cfc502f4..b745ca84 100644 --- a/platform/paths/infrastructure/clusters/clusters.yml +++ b/platform/paths/infrastructure/clusters/clusters.yml @@ -6,6 +6,25 @@ get: - Clusters parameters: - $ref: ../../../../components/parameters/PageParam.yml + - name: filter + in: query + style: deepObject + required: false + description: | + ## Filter Field + The filter field is a key-value object, where the key is what you would like to filter, and the value is the value you're filtering for. + schema: + type: object + properties: + essential: + type: string + description: | + `filter[essential]=true` filter for essential/non-essential clusters. + state: + type: string + description: | + `filter[state]=value1,value2` state filtering will allow you to filter by the cluster's current state. + `filter[stack_build]=ID` stack build filtering by ID. Submit the ID of the stack build you wish to filter for and the return sill be any environments that have the stack build deployed to them. responses: 200: description: Returns a list of clusters. From e3bc1d4cd46a602a0be0699977ab3e67601cbdda Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Fri, 2 Jan 2026 22:28:02 +0000 Subject: [PATCH 2/2] fix state missing --- components/schemas/infrastructure/clusters/Cluster.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/components/schemas/infrastructure/clusters/Cluster.yml b/components/schemas/infrastructure/clusters/Cluster.yml index 4fa84be3..0fa7b790 100644 --- a/components/schemas/infrastructure/clusters/Cluster.yml +++ b/components/schemas/infrastructure/clusters/Cluster.yml @@ -27,6 +27,7 @@ properties: non_essential: type: boolean description: Marks a cluster as non-essential. Non-essential cluster resources are excluded by default from certain metrics and summaries unless opted in. + state: $ref: ./ClusterState.yml features: type: object