From aefbd752a0c1a81b9213590d09ff7e614b6765b1 Mon Sep 17 00:00:00 2001 From: Angel Marin Date: Wed, 21 Jan 2026 16:30:02 +0100 Subject: [PATCH 1/5] Update OpenAPI and TSP schemas to include mandatory conditions for cluster and nodepool statuses - Added mandatory conditions "Available" and "Ready" to the status object in the OpenAPI and TSP schemas. - Updated descriptions to clarify the status conditions and their implications. - Regenerated GCP schemas to reflect these changes. --- main.tsp | 2 +- models-core/cluster/example_cluster.tsp | 24 +++- models-core/nodepool/example_nodepool.tsp | 24 +++- models-gcp/cluster/example_cluster.tsp | 24 +++- models-gcp/nodepool/example_nodepool.tsp | 24 +++- models/clusters/model.tsp | 30 ++-- models/common/model.tsp | 11 +- models/nodepools/model.tsp | 28 ++-- schemas/core/openapi.yaml | 130 ++++++++---------- schemas/gcp/openapi.yaml | 130 ++++++++---------- schemas/gcp/swagger.yaml | 160 +++++++++------------- services/clusters.tsp | 4 +- 12 files changed, 279 insertions(+), 312 deletions(-) diff --git a/main.tsp b/main.tsp index 5980b87..f4a537d 100644 --- a/main.tsp +++ b/main.tsp @@ -20,7 +20,7 @@ using OpenAPI; * */ @service(#{ title: "HyperFleet API" }) -@info(#{ version: "1.0.3", contact: #{ name: "HyperFleet Team" }, license: #{ name: "Apache 2.0" ,url: "https://www.apache.org/licenses/LICENSE-2.0"} }) +@info(#{ version: "1.0.4", contact: #{ name: "HyperFleet Team" }, license: #{ name: "Apache 2.0" ,url: "https://www.apache.org/licenses/LICENSE-2.0"} }) @server("https://hyperfleet.redhat.com", "Production") @route("/api/hyperfleet/v1") namespace HyperFleet; diff --git a/models-core/cluster/example_cluster.tsp b/models-core/cluster/example_cluster.tsp index 674a92d..74e2d20 100644 --- a/models-core/cluster/example_cluster.tsp +++ b/models-core/cluster/example_cluster.tsp @@ -12,11 +12,27 @@ const exampleCluster: Cluster = #{ updated_time: "2021-01-01T00:00:00Z", generation: 1, status: #{ - phase: ResourcePhase.Ready, - last_transition_time: "2021-01-01T00:00:00Z", - observed_generation: 1, - last_updated_time: "2021-01-01T00:00:00Z", conditions: #[ + #{ + type: "Available", + status: ConditionStatus.True, + reason: "ResourceAvailable", + message: "Cluster is accessible", + observed_generation: 1, + created_time: "2021-01-01T10:00:00Z", + last_updated_time: "2021-01-01T10:00:00Z", + last_transition_time: "2021-01-01T10:00:00Z", + }, + #{ + type: "Ready", + status: ConditionStatus.True, + reason: "ResourceReady", + message: "Cluster is ready", + observed_generation: 1, + created_time: "2021-01-01T10:00:00Z", + last_updated_time: "2021-01-01T10:00:00Z", + last_transition_time: "2021-01-01T10:00:00Z", + }, #{ type: "ValidationSuccessful", status: ConditionStatus.True, diff --git a/models-core/nodepool/example_nodepool.tsp b/models-core/nodepool/example_nodepool.tsp index f7f175f..2d5fe0f 100644 --- a/models-core/nodepool/example_nodepool.tsp +++ b/models-core/nodepool/example_nodepool.tsp @@ -19,11 +19,27 @@ const exampleNodePool: NodePool = #{ href: "https://api.hyperfleet.com/v1/clusters/cluster-123", }, status: #{ - phase: ResourcePhase.Ready, - last_transition_time: "2021-01-01T10:00:00Z", - observed_generation: 1, - last_updated_time: "2021-01-01T10:02:00Z", conditions: #[ + #{ + type: "Available", + status: ConditionStatus.True, + reason: "ResourceAvailable", + message: "NodePool is accessible", + observed_generation: 1, + created_time: "2021-01-01T10:00:00Z", + last_updated_time: "2021-01-01T10:00:00Z", + last_transition_time: "2021-01-01T10:00:00Z", + }, + #{ + type: "Ready", + status: ConditionStatus.True, + reason: "ResourceReady", + message: "NodePool is ready", + observed_generation: 1, + created_time: "2021-01-01T10:00:00Z", + last_updated_time: "2021-01-01T10:00:00Z", + last_transition_time: "2021-01-01T10:00:00Z", + }, #{ type: "ValidationSuccessful", status: ConditionStatus.True, diff --git a/models-gcp/cluster/example_cluster.tsp b/models-gcp/cluster/example_cluster.tsp index a0e0116..e1d3f72 100644 --- a/models-gcp/cluster/example_cluster.tsp +++ b/models-gcp/cluster/example_cluster.tsp @@ -34,11 +34,27 @@ const exampleCluster: Cluster = #{ updated_time: "2021-01-01T00:00:00Z", generation: 1, status: #{ - phase: ResourcePhase.Ready, - last_transition_time: "2021-01-01T00:00:00Z", - observed_generation: 1, - last_updated_time: "2021-01-01T00:00:00Z", conditions: #[ + #{ + type: "Available", + status: ConditionStatus.True, + reason: "ResourceAvailable", + message: "Cluster is accessible", + observed_generation: 1, + created_time: "2021-01-01T10:00:00Z", + last_updated_time: "2021-01-01T10:00:00Z", + last_transition_time: "2021-01-01T10:00:00Z", + }, + #{ + type: "Ready", + status: ConditionStatus.True, + reason: "ResourceReady", + message: "Cluster is ready", + observed_generation: 1, + created_time: "2021-01-01T10:00:00Z", + last_updated_time: "2021-01-01T10:00:00Z", + last_transition_time: "2021-01-01T10:00:00Z", + }, #{ type: "ValidationSuccessful", status: ConditionStatus.True, diff --git a/models-gcp/nodepool/example_nodepool.tsp b/models-gcp/nodepool/example_nodepool.tsp index 05b633e..c04ffc2 100644 --- a/models-gcp/nodepool/example_nodepool.tsp +++ b/models-gcp/nodepool/example_nodepool.tsp @@ -41,11 +41,27 @@ const exampleNodePool: NodePool = #{ href: "https://api.hyperfleet.com/v1/clusters/cluster-123", }, status: #{ - phase: ResourcePhase.Ready, - last_transition_time: "2021-01-01T10:00:00Z", - observed_generation: 1, - last_updated_time: "2021-01-01T10:02:00Z", conditions: #[ + #{ + type: "Available", + status: ConditionStatus.True, + reason: "ResourceAvailable", + message: "NodePool is accessible", + observed_generation: 1, + created_time: "2021-01-01T10:00:00Z", + last_updated_time: "2021-01-01T10:00:00Z", + last_transition_time: "2021-01-01T10:00:00Z", + }, + #{ + type: "Ready", + status: ConditionStatus.True, + reason: "ResourceReady", + message: "NodePool is ready", + observed_generation: 1, + created_time: "2021-01-01T10:00:00Z", + last_updated_time: "2021-01-01T10:00:00Z", + last_transition_time: "2021-01-01T10:00:00Z", + }, #{ type: "ValidationSuccessful", status: ConditionStatus.True, diff --git a/models/clusters/model.tsp b/models/clusters/model.tsp index f83d65b..5a6bb23 100644 --- a/models/clusters/model.tsp +++ b/models/clusters/model.tsp @@ -22,32 +22,20 @@ model ClusterBase { * This object is computed by the service and CANNOT be modified directly. * It is aggregated from condition updates posted to `/clusters/{id}/statuses`. * - * Provides quick overview of all reported conditions and aggregated phase. + * Provides quick overview of all reported conditions. */ model ClusterStatus { - phase: ResourcePhase; /** - * When cluster last transitioned (used by Sentinel for backoff) - * Updated when conditions are reported if the phase changes + * List of status conditions for the cluster. + * + * **Mandatory conditions**: + * - `type: "Available"`: indicates if the cluster is accessible and functional. + * - `type: "Ready"`: indicates if the cluster has reached its desired state. + * + * These conditions are present immediately upon resource creation (usually with status `Unknown`). */ - @format("date-time") last_transition_time: string; - - /** - * Last generation processed - * Updated when conditions are reported. - * This will be the lowest value of each condition's observed_generation values - * The phase value is based on this generation - */ - observed_generation: int32; - - /** Time of the last update - * Updated when conditions are reported. - * Computed as min(conditions[].last_updated_time) to detect stale adapters. - * Uses earliest (not latest) timestamp to ensure Sentinel can detect if any adapter has stopped reporting. - */ - @format("date-time") last_updated_time: string; - + @minItems(2) conditions: ResourceCondition[]; } diff --git a/models/common/model.tsp b/models/common/model.tsp index 6dd70aa..8322e12 100644 --- a/models/common/model.tsp +++ b/models/common/model.tsp @@ -10,15 +10,6 @@ alias KindClusterStatus = "ClusterStatus"; alias KindNodePoolStatus = "NodePoolStatus"; alias KindNodePool = "NodePool"; -/** - * Phase of a resource (Cluster or NodePool) - */ -enum ResourcePhase { - NotReady, - Ready, - Failed, -} - model ID { /** Resource identifier */ id?: Identifier; @@ -140,7 +131,7 @@ enum OrderDirection { model SearchParams { /** Filter results using TSL (Tree Search Language) query syntax. - * Examples: `status.phase='NotReady'`, `name in ('c1','c2')`, `labels.region='us-east'` */ + * Examples: `status.conditions.Ready='True'`, `name in ('c1','c2')`, `labels.region='us-east'` */ @query search?: string; } diff --git a/models/nodepools/model.tsp b/models/nodepools/model.tsp index c15f72a..19053a0 100644 --- a/models/nodepools/model.tsp +++ b/models/nodepools/model.tsp @@ -22,29 +22,17 @@ model NodePoolBase { * This object is computed by the service and CANNOT be modified directly. */ model NodePoolStatus { - phase: ResourcePhase; /** - * Last generation processed - * Updated when conditions are reported. - * This will be the lowest value of each condition's observed_generation values - * The phase value is based on this generation + * List of status conditions for the nodepool. + * + * **Mandatory conditions**: + * - `type: "Available"`: indicates if the nodepool is accessible and functional. + * - `type: "Ready"`: indicates if the nodepool has reached its desired state. + * + * These conditions are present immediately upon resource creation (usually with status `Unknown`). */ - @minValue(1) - observed_generation: int32; - - /** - * When NodePool last transitioned (used by Sentinel for backoff) - */ - @format("date-time") last_transition_time: string; - - /** Time of the last update - * Updated when conditions are reported. - * Computed as min(conditions[].last_updated_time) to detect stale adapters. - * Uses earliest (not latest) timestamp to ensure Sentinel can detect if any adapter has stopped reporting. - */ - @format("date-time") last_updated_time: string; - + @minItems(2) conditions: ResourceCondition[]; } diff --git a/schemas/core/openapi.yaml b/schemas/core/openapi.yaml index 28168b6..358565a 100644 --- a/schemas/core/openapi.yaml +++ b/schemas/core/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: HyperFleet API - version: 1.0.3 + version: 1.0.4 contact: name: HyperFleet Team license: @@ -49,8 +49,8 @@ paths: Create a new cluster resource. **Note**: The `status` object in the response is read-only and computed by the service. - It is NOT part of the request body. Initially, status.phase will be "NotReady" and - status.conditions will be empty until status conditions are POSTed. + It is NOT part of the request body. Initially, + status.conditions will include mandatory "Available" and "Ready" conditions (usually with status `Unknown`). parameters: [] responses: '201': @@ -419,7 +419,7 @@ components: required: false description: |- Filter results using TSL (Tree Search Language) query syntax. - Examples: `status.phase='NotReady'`, `name in ('c1','c2')`, `labels.region='us-east'` + Examples: `status.conditions.Ready='True'`, `name in ('c1','c2')`, `labels.region='us-east'` schema: type: string explode: false @@ -758,11 +758,23 @@ components: updated_time: '2021-01-01T00:00:00Z' generation: 1 status: - phase: Ready - last_transition_time: '2021-01-01T00:00:00Z' - observed_generation: 1 - last_updated_time: '2021-01-01T00:00:00Z' conditions: + - type: Available + status: 'True' + reason: ResourceAvailable + message: Cluster is accessible + observed_generation: 1 + created_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' + - type: Ready + status: 'True' + reason: ResourceReady + message: Cluster is ready + observed_generation: 1 + created_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' - type: ValidationSuccessful status: 'True' reason: All validations passed @@ -849,47 +861,28 @@ components: ClusterStatus: type: object required: - - phase - - last_transition_time - - observed_generation - - last_updated_time - conditions properties: - phase: - $ref: '#/components/schemas/ResourcePhase' - last_transition_time: - type: string - format: date-time - description: |- - When cluster last transitioned (used by Sentinel for backoff) - Updated when conditions are reported if the phase changes - observed_generation: - type: integer - format: int32 - description: |- - Last generation processed - Updated when conditions are reported. - This will be the lowest value of each condition's observed_generation values - The phase value is based on this generation - last_updated_time: - type: string - format: date-time - description: |- - Time of the last update - Updated when conditions are reported. - Computed as min(conditions[].last_updated_time) to detect stale adapters. - Uses earliest (not latest) timestamp to ensure Sentinel can detect if any adapter has stopped reporting. conditions: type: array items: $ref: '#/components/schemas/ResourceCondition' + minItems: 2 + description: |- + List of status conditions for the cluster. + + **Mandatory conditions**: + - `type: "Available"`: indicates if the cluster is accessible and functional. + - `type: "Ready"`: indicates if the cluster has reached its desired state. + + These conditions are present immediately upon resource creation (usually with status `Unknown`). description: |- Cluster status computed from all status conditions. This object is computed by the service and CANNOT be modified directly. It is aggregated from condition updates posted to `/clusters/{id}/statuses`. - Provides quick overview of all reported conditions and aggregated phase. + Provides quick overview of all reported conditions. ConditionRequest: type: object required: @@ -1037,11 +1030,23 @@ components: kind: Cluster href: https://api.hyperfleet.com/v1/clusters/cluster-123 status: - phase: Ready - last_transition_time: '2021-01-01T10:00:00Z' - observed_generation: 1 - last_updated_time: '2021-01-01T10:02:00Z' conditions: + - type: Available + status: 'True' + reason: ResourceAvailable + message: NodePool is accessible + observed_generation: 1 + created_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' + - type: Ready + status: 'True' + reason: ResourceReady + message: NodePool is ready + observed_generation: 1 + created_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' - type: ValidationSuccessful status: 'True' reason: All validations passed @@ -1181,39 +1186,21 @@ components: NodePoolStatus: type: object required: - - phase - - observed_generation - - last_transition_time - - last_updated_time - conditions properties: - phase: - $ref: '#/components/schemas/ResourcePhase' - observed_generation: - type: integer - format: int32 - minimum: 1 - description: |- - Last generation processed - Updated when conditions are reported. - This will be the lowest value of each condition's observed_generation values - The phase value is based on this generation - last_transition_time: - type: string - format: date-time - description: When NodePool last transitioned (used by Sentinel for backoff) - last_updated_time: - type: string - format: date-time - description: |- - Time of the last update - Updated when conditions are reported. - Computed as min(conditions[].last_updated_time) to detect stale adapters. - Uses earliest (not latest) timestamp to ensure Sentinel can detect if any adapter has stopped reporting. conditions: type: array items: $ref: '#/components/schemas/ResourceCondition' + minItems: 2 + description: |- + List of status conditions for the nodepool. + + **Mandatory conditions**: + - `type: "Available"`: indicates if the nodepool is accessible and functional. + - `type: "Ready"`: indicates if the nodepool has reached its desired state. + + These conditions are present immediately upon resource creation (usually with status `Unknown`). description: |- NodePool status computed from all status conditions. @@ -1281,13 +1268,6 @@ components: Condition in Cluster/NodePool status Used for semantic condition types: "ValidationSuccessful", "DNSSuccessful", "NodePoolSuccessful", etc. Includes observed_generation and last_updated_time to track adapter-specific state - ResourcePhase: - type: string - enum: - - NotReady - - Ready - - Failed - description: Phase of a resource (Cluster or NodePool) ValidationError: type: object required: diff --git a/schemas/gcp/openapi.yaml b/schemas/gcp/openapi.yaml index 478faff..8904fa6 100644 --- a/schemas/gcp/openapi.yaml +++ b/schemas/gcp/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: HyperFleet API - version: 1.0.3 + version: 1.0.4 contact: name: HyperFleet Team license: @@ -49,8 +49,8 @@ paths: Create a new cluster resource. **Note**: The `status` object in the response is read-only and computed by the service. - It is NOT part of the request body. Initially, status.phase will be "NotReady" and - status.conditions will be empty until status conditions are POSTed. + It is NOT part of the request body. Initially, + status.conditions will include mandatory "Available" and "Ready" conditions (usually with status `Unknown`). parameters: [] responses: '201': @@ -342,7 +342,7 @@ components: required: false description: |- Filter results using TSL (Tree Search Language) query syntax. - Examples: `status.phase='NotReady'`, `name in ('c1','c2')`, `labels.region='us-east'` + Examples: `status.conditions.Ready='True'`, `name in ('c1','c2')`, `labels.region='us-east'` schema: type: string explode: false @@ -656,11 +656,23 @@ components: updated_time: '2021-01-01T00:00:00Z' generation: 1 status: - phase: Ready - last_transition_time: '2021-01-01T00:00:00Z' - observed_generation: 1 - last_updated_time: '2021-01-01T00:00:00Z' conditions: + - type: Available + status: 'True' + reason: ResourceAvailable + message: Cluster is accessible + observed_generation: 1 + created_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' + - type: Ready + status: 'True' + reason: ResourceReady + message: Cluster is ready + observed_generation: 1 + created_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' - type: ValidationSuccessful status: 'True' reason: All validations passed @@ -807,47 +819,28 @@ components: ClusterStatus: type: object required: - - phase - - last_transition_time - - observed_generation - - last_updated_time - conditions properties: - phase: - $ref: '#/components/schemas/ResourcePhase' - last_transition_time: - type: string - format: date-time - description: |- - When cluster last transitioned (used by Sentinel for backoff) - Updated when conditions are reported if the phase changes - observed_generation: - type: integer - format: int32 - description: |- - Last generation processed - Updated when conditions are reported. - This will be the lowest value of each condition's observed_generation values - The phase value is based on this generation - last_updated_time: - type: string - format: date-time - description: |- - Time of the last update - Updated when conditions are reported. - Computed as min(conditions[].last_updated_time) to detect stale adapters. - Uses earliest (not latest) timestamp to ensure Sentinel can detect if any adapter has stopped reporting. conditions: type: array items: $ref: '#/components/schemas/ResourceCondition' + minItems: 2 + description: |- + List of status conditions for the cluster. + + **Mandatory conditions**: + - `type: "Available"`: indicates if the cluster is accessible and functional. + - `type: "Ready"`: indicates if the cluster has reached its desired state. + + These conditions are present immediately upon resource creation (usually with status `Unknown`). description: |- Cluster status computed from all status conditions. This object is computed by the service and CANNOT be modified directly. It is aggregated from condition updates posted to `/clusters/{id}/statuses`. - Provides quick overview of all reported conditions and aggregated phase. + Provides quick overview of all reported conditions. ConditionStatus: type: string enum: @@ -1013,11 +1006,23 @@ components: kind: Cluster href: https://api.hyperfleet.com/v1/clusters/cluster-123 status: - phase: Ready - last_transition_time: '2021-01-01T10:00:00Z' - observed_generation: 1 - last_updated_time: '2021-01-01T10:02:00Z' conditions: + - type: Available + status: 'True' + reason: ResourceAvailable + message: NodePool is accessible + observed_generation: 1 + created_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' + - type: Ready + status: 'True' + reason: ResourceReady + message: NodePool is ready + observed_generation: 1 + created_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' - type: ValidationSuccessful status: 'True' reason: All validations passed @@ -1226,39 +1231,21 @@ components: NodePoolStatus: type: object required: - - phase - - observed_generation - - last_transition_time - - last_updated_time - conditions properties: - phase: - $ref: '#/components/schemas/ResourcePhase' - observed_generation: - type: integer - format: int32 - minimum: 1 - description: |- - Last generation processed - Updated when conditions are reported. - This will be the lowest value of each condition's observed_generation values - The phase value is based on this generation - last_transition_time: - type: string - format: date-time - description: When NodePool last transitioned (used by Sentinel for backoff) - last_updated_time: - type: string - format: date-time - description: |- - Time of the last update - Updated when conditions are reported. - Computed as min(conditions[].last_updated_time) to detect stale adapters. - Uses earliest (not latest) timestamp to ensure Sentinel can detect if any adapter has stopped reporting. conditions: type: array items: $ref: '#/components/schemas/ResourceCondition' + minItems: 2 + description: |- + List of status conditions for the nodepool. + + **Mandatory conditions**: + - `type: "Available"`: indicates if the nodepool is accessible and functional. + - `type: "Ready"`: indicates if the nodepool has reached its desired state. + + These conditions are present immediately upon resource creation (usually with status `Unknown`). description: |- NodePool status computed from all status conditions. @@ -1333,13 +1320,6 @@ components: Condition in Cluster/NodePool status Used for semantic condition types: "ValidationSuccessful", "DNSSuccessful", "NodePoolSuccessful", etc. Includes observed_generation and last_updated_time to track adapter-specific state - ResourcePhase: - type: string - enum: - - NotReady - - Ready - - Failed - description: Phase of a resource (Cluster or NodePool) TaintSpec: type: object required: diff --git a/schemas/gcp/swagger.yaml b/schemas/gcp/swagger.yaml index 0d44baa..fef669b 100644 --- a/schemas/gcp/swagger.yaml +++ b/schemas/gcp/swagger.yaml @@ -16,7 +16,7 @@ info: name: Apache 2.0 url: 'https://www.apache.org/licenses/LICENSE-2.0' title: HyperFleet API - version: 1.0.3 + version: 1.0.4 host: hyperfleet.redhat.com basePath: / schemes: @@ -31,7 +31,7 @@ paths: - description: >- Filter results using TSL (Tree Search Language) query syntax. - Examples: `status.phase='NotReady'`, `name in ('c1','c2')`, + Examples: `status.conditions.Ready='True'`, `name in ('c1','c2')`, `labels.region='us-east'` in: query name: search @@ -110,10 +110,10 @@ paths: **Note**: The `status` object in the response is read-only and computed by the service. - It is NOT part of the request body. Initially, status.phase will be - "NotReady" and + It is NOT part of the request body. Initially, - status.conditions will be empty until status conditions are POSTed. + status.conditions will include mandatory "Available" and "Ready" + conditions (usually with status `Unknown`). operationId: postCluster summary: Create cluster '/api/hyperfleet/v1/clusters/{cluster_id}': @@ -125,7 +125,7 @@ paths: - description: >- Filter results using TSL (Tree Search Language) query syntax. - Examples: `status.phase='NotReady'`, `name in ('c1','c2')`, + Examples: `status.conditions.Ready='True'`, `name in ('c1','c2')`, `labels.region='us-east'` in: query name: search @@ -164,7 +164,7 @@ paths: - description: >- Filter results using TSL (Tree Search Language) query syntax. - Examples: `status.phase='NotReady'`, `name in ('c1','c2')`, + Examples: `status.conditions.Ready='True'`, `name in ('c1','c2')`, `labels.region='us-east'` in: query name: search @@ -295,7 +295,7 @@ paths: - description: >- Filter results using TSL (Tree Search Language) query syntax. - Examples: `status.phase='NotReady'`, `name in ('c1','c2')`, + Examples: `status.conditions.Ready='True'`, `name in ('c1','c2')`, `labels.region='us-east'` in: query name: search @@ -352,7 +352,7 @@ paths: - description: >- Filter results using TSL (Tree Search Language) query syntax. - Examples: `status.phase='NotReady'`, `name in ('c1','c2')`, + Examples: `status.conditions.Ready='True'`, `name in ('c1','c2')`, `labels.region='us-east'` in: query name: search @@ -405,7 +405,7 @@ paths: - description: >- Filter results using TSL (Tree Search Language) query syntax. - Examples: `status.phase='NotReady'`, `name in ('c1','c2')`, + Examples: `status.conditions.Ready='True'`, `name in ('c1','c2')`, `labels.region='us-east'` in: query name: search @@ -720,6 +720,22 @@ definitions: version: 4.14.0 status: conditions: + - created_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + message: Cluster is accessible + observed_generation: 1 + reason: ResourceAvailable + status: 'True' + type: Available + - created_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + message: Cluster is ready + observed_generation: 1 + reason: ResourceReady + status: 'True' + type: Ready - created_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' @@ -736,10 +752,6 @@ definitions: reason: DNS configured status: 'True' type: DNSSuccessful - last_transition_time: '2021-01-01T00:00:00Z' - last_updated_time: '2021-01-01T00:00:00Z' - observed_generation: 1 - phase: Ready updated_by: user-123@example.com updated_time: '2021-01-01T00:00:00Z' properties: @@ -932,50 +944,29 @@ definitions: `/clusters/{id}/statuses`. - Provides quick overview of all reported conditions and aggregated phase. + Provides quick overview of all reported conditions. properties: conditions: - items: - $ref: '#/definitions/ResourceCondition' - type: array - last_transition_time: - description: |- - When cluster last transitioned (used by Sentinel for backoff) - Updated when conditions are reported if the phase changes - format: date-time - type: string - last_updated_time: description: >- - Time of the last update + List of status conditions for the cluster. - Updated when conditions are reported. - Computed as min(conditions[].last_updated_time) to detect stale - adapters. + **Mandatory conditions**: - Uses earliest (not latest) timestamp to ensure Sentinel can detect if - any adapter has stopped reporting. - format: date-time - type: string - observed_generation: - description: >- - Last generation processed + - `type: "Available"`: indicates if the cluster is accessible and + functional. - Updated when conditions are reported. + - `type: "Ready"`: indicates if the cluster has reached its desired + state. - This will be the lowest value of each condition's observed_generation - values - The phase value is based on this generation - format: int32 - type: integer - phase: - $ref: '#/definitions/ResourcePhase' + These conditions are present immediately upon resource creation + (usually with status `Unknown`). + items: + $ref: '#/definitions/ResourceCondition' + minItems: 2 + type: array required: - - phase - - last_transition_time - - observed_generation - - last_updated_time - conditions type: object ConditionStatus: @@ -1087,6 +1078,22 @@ definitions: type: gcp status: conditions: + - created_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + message: NodePool is accessible + observed_generation: 1 + reason: ResourceAvailable + status: 'True' + type: Available + - created_time: '2021-01-01T10:00:00Z' + last_transition_time: '2021-01-01T10:00:00Z' + last_updated_time: '2021-01-01T10:00:00Z' + message: NodePool is ready + observed_generation: 1 + reason: ResourceReady + status: 'True' + type: Ready - created_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' @@ -1103,10 +1110,6 @@ definitions: reason: NodePool provisioned successfully status: 'True' type: NodePoolSuccessful - last_transition_time: '2021-01-01T10:00:00Z' - last_updated_time: '2021-01-01T10:02:00Z' - observed_generation: 1 - phase: Ready updated_by: user-123@example.com updated_time: '2021-01-01T00:00:00Z' properties: @@ -1364,46 +1367,26 @@ definitions: This object is computed by the service and CANNOT be modified directly. properties: conditions: - items: - $ref: '#/definitions/ResourceCondition' - type: array - last_transition_time: - description: When NodePool last transitioned (used by Sentinel for backoff) - format: date-time - type: string - last_updated_time: description: >- - Time of the last update + List of status conditions for the nodepool. - Updated when conditions are reported. - Computed as min(conditions[].last_updated_time) to detect stale - adapters. + **Mandatory conditions**: - Uses earliest (not latest) timestamp to ensure Sentinel can detect if - any adapter has stopped reporting. - format: date-time - type: string - observed_generation: - description: >- - Last generation processed + - `type: "Available"`: indicates if the nodepool is accessible and + functional. - Updated when conditions are reported. + - `type: "Ready"`: indicates if the nodepool has reached its desired + state. - This will be the lowest value of each condition's observed_generation - values - The phase value is based on this generation - format: int32 - minimum: 1 - type: integer - phase: - $ref: '#/definitions/ResourcePhase' + These conditions are present immediately upon resource creation + (usually with status `Unknown`). + items: + $ref: '#/definitions/ResourceCondition' + minItems: 2 + type: array required: - - phase - - observed_generation - - last_transition_time - - last_updated_time - conditions type: object ObjectReference: @@ -1485,13 +1468,6 @@ definitions: - created_time - last_updated_time type: object - ResourcePhase: - description: Phase of a resource (Cluster or NodePool) - enum: - - NotReady - - Ready - - Failed - type: string TaintSpec: properties: effect: @@ -1579,7 +1555,7 @@ x-components: description: >- Filter results using TSL (Tree Search Language) query syntax. - Examples: `status.phase='NotReady'`, `name in ('c1','c2')`, + Examples: `status.conditions.Ready='True'`, `name in ('c1','c2')`, `labels.region='us-east'` in: query name: search diff --git a/services/clusters.tsp b/services/clusters.tsp index 0890b9e..539df68 100644 --- a/services/clusters.tsp +++ b/services/clusters.tsp @@ -37,8 +37,8 @@ interface Clusters { * Create a new cluster resource. * * **Note**: The `status` object in the response is read-only and computed by the service. - * It is NOT part of the request body. Initially, status.phase will be "NotReady" and - * status.conditions will be empty until status conditions are POSTed. + * It is NOT part of the request body. Initially, + * status.conditions will include mandatory "Available" and "Ready" conditions (usually with status `Unknown`). * */ @route("") From abfcc4a5760228b6a6631393a4228b7c21e12d63 Mon Sep 17 00:00:00 2001 From: Angel Marin Date: Thu, 22 Jan 2026 17:03:07 +0100 Subject: [PATCH 2/5] Refactor status conditions to use ConditionType enum - Updated status conditions in various TSP models to utilize the new ConditionType enum for "Available" and "Ready". - Ensured consistency across cluster and nodepool status definitions in the models. --- models-core/cluster/example_cluster.tsp | 4 ++-- models-core/nodepool/example_nodepool.tsp | 2 +- models-gcp/cluster/example_cluster.tsp | 2 +- models-gcp/nodepool/example_nodepool.tsp | 4 ++-- models/common/model.tsp | 6 ++++++ models/statuses/example_adapter_status.tsp | 8 ++++---- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/models-core/cluster/example_cluster.tsp b/models-core/cluster/example_cluster.tsp index 74e2d20..3fa3c66 100644 --- a/models-core/cluster/example_cluster.tsp +++ b/models-core/cluster/example_cluster.tsp @@ -14,7 +14,7 @@ const exampleCluster: Cluster = #{ status: #{ conditions: #[ #{ - type: "Available", + type: ConditionType.Available, status: ConditionStatus.True, reason: "ResourceAvailable", message: "Cluster is accessible", @@ -24,7 +24,7 @@ const exampleCluster: Cluster = #{ last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: "Ready", + type: ConditionType.Ready, status: ConditionStatus.True, reason: "ResourceReady", message: "Cluster is ready", diff --git a/models-core/nodepool/example_nodepool.tsp b/models-core/nodepool/example_nodepool.tsp index 2d5fe0f..5c8b5c9 100644 --- a/models-core/nodepool/example_nodepool.tsp +++ b/models-core/nodepool/example_nodepool.tsp @@ -21,7 +21,7 @@ const exampleNodePool: NodePool = #{ status: #{ conditions: #[ #{ - type: "Available", + type: ConditionType.Available, status: ConditionStatus.True, reason: "ResourceAvailable", message: "NodePool is accessible", diff --git a/models-gcp/cluster/example_cluster.tsp b/models-gcp/cluster/example_cluster.tsp index e1d3f72..8977050 100644 --- a/models-gcp/cluster/example_cluster.tsp +++ b/models-gcp/cluster/example_cluster.tsp @@ -36,7 +36,7 @@ const exampleCluster: Cluster = #{ status: #{ conditions: #[ #{ - type: "Available", + type: ConditionType.Available, status: ConditionStatus.True, reason: "ResourceAvailable", message: "Cluster is accessible", diff --git a/models-gcp/nodepool/example_nodepool.tsp b/models-gcp/nodepool/example_nodepool.tsp index c04ffc2..c234b78 100644 --- a/models-gcp/nodepool/example_nodepool.tsp +++ b/models-gcp/nodepool/example_nodepool.tsp @@ -43,7 +43,7 @@ const exampleNodePool: NodePool = #{ status: #{ conditions: #[ #{ - type: "Available", + type: ConditionType.Available, status: ConditionStatus.True, reason: "ResourceAvailable", message: "NodePool is accessible", @@ -53,7 +53,7 @@ const exampleNodePool: NodePool = #{ last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: "Ready", + type: ConditionType.Ready, status: ConditionStatus.True, reason: "ResourceReady", message: "NodePool is ready", diff --git a/models/common/model.tsp b/models/common/model.tsp index 8322e12..c559fa0 100644 --- a/models/common/model.tsp +++ b/models/common/model.tsp @@ -158,3 +158,9 @@ model List { total: int32; items: T[]; } + +union ConditionType { + string, + Available: "Available", + Ready: "Ready" +} \ No newline at end of file diff --git a/models/statuses/example_adapter_status.tsp b/models/statuses/example_adapter_status.tsp index d4e5e3c..07a7304 100644 --- a/models/statuses/example_adapter_status.tsp +++ b/models/statuses/example_adapter_status.tsp @@ -6,7 +6,7 @@ const exampleAdapterStatus: AdapterStatus = (#{ observed_generation: 1, conditions: #[ #{ - type: "Available", + type: ConditionType.Available, status: ConditionStatus.True, reason: "All validations passed", message: "All 30 validation tests passed", @@ -53,7 +53,7 @@ const exampleAdapterStatusCreateRequest: AdapterStatusCreateRequest = (#{ observed_time: "2021-01-01T10:00:00Z", conditions: #[ #{ - type: "Available", + type: ConditionType.Available, status: ConditionStatus.True, reason: "All validations passed", message: "All 30 validation tests passed", @@ -100,7 +100,7 @@ const exampleAdapterStatusList: AdapterStatusList = (#{ observed_generation: 1, conditions: #[ #{ - type: "Available", + type: ConditionType.Available, status: ConditionStatus.True, reason: "All validations passed", message: "All 30 validation tests passed", @@ -119,7 +119,7 @@ const exampleAdapterStatusList: AdapterStatusList = (#{ observed_generation: 1, conditions: #[ #{ - type: "Available", + type: ConditionType.Available, status: ConditionStatus.True, reason: "DNS configured", message: "DNS records created", From 9a603bbb3a922a609471ef007e278588e9616c8e Mon Sep 17 00:00:00 2001 From: Angel Marin Date: Fri, 23 Jan 2026 11:25:33 +0100 Subject: [PATCH 3/5] HYPERFLEET-386 - fix: available/ready can be only true/false --- models-core/cluster/example_cluster.tsp | 12 ++++----- models-core/nodepool/example_nodepool.tsp | 13 ++++----- models-gcp/cluster/example_cluster.tsp | 14 +++++----- models-gcp/nodepool/example_nodepool.tsp | 12 ++++----- models/clusters/model.tsp | 2 +- models/nodepools/model.tsp | 2 +- models/statuses/model.tsp | 2 +- schemas/core/openapi.yaml | 30 ++++++++++----------- schemas/gcp/openapi.yaml | 30 ++++++++++----------- schemas/gcp/swagger.yaml | 32 +++++++++++------------ services/clusters.tsp | 2 +- 11 files changed, 75 insertions(+), 76 deletions(-) diff --git a/models-core/cluster/example_cluster.tsp b/models-core/cluster/example_cluster.tsp index 3fa3c66..cd33391 100644 --- a/models-core/cluster/example_cluster.tsp +++ b/models-core/cluster/example_cluster.tsp @@ -14,20 +14,20 @@ const exampleCluster: Cluster = #{ status: #{ conditions: #[ #{ - type: ConditionType.Available, + type: ConditionType.Ready, status: ConditionStatus.True, - reason: "ResourceAvailable", - message: "Cluster is accessible", + reason: "ResourceReady", + message: "All conditions successful for current spec generation", observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: ConditionType.Ready, + type: ConditionType.Available, status: ConditionStatus.True, - reason: "ResourceReady", - message: "Cluster is ready", + reason: "ResourceAvailable", + message: "All conditions successful for observed_generation", observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", diff --git a/models-core/nodepool/example_nodepool.tsp b/models-core/nodepool/example_nodepool.tsp index 5c8b5c9..081849e 100644 --- a/models-core/nodepool/example_nodepool.tsp +++ b/models-core/nodepool/example_nodepool.tsp @@ -21,20 +21,21 @@ const exampleNodePool: NodePool = #{ status: #{ conditions: #[ #{ - type: ConditionType.Available, + type: "Ready", status: ConditionStatus.True, - reason: "ResourceAvailable", - message: "NodePool is accessible", + reason: "ResourceReady", + message: "NodePool is ready", + message: "All conditions successful for observed_generation", observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: "Ready", + type: ConditionType.Available, status: ConditionStatus.True, - reason: "ResourceReady", - message: "NodePool is ready", + reason: "ResourceAvailable", + message: "All conditions successful for current spec generation", observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", diff --git a/models-gcp/cluster/example_cluster.tsp b/models-gcp/cluster/example_cluster.tsp index 8977050..f273f8a 100644 --- a/models-gcp/cluster/example_cluster.tsp +++ b/models-gcp/cluster/example_cluster.tsp @@ -36,20 +36,20 @@ const exampleCluster: Cluster = #{ status: #{ conditions: #[ #{ - type: ConditionType.Available, + type: "Ready", status: ConditionStatus.True, - reason: "ResourceAvailable", - message: "Cluster is accessible", + reason: "ResourceReady", + message: "All conditions successful for current spec generation", observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: "Ready", + type: ConditionType.Available, status: ConditionStatus.True, - reason: "ResourceReady", - message: "Cluster is ready", + reason: "ResourceAvailable", + message: "All conditions successful for observed_generation", observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", @@ -79,4 +79,4 @@ const exampleCluster: Cluster = #{ }, created_by: "user-123@example.com", updated_by: "user-123@example.com", -}; \ No newline at end of file +}; diff --git a/models-gcp/nodepool/example_nodepool.tsp b/models-gcp/nodepool/example_nodepool.tsp index c234b78..ff889e2 100644 --- a/models-gcp/nodepool/example_nodepool.tsp +++ b/models-gcp/nodepool/example_nodepool.tsp @@ -43,20 +43,20 @@ const exampleNodePool: NodePool = #{ status: #{ conditions: #[ #{ - type: ConditionType.Available, + type: ConditionType.Ready, status: ConditionStatus.True, - reason: "ResourceAvailable", - message: "NodePool is accessible", + reason: "ResourceReady", + message: "All conditions successful for current spec generation", observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: ConditionType.Ready, + type: ConditionType.Available, status: ConditionStatus.True, - reason: "ResourceReady", - message: "NodePool is ready", + reason: "ResourceAvailable", + message: "All conditions successful for observed_generation", observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", diff --git a/models/clusters/model.tsp b/models/clusters/model.tsp index 5a6bb23..868b743 100644 --- a/models/clusters/model.tsp +++ b/models/clusters/model.tsp @@ -33,7 +33,7 @@ model ClusterStatus { * - `type: "Available"`: indicates if the cluster is accessible and functional. * - `type: "Ready"`: indicates if the cluster has reached its desired state. * - * These conditions are present immediately upon resource creation (usually with status `Unknown`). + * These conditions are present immediately upon resource creation. */ @minItems(2) conditions: ResourceCondition[]; diff --git a/models/nodepools/model.tsp b/models/nodepools/model.tsp index 19053a0..e4966d8 100644 --- a/models/nodepools/model.tsp +++ b/models/nodepools/model.tsp @@ -30,7 +30,7 @@ model NodePoolStatus { * - `type: "Available"`: indicates if the nodepool is accessible and functional. * - `type: "Ready"`: indicates if the nodepool has reached its desired state. * - * These conditions are present immediately upon resource creation (usually with status `Unknown`). + * These conditions are present immediately upon resource creation. */ @minItems(2) conditions: ResourceCondition[]; diff --git a/models/statuses/model.tsp b/models/statuses/model.tsp index 61a387c..8280c34 100644 --- a/models/statuses/model.tsp +++ b/models/statuses/model.tsp @@ -33,7 +33,7 @@ model ConditionBase { /** * When this condition last transitioned status (API-managed) - * Only updated when status changes (True/False/Unknown), not when reason/message changes + * Only updated when status changes (True/False), not when reason/message changes */ @format("date-time") last_transition_time: string; } diff --git a/schemas/core/openapi.yaml b/schemas/core/openapi.yaml index 358565a..d98b662 100644 --- a/schemas/core/openapi.yaml +++ b/schemas/core/openapi.yaml @@ -50,7 +50,7 @@ paths: **Note**: The `status` object in the response is read-only and computed by the service. It is NOT part of the request body. Initially, - status.conditions will include mandatory "Available" and "Ready" conditions (usually with status `Unknown`). + status.conditions will include mandatory "Available" and "Ready" conditions. parameters: [] responses: '201': @@ -759,18 +759,18 @@ components: generation: 1 status: conditions: - - type: Available + - type: Ready status: 'True' - reason: ResourceAvailable - message: Cluster is accessible + reason: ResourceReady + message: All conditions successful for current spec generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - - type: Ready + - type: Available status: 'True' - reason: ResourceReady - message: Cluster is ready + reason: ResourceAvailable + message: All conditions successful for observed_generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' @@ -875,7 +875,7 @@ components: - `type: "Available"`: indicates if the cluster is accessible and functional. - `type: "Ready"`: indicates if the cluster has reached its desired state. - These conditions are present immediately upon resource creation (usually with status `Unknown`). + These conditions are present immediately upon resource creation. description: |- Cluster status computed from all status conditions. @@ -1031,18 +1031,18 @@ components: href: https://api.hyperfleet.com/v1/clusters/cluster-123 status: conditions: - - type: Available + - type: Ready status: 'True' - reason: ResourceAvailable - message: NodePool is accessible + reason: ResourceReady + message: All conditions successful for observed_generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - - type: Ready + - type: Available status: 'True' - reason: ResourceReady - message: NodePool is ready + reason: ResourceAvailable + message: All conditions successful for current spec generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' @@ -1200,7 +1200,7 @@ components: - `type: "Available"`: indicates if the nodepool is accessible and functional. - `type: "Ready"`: indicates if the nodepool has reached its desired state. - These conditions are present immediately upon resource creation (usually with status `Unknown`). + These conditions are present immediately upon resource creation. description: |- NodePool status computed from all status conditions. diff --git a/schemas/gcp/openapi.yaml b/schemas/gcp/openapi.yaml index 8904fa6..eb045db 100644 --- a/schemas/gcp/openapi.yaml +++ b/schemas/gcp/openapi.yaml @@ -50,7 +50,7 @@ paths: **Note**: The `status` object in the response is read-only and computed by the service. It is NOT part of the request body. Initially, - status.conditions will include mandatory "Available" and "Ready" conditions (usually with status `Unknown`). + status.conditions will include mandatory "Available" and "Ready" conditions. parameters: [] responses: '201': @@ -657,18 +657,18 @@ components: generation: 1 status: conditions: - - type: Available + - type: Ready status: 'True' - reason: ResourceAvailable - message: Cluster is accessible + reason: ResourceReady + message: All conditions successful for current spec generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - - type: Ready + - type: Available status: 'True' - reason: ResourceReady - message: Cluster is ready + reason: ResourceAvailable + message: All conditions successful for observed_generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' @@ -833,7 +833,7 @@ components: - `type: "Available"`: indicates if the cluster is accessible and functional. - `type: "Ready"`: indicates if the cluster has reached its desired state. - These conditions are present immediately upon resource creation (usually with status `Unknown`). + These conditions are present immediately upon resource creation. description: |- Cluster status computed from all status conditions. @@ -1007,18 +1007,18 @@ components: href: https://api.hyperfleet.com/v1/clusters/cluster-123 status: conditions: - - type: Available + - type: Ready status: 'True' - reason: ResourceAvailable - message: NodePool is accessible + reason: ResourceReady + message: All conditions successful for current spec generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - - type: Ready + - type: Available status: 'True' - reason: ResourceReady - message: NodePool is ready + reason: ResourceAvailable + message: All conditions successful for observed_generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' @@ -1245,7 +1245,7 @@ components: - `type: "Available"`: indicates if the nodepool is accessible and functional. - `type: "Ready"`: indicates if the nodepool has reached its desired state. - These conditions are present immediately upon resource creation (usually with status `Unknown`). + These conditions are present immediately upon resource creation. description: |- NodePool status computed from all status conditions. diff --git a/schemas/gcp/swagger.yaml b/schemas/gcp/swagger.yaml index fef669b..8d66f7c 100644 --- a/schemas/gcp/swagger.yaml +++ b/schemas/gcp/swagger.yaml @@ -113,7 +113,7 @@ paths: It is NOT part of the request body. Initially, status.conditions will include mandatory "Available" and "Ready" - conditions (usually with status `Unknown`). + conditions. operationId: postCluster summary: Create cluster '/api/hyperfleet/v1/clusters/{cluster_id}': @@ -723,19 +723,19 @@ definitions: - created_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' - message: Cluster is accessible + message: All conditions successful for current spec generation observed_generation: 1 - reason: ResourceAvailable + reason: ResourceReady status: 'True' - type: Available + type: Ready - created_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' - message: Cluster is ready + message: All conditions successful for observed_generation observed_generation: 1 - reason: ResourceReady + reason: ResourceAvailable status: 'True' - type: Ready + type: Available - created_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' @@ -960,8 +960,7 @@ definitions: state. - These conditions are present immediately upon resource creation - (usually with status `Unknown`). + These conditions are present immediately upon resource creation. items: $ref: '#/definitions/ResourceCondition' minItems: 2 @@ -1081,19 +1080,19 @@ definitions: - created_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' - message: NodePool is accessible + message: All conditions successful for current spec generation observed_generation: 1 - reason: ResourceAvailable + reason: ResourceReady status: 'True' - type: Available + type: Ready - created_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' - message: NodePool is ready + message: All conditions successful for observed_generation observed_generation: 1 - reason: ResourceReady + reason: ResourceAvailable status: 'True' - type: Ready + type: Available - created_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' @@ -1380,8 +1379,7 @@ definitions: state. - These conditions are present immediately upon resource creation - (usually with status `Unknown`). + These conditions are present immediately upon resource creation. items: $ref: '#/definitions/ResourceCondition' minItems: 2 diff --git a/services/clusters.tsp b/services/clusters.tsp index 539df68..11e011e 100644 --- a/services/clusters.tsp +++ b/services/clusters.tsp @@ -38,7 +38,7 @@ interface Clusters { * * **Note**: The `status` object in the response is read-only and computed by the service. * It is NOT part of the request body. Initially, - * status.conditions will include mandatory "Available" and "Ready" conditions (usually with status `Unknown`). + * status.conditions will include mandatory "Available" and "Ready" conditions. * */ @route("") From d2f246b811036423b3ea7303a91e8f5fb7088101 Mon Sep 17 00:00:00 2001 From: Angel Marin Date: Fri, 23 Jan 2026 12:01:03 +0100 Subject: [PATCH 4/5] Refactor condition status handling to use ResourceConditionStatus enum - Updated various TSP models to replace ConditionStatus with ResourceConditionStatus for consistency across cluster and nodepool definitions. - Ensured that all condition types now align with the new enum structure, enhancing clarity and maintainability. --- models-core/cluster/example_cluster.tsp | 8 +-- models-core/nodepool/example_nodepool.tsp | 8 +-- models-gcp/cluster/example_cluster.tsp | 8 +-- models-gcp/nodepool/example_nodepool.tsp | 8 +-- models/common/model.tsp | 65 +++++++++++++++++++++- models/statuses/example_adapter_status.tsp | 16 +++--- models/statuses/model.tsp | 62 ++------------------- schemas/core/openapi.yaml | 38 +++++++------ schemas/gcp/openapi.yaml | 36 +++++++----- schemas/gcp/swagger.yaml | 36 +++++++----- 10 files changed, 157 insertions(+), 128 deletions(-) diff --git a/models-core/cluster/example_cluster.tsp b/models-core/cluster/example_cluster.tsp index cd33391..b20809b 100644 --- a/models-core/cluster/example_cluster.tsp +++ b/models-core/cluster/example_cluster.tsp @@ -15,7 +15,7 @@ const exampleCluster: Cluster = #{ conditions: #[ #{ type: ConditionType.Ready, - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "ResourceReady", message: "All conditions successful for current spec generation", observed_generation: 1, @@ -25,7 +25,7 @@ const exampleCluster: Cluster = #{ }, #{ type: ConditionType.Available, - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "ResourceAvailable", message: "All conditions successful for observed_generation", observed_generation: 1, @@ -35,7 +35,7 @@ const exampleCluster: Cluster = #{ }, #{ type: "ValidationSuccessful", - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "All validations passed", message: "All 30 validation tests passed", observed_generation: 1, @@ -45,7 +45,7 @@ const exampleCluster: Cluster = #{ }, #{ type: "DNSSuccessful", - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "DNS configured", message: "DNS records created for custom.domain.com", observed_generation: 1, diff --git a/models-core/nodepool/example_nodepool.tsp b/models-core/nodepool/example_nodepool.tsp index 081849e..479abc8 100644 --- a/models-core/nodepool/example_nodepool.tsp +++ b/models-core/nodepool/example_nodepool.tsp @@ -22,7 +22,7 @@ const exampleNodePool: NodePool = #{ conditions: #[ #{ type: "Ready", - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "ResourceReady", message: "NodePool is ready", message: "All conditions successful for observed_generation", @@ -33,7 +33,7 @@ const exampleNodePool: NodePool = #{ }, #{ type: ConditionType.Available, - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "ResourceAvailable", message: "All conditions successful for current spec generation", observed_generation: 1, @@ -43,7 +43,7 @@ const exampleNodePool: NodePool = #{ }, #{ type: "ValidationSuccessful", - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "All validations passed", message: "NodePool validation passed", observed_generation: 1, @@ -53,7 +53,7 @@ const exampleNodePool: NodePool = #{ }, #{ type: "NodePoolSuccessful", - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "NodePool provisioned successfully", message: "NodePool has been scaled to desired count", observed_generation: 1, diff --git a/models-gcp/cluster/example_cluster.tsp b/models-gcp/cluster/example_cluster.tsp index f273f8a..00ea4ed 100644 --- a/models-gcp/cluster/example_cluster.tsp +++ b/models-gcp/cluster/example_cluster.tsp @@ -37,7 +37,7 @@ const exampleCluster: Cluster = #{ conditions: #[ #{ type: "Ready", - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "ResourceReady", message: "All conditions successful for current spec generation", observed_generation: 1, @@ -47,7 +47,7 @@ const exampleCluster: Cluster = #{ }, #{ type: ConditionType.Available, - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "ResourceAvailable", message: "All conditions successful for observed_generation", observed_generation: 1, @@ -57,7 +57,7 @@ const exampleCluster: Cluster = #{ }, #{ type: "ValidationSuccessful", - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "All validations passed", message: "All 30 validation tests passed", observed_generation: 1, @@ -67,7 +67,7 @@ const exampleCluster: Cluster = #{ }, #{ type: "DNSSuccessful", - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "DNS configured", message: "DNS records created for custom.domain.com", observed_generation: 1, diff --git a/models-gcp/nodepool/example_nodepool.tsp b/models-gcp/nodepool/example_nodepool.tsp index ff889e2..3f158fc 100644 --- a/models-gcp/nodepool/example_nodepool.tsp +++ b/models-gcp/nodepool/example_nodepool.tsp @@ -44,7 +44,7 @@ const exampleNodePool: NodePool = #{ conditions: #[ #{ type: ConditionType.Ready, - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "ResourceReady", message: "All conditions successful for current spec generation", observed_generation: 1, @@ -54,7 +54,7 @@ const exampleNodePool: NodePool = #{ }, #{ type: ConditionType.Available, - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "ResourceAvailable", message: "All conditions successful for observed_generation", observed_generation: 1, @@ -64,7 +64,7 @@ const exampleNodePool: NodePool = #{ }, #{ type: "ValidationSuccessful", - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "All validations passed", message: "NodePool validation passed", observed_generation: 1, @@ -74,7 +74,7 @@ const exampleNodePool: NodePool = #{ }, #{ type: "NodePoolSuccessful", - status: ConditionStatus.True, + status: ResourceConditionStatus.True, reason: "NodePool provisioned successfully", message: "NodePool has 3 nodes running", observed_generation: 1, diff --git a/models/common/model.tsp b/models/common/model.tsp index c559fa0..12a2cb9 100644 --- a/models/common/model.tsp +++ b/models/common/model.tsp @@ -163,4 +163,67 @@ union ConditionType { string, Available: "Available", Ready: "Ready" -} \ No newline at end of file +} + +/** + * Base condition fields shared by all condition types + */ +model ConditionBase { + /** + * Condition type + */ + type: string; + + /** + * Machine-readable reason code + */ + reason?: string; + + /** + * Human-readable message + */ + message?: string; + + /** + * When this condition last transitioned status (API-managed) + * Only updated when status changes (True/False), not when reason/message changes + */ + @format("date-time") last_transition_time: string; +} + +/** + * Status value for adapter conditions + */ +enum AdapterConditionStatus { + True: "True", + False: "False", + Unknown, +} + +/** + * Condition in Cluster/NodePool status + * Used for semantic condition types: "ValidationSuccessful", "DNSSuccessful", "NodePoolSuccessful", etc. + * Includes observed_generation and last_updated_time to track adapter-specific state + */ +model ResourceCondition { + ...ConditionBase; + + status: ResourceConditionStatus; + + /** + * Generation of the spec that this condition reflects + */ + observed_generation: int32; + + /** + * When this condition was first created (API-managed) + */ + @format("date-time") created_time: string; + + /** + * When the corresponding adapter last reported (API-managed) + * Updated every time the adapter POSTs, even if condition status hasn't changed + * Copied from AdapterStatus.last_report_time + */ + @format("date-time") last_updated_time: string; +} diff --git a/models/statuses/example_adapter_status.tsp b/models/statuses/example_adapter_status.tsp index 07a7304..27d2ab1 100644 --- a/models/statuses/example_adapter_status.tsp +++ b/models/statuses/example_adapter_status.tsp @@ -7,21 +7,21 @@ const exampleAdapterStatus: AdapterStatus = (#{ conditions: #[ #{ type: ConditionType.Available, - status: ConditionStatus.True, + status: AdapterConditionStatus.True, reason: "All validations passed", message: "All 30 validation tests passed", last_transition_time: "2021-01-01T10:00:00Z", }, #{ type: "Applied", - status: ConditionStatus.True, + status: AdapterConditionStatus.True, reason: "Validation job applied", message: "Validation job applied successfully", last_transition_time: "2021-01-01T10:00:00Z", }, #{ type: "Health", - status: ConditionStatus.True, + status: AdapterConditionStatus.True, reason: "All adapter operations completed successfully", message: "All adapter runtime operations completed successfully", last_transition_time: "2021-01-01T10:00:00Z", @@ -54,19 +54,19 @@ const exampleAdapterStatusCreateRequest: AdapterStatusCreateRequest = (#{ conditions: #[ #{ type: ConditionType.Available, - status: ConditionStatus.True, + status: AdapterConditionStatus.True, reason: "All validations passed", message: "All 30 validation tests passed", }, #{ type: "Applied", - status: ConditionStatus.True, + status: AdapterConditionStatus.True, reason: "Validation job applied", message: "Validation job applied successfully", }, #{ type: "Health", - status: ConditionStatus.True, + status: AdapterConditionStatus.True, reason: "All adapter operations completed successfully", message: "All adapter runtime operations completed successfully", } @@ -101,7 +101,7 @@ const exampleAdapterStatusList: AdapterStatusList = (#{ conditions: #[ #{ type: ConditionType.Available, - status: ConditionStatus.True, + status: AdapterConditionStatus.True, reason: "All validations passed", message: "All 30 validation tests passed", last_transition_time: "2021-01-01T10:00:00Z", @@ -120,7 +120,7 @@ const exampleAdapterStatusList: AdapterStatusList = (#{ conditions: #[ #{ type: ConditionType.Available, - status: ConditionStatus.True, + status: AdapterConditionStatus.True, reason: "DNS configured", message: "DNS records created", last_transition_time: "2021-01-01T10:01:00Z", diff --git a/models/statuses/model.tsp b/models/statuses/model.tsp index 8280c34..d95061b 100644 --- a/models/statuses/model.tsp +++ b/models/statuses/model.tsp @@ -2,40 +2,11 @@ import "../common/model.tsp"; import "./example_adapter_status.tsp"; /** - * Status value for conditions + * Status value for resource conditions */ -enum ConditionStatus { +enum ResourceConditionStatus { True: "True", False: "False", - Unknown, -} - -/** - * Base condition fields shared by all condition types - */ -model ConditionBase { - /** - * Condition type - */ - type: string; - - status: ConditionStatus; - - /** - * Machine-readable reason code - */ - reason?: string; - - /** - * Human-readable message - */ - message?: string; - - /** - * When this condition last transitioned status (API-managed) - * Only updated when status changes (True/False), not when reason/message changes - */ - @format("date-time") last_transition_time: string; } /** @@ -46,41 +17,18 @@ model ConditionBase { */ model AdapterCondition { ...ConditionBase; - // No additional fields - inherits all fields from ConditionBase -} -/** - * Condition in Cluster/NodePool status - * Used for semantic condition types: "ValidationSuccessful", "DNSSuccessful", "NodePoolSuccessful", etc. - * Includes observed_generation and last_updated_time to track adapter-specific state - */ -model ResourceCondition { - ...ConditionBase; - /** - * Generation of the spec that this condition reflects - */ - observed_generation: int32; - - /** - * When this condition was first created (API-managed) - */ - @format("date-time") created_time: string; - - /** - * When the corresponding adapter last reported (API-managed) - * Updated every time the adapter POSTs, even if condition status hasn't changed - * Copied from AdapterStatus.last_report_time - */ - @format("date-time") last_updated_time: string; + status: AdapterConditionStatus; } + /** * Condition data for create/update requests (from adapters) * observed_generation and observed_time are now at AdapterStatusCreateRequest level */ model ConditionRequest { type: string; - status: ConditionStatus; + status: AdapterConditionStatus; reason?: string; message?: string; } diff --git a/schemas/core/openapi.yaml b/schemas/core/openapi.yaml index d98b662..81624ba 100644 --- a/schemas/core/openapi.yaml +++ b/schemas/core/openapi.yaml @@ -428,14 +428,12 @@ components: type: object required: - type - - status - last_transition_time + - status properties: type: type: string description: Condition type - status: - $ref: '#/components/schemas/ConditionStatus' reason: type: string description: Machine-readable reason code @@ -447,12 +445,21 @@ components: format: date-time description: |- When this condition last transitioned status (API-managed) - Only updated when status changes (True/False/Unknown), not when reason/message changes + Only updated when status changes (True/False), not when reason/message changes + status: + $ref: '#/components/schemas/AdapterConditionStatus' description: |- Condition in AdapterStatus Used for standard Kubernetes condition types: "Available", "Applied", "Health" Note: observed_generation is at AdapterStatus level, not per-condition, since all conditions in one AdapterStatus share the same observed generation + AdapterConditionStatus: + type: string + enum: + - 'True' + - 'False' + - Unknown + description: Status value for adapter conditions AdapterStatus: type: object required: @@ -892,7 +899,7 @@ components: type: type: string status: - $ref: '#/components/schemas/ConditionStatus' + $ref: '#/components/schemas/AdapterConditionStatus' reason: type: string message: @@ -900,13 +907,6 @@ components: description: |- Condition data for create/update requests (from adapters) observed_generation and observed_time are now at AdapterStatusCreateRequest level - ConditionStatus: - type: string - enum: - - 'True' - - 'False' - - Unknown - description: Status value for conditions Error: type: object required: @@ -1226,8 +1226,8 @@ components: type: object required: - type - - status - last_transition_time + - status - observed_generation - created_time - last_updated_time @@ -1235,8 +1235,6 @@ components: type: type: string description: Condition type - status: - $ref: '#/components/schemas/ConditionStatus' reason: type: string description: Machine-readable reason code @@ -1248,7 +1246,9 @@ components: format: date-time description: |- When this condition last transitioned status (API-managed) - Only updated when status changes (True/False/Unknown), not when reason/message changes + Only updated when status changes (True/False), not when reason/message changes + status: + $ref: '#/components/schemas/ResourceConditionStatus' observed_generation: type: integer format: int32 @@ -1268,6 +1268,12 @@ components: Condition in Cluster/NodePool status Used for semantic condition types: "ValidationSuccessful", "DNSSuccessful", "NodePoolSuccessful", etc. Includes observed_generation and last_updated_time to track adapter-specific state + ResourceConditionStatus: + type: string + enum: + - 'True' + - 'False' + description: Status value for resource conditions ValidationError: type: object required: diff --git a/schemas/gcp/openapi.yaml b/schemas/gcp/openapi.yaml index eb045db..3439f82 100644 --- a/schemas/gcp/openapi.yaml +++ b/schemas/gcp/openapi.yaml @@ -362,14 +362,12 @@ components: type: object required: - type - - status - last_transition_time + - status properties: type: type: string description: Condition type - status: - $ref: '#/components/schemas/ConditionStatus' reason: type: string description: Machine-readable reason code @@ -381,12 +379,21 @@ components: format: date-time description: |- When this condition last transitioned status (API-managed) - Only updated when status changes (True/False/Unknown), not when reason/message changes + Only updated when status changes (True/False), not when reason/message changes + status: + $ref: '#/components/schemas/AdapterConditionStatus' description: |- Condition in AdapterStatus Used for standard Kubernetes condition types: "Available", "Applied", "Health" Note: observed_generation is at AdapterStatus level, not per-condition, since all conditions in one AdapterStatus share the same observed generation + AdapterConditionStatus: + type: string + enum: + - 'True' + - 'False' + - Unknown + description: Status value for adapter conditions AdapterStatus: type: object required: @@ -841,13 +848,6 @@ components: It is aggregated from condition updates posted to `/clusters/{id}/statuses`. Provides quick overview of all reported conditions. - ConditionStatus: - type: string - enum: - - 'True' - - 'False' - - Unknown - description: Status value for conditions DNSSpec: type: object properties: @@ -1278,8 +1278,8 @@ components: type: object required: - type - - status - last_transition_time + - status - observed_generation - created_time - last_updated_time @@ -1287,8 +1287,6 @@ components: type: type: string description: Condition type - status: - $ref: '#/components/schemas/ConditionStatus' reason: type: string description: Machine-readable reason code @@ -1300,7 +1298,9 @@ components: format: date-time description: |- When this condition last transitioned status (API-managed) - Only updated when status changes (True/False/Unknown), not when reason/message changes + Only updated when status changes (True/False), not when reason/message changes + status: + $ref: '#/components/schemas/ResourceConditionStatus' observed_generation: type: integer format: int32 @@ -1320,6 +1320,12 @@ components: Condition in Cluster/NodePool status Used for semantic condition types: "ValidationSuccessful", "DNSSuccessful", "NodePoolSuccessful", etc. Includes observed_generation and last_updated_time to track adapter-specific state + ResourceConditionStatus: + type: string + enum: + - 'True' + - 'False' + description: Status value for resource conditions TaintSpec: type: object required: diff --git a/schemas/gcp/swagger.yaml b/schemas/gcp/swagger.yaml index 8d66f7c..414ad78 100644 --- a/schemas/gcp/swagger.yaml +++ b/schemas/gcp/swagger.yaml @@ -479,8 +479,8 @@ definitions: description: >- When this condition last transitioned status (API-managed) - Only updated when status changes (True/False/Unknown), not when - reason/message changes + Only updated when status changes (True/False), not when reason/message + changes format: date-time type: string message: @@ -490,15 +490,22 @@ definitions: description: Machine-readable reason code type: string status: - $ref: '#/definitions/ConditionStatus' + $ref: '#/definitions/AdapterConditionStatus' type: description: Condition type type: string required: - type - - status - last_transition_time + - status type: object + AdapterConditionStatus: + description: Status value for adapter conditions + enum: + - 'True' + - 'False' + - Unknown + type: string AdapterStatus: description: |- AdapterStatus represents the complete status report from an adapter @@ -968,13 +975,6 @@ definitions: required: - conditions type: object - ConditionStatus: - description: Status value for conditions - enum: - - 'True' - - 'False' - - Unknown - type: string DNSSpec: properties: baseDomain: @@ -1429,8 +1429,8 @@ definitions: description: >- When this condition last transitioned status (API-managed) - Only updated when status changes (True/False/Unknown), not when - reason/message changes + Only updated when status changes (True/False), not when reason/message + changes format: date-time type: string last_updated_time: @@ -1454,18 +1454,24 @@ definitions: description: Machine-readable reason code type: string status: - $ref: '#/definitions/ConditionStatus' + $ref: '#/definitions/ResourceConditionStatus' type: description: Condition type type: string required: - type - - status - last_transition_time + - status - observed_generation - created_time - last_updated_time type: object + ResourceConditionStatus: + description: Status value for resource conditions + enum: + - 'True' + - 'False' + type: string TaintSpec: properties: effect: From 94063c63357f0857f04a929f412de9e7d2e52b29 Mon Sep 17 00:00:00 2001 From: Angel Marin Date: Wed, 28 Jan 2026 14:18:10 +0100 Subject: [PATCH 5/5] Change examples text --- models-core/cluster/example_cluster.tsp | 21 +++--- models-core/nodepool/example_nodepool.tsp | 24 +++---- models-gcp/cluster/example_cluster.tsp | 23 +++--- models/clusters/model.tsp | 4 +- models/common/model.tsp | 19 +++++ models/nodepools/model.tsp | 4 +- models/statuses/example_adapter_status.tsp | 39 +++++----- schemas/core/openapi.yaml | 82 +++++++++++----------- schemas/gcp/openapi.yaml | 52 +++++++------- schemas/gcp/swagger.yaml | 60 ++++++++-------- 10 files changed, 175 insertions(+), 153 deletions(-) diff --git a/models-core/cluster/example_cluster.tsp b/models-core/cluster/example_cluster.tsp index b20809b..b7034ee 100644 --- a/models-core/cluster/example_cluster.tsp +++ b/models-core/cluster/example_cluster.tsp @@ -1,5 +1,6 @@ import "../../aliases-core.tsp"; import "../../models/clusters/model.tsp"; +import "../../models/common/model.tsp"; const exampleCluster: Cluster = #{ kind: "Cluster", @@ -16,8 +17,8 @@ const exampleCluster: Cluster = #{ #{ type: ConditionType.Ready, status: ResourceConditionStatus.True, - reason: "ResourceReady", - message: "All conditions successful for current spec generation", + reason: ExampleReadyReason, + message: ExampleReadyMessage, observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", @@ -26,28 +27,28 @@ const exampleCluster: Cluster = #{ #{ type: ConditionType.Available, status: ResourceConditionStatus.True, - reason: "ResourceAvailable", - message: "All conditions successful for observed_generation", + reason: ExampleAvailableReason, + message: ExampleAvailableMessage, observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: "ValidationSuccessful", + type: "Adapter1Successful", status: ResourceConditionStatus.True, - reason: "All validations passed", - message: "All 30 validation tests passed", + reason: ExampleAdapter1AvaliableReason, + message: ExampleAdapter1AvaliableMessage, observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: "DNSSuccessful", + type: "Adapter2Successful", status: ResourceConditionStatus.True, - reason: "DNS configured", - message: "DNS records created for custom.domain.com", + reason: ExampleAdapter2AvaliableReason, + message: ExampleAdapter2AvaliableMessage, observed_generation: 1, created_time: "2021-01-01T10:01:00Z", last_updated_time: "2021-01-01T10:01:00Z", diff --git a/models-core/nodepool/example_nodepool.tsp b/models-core/nodepool/example_nodepool.tsp index 479abc8..349a518 100644 --- a/models-core/nodepool/example_nodepool.tsp +++ b/models-core/nodepool/example_nodepool.tsp @@ -1,5 +1,6 @@ import "../../aliases-core.tsp"; import "../../models/nodepools/model.tsp"; +import "../../models/common/model.tsp"; const exampleNodePool: NodePool = #{ kind: "NodePool", @@ -21,11 +22,10 @@ const exampleNodePool: NodePool = #{ status: #{ conditions: #[ #{ - type: "Ready", + type: ConditionType.Ready, status: ResourceConditionStatus.True, - reason: "ResourceReady", - message: "NodePool is ready", - message: "All conditions successful for observed_generation", + reason: ExampleReadyReason, + message: ExampleReadyMessage, observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", @@ -34,28 +34,28 @@ const exampleNodePool: NodePool = #{ #{ type: ConditionType.Available, status: ResourceConditionStatus.True, - reason: "ResourceAvailable", - message: "All conditions successful for current spec generation", + reason: ExampleAvailableReason, + message: ExampleAvailableMessage, observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: "ValidationSuccessful", + type: "Adapter1Successful", status: ResourceConditionStatus.True, - reason: "All validations passed", - message: "NodePool validation passed", + reason: ExampleAdapter1AvaliableReason, + message: ExampleAdapter1AvaliableMessage, observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: "NodePoolSuccessful", + type: "Adapter2Successful", status: ResourceConditionStatus.True, - reason: "NodePool provisioned successfully", - message: "NodePool has been scaled to desired count", + reason: ExampleAdapter2AvaliableReason, + message: ExampleAdapter2AvaliableMessage, observed_generation: 1, created_time: "2021-01-01T10:01:00Z", last_updated_time: "2021-01-01T10:01:00Z", diff --git a/models-gcp/cluster/example_cluster.tsp b/models-gcp/cluster/example_cluster.tsp index 00ea4ed..a732e36 100644 --- a/models-gcp/cluster/example_cluster.tsp +++ b/models-gcp/cluster/example_cluster.tsp @@ -1,5 +1,6 @@ import "../../aliases-gcp.tsp"; import "../../models/clusters/model.tsp"; +import "../../models/common/model.tsp"; const exampleCluster: Cluster = #{ kind: "Cluster", @@ -36,10 +37,10 @@ const exampleCluster: Cluster = #{ status: #{ conditions: #[ #{ - type: "Ready", + type: ConditionType.Ready, status: ResourceConditionStatus.True, - reason: "ResourceReady", - message: "All conditions successful for current spec generation", + reason: ExampleReadyReason, + message: ExampleReadyMessage, observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", @@ -48,28 +49,28 @@ const exampleCluster: Cluster = #{ #{ type: ConditionType.Available, status: ResourceConditionStatus.True, - reason: "ResourceAvailable", - message: "All conditions successful for observed_generation", + reason: ExampleAvailableReason, + message: ExampleAvailableMessage, observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: "ValidationSuccessful", + type: "Adapter1Successful", status: ResourceConditionStatus.True, - reason: "All validations passed", - message: "All 30 validation tests passed", + reason: ExampleAdapter1AvaliableReason, + message: ExampleAdapter1AvaliableMessage, observed_generation: 1, created_time: "2021-01-01T10:00:00Z", last_updated_time: "2021-01-01T10:00:00Z", last_transition_time: "2021-01-01T10:00:00Z", }, #{ - type: "DNSSuccessful", + type: "Adapter2Successful", status: ResourceConditionStatus.True, - reason: "DNS configured", - message: "DNS records created for custom.domain.com", + reason: ExampleAdapter2AvaliableReason, + message: ExampleAdapter2AvaliableMessage, observed_generation: 1, created_time: "2021-01-01T10:01:00Z", last_updated_time: "2021-01-01T10:01:00Z", diff --git a/models/clusters/model.tsp b/models/clusters/model.tsp index 868b743..56975d0 100644 --- a/models/clusters/model.tsp +++ b/models/clusters/model.tsp @@ -30,8 +30,8 @@ model ClusterStatus { * List of status conditions for the cluster. * * **Mandatory conditions**: - * - `type: "Available"`: indicates if the cluster is accessible and functional. - * - `type: "Ready"`: indicates if the cluster has reached its desired state. + * - `type: "Ready"`: Whether all adapters report successfully at the current generation. + * - `type: "Available"`: Aggregated adapter result for a common observed_generation. * * These conditions are present immediately upon resource creation. */ diff --git a/models/common/model.tsp b/models/common/model.tsp index 12a2cb9..d9356f2 100644 --- a/models/common/model.tsp +++ b/models/common/model.tsp @@ -227,3 +227,22 @@ model ResourceCondition { */ @format("date-time") last_updated_time: string; } + + const ExampleAvailableReason: string = "All adapters reported Available True for the same generation"; + const ExampleAvailableMessage: string = "All adapters reported Available True for the same generation"; + const ExampleReadyReason: string = "All adapters reported Ready True for the current generation"; + const ExampleReadyMessage: string = "All adapters reported Ready True for the current generation"; + const ExampleAdapter1: string = "adapter1"; + const ExampleAdapter2: string = "adapter2"; + const ExampleAdapter1AppliedReason: string = "Validation job applied"; + const ExampleAdapter1AppliedMessage: string = "Adapter1 validation job applied successfully"; + const ExampleAdapter1HealthReason: string = "All adapter1 operations completed successfully"; + const ExampleAdapter1HealthMessage: string = "All adapter1 runtime operations completed successfully"; + const ExampleAdapter1AvaliableReason: string = "This adapter1 is available"; + const ExampleAdapter1AvaliableMessage: string = "This adapter1 is available"; + const ExampleAdapter2AppliedReason: string = "Validation job applied"; + const ExampleAdapter2AppliedMessage: string = "Adapter2 validation job applied successfully"; + const ExampleAdapter2HealthReason: string = "All adapter2 operations completed successfully"; + const ExampleAdapter2HealthMessage: string = "All adapter2 runtime operations completed successfully"; + const ExampleAdapter2AvaliableReason: string = "This adapter2 is available"; + const ExampleAdapter2AvaliableMessage: string = "This adapter2 is available"; diff --git a/models/nodepools/model.tsp b/models/nodepools/model.tsp index e4966d8..45a9b83 100644 --- a/models/nodepools/model.tsp +++ b/models/nodepools/model.tsp @@ -27,8 +27,8 @@ model NodePoolStatus { * List of status conditions for the nodepool. * * **Mandatory conditions**: - * - `type: "Available"`: indicates if the nodepool is accessible and functional. - * - `type: "Ready"`: indicates if the nodepool has reached its desired state. + * - `type: "Ready"`: Whether all adapters report successfully at the current generation. + * - `type: "Available"`: Aggregated adapter result for a common observed_generation. * * These conditions are present immediately upon resource creation. */ diff --git a/models/statuses/example_adapter_status.tsp b/models/statuses/example_adapter_status.tsp index 27d2ab1..5e47d72 100644 --- a/models/statuses/example_adapter_status.tsp +++ b/models/statuses/example_adapter_status.tsp @@ -1,29 +1,30 @@ import "../../models/statuses/model.tsp"; +import "../../models/common/model.tsp"; // Example AdapterStatus for validator adapter const exampleAdapterStatus: AdapterStatus = (#{ - adapter: "validator", + adapter: ExampleAdapter1, observed_generation: 1, conditions: #[ #{ type: ConditionType.Available, status: AdapterConditionStatus.True, - reason: "All validations passed", - message: "All 30 validation tests passed", + reason: ExampleAdapter1AvaliableReason, + message: ExampleAdapter1AvaliableMessage, last_transition_time: "2021-01-01T10:00:00Z", }, #{ type: "Applied", status: AdapterConditionStatus.True, - reason: "Validation job applied", - message: "Validation job applied successfully", + reason: ExampleAdapter1AppliedReason, + message: ExampleAdapter1AppliedMessage, last_transition_time: "2021-01-01T10:00:00Z", }, #{ type: "Health", status: AdapterConditionStatus.True, - reason: "All adapter operations completed successfully", - message: "All adapter runtime operations completed successfully", + reason: ExampleAdapter1HealthReason, + message: ExampleAdapter1HealthMessage, last_transition_time: "2021-01-01T10:00:00Z", } ], @@ -55,20 +56,20 @@ const exampleAdapterStatusCreateRequest: AdapterStatusCreateRequest = (#{ #{ type: ConditionType.Available, status: AdapterConditionStatus.True, - reason: "All validations passed", - message: "All 30 validation tests passed", + reason: ExampleAdapter1AvaliableReason, + message: ExampleAdapter1AvaliableMessage, }, #{ type: "Applied", status: AdapterConditionStatus.True, - reason: "Validation job applied", - message: "Validation job applied successfully", + reason: ExampleAdapter1AppliedReason, + message: ExampleAdapter1AppliedMessage, }, #{ type: "Health", status: AdapterConditionStatus.True, - reason: "All adapter operations completed successfully", - message: "All adapter runtime operations completed successfully", + reason: ExampleAdapter1HealthReason, + message: ExampleAdapter1HealthMessage, } ], metadata: #{ @@ -96,14 +97,14 @@ const exampleAdapterStatusList: AdapterStatusList = (#{ total: 2, items: #[ #{ - adapter: "validator", + adapter: ExampleAdapter1, observed_generation: 1, conditions: #[ #{ type: ConditionType.Available, status: AdapterConditionStatus.True, - reason: "All validations passed", - message: "All 30 validation tests passed", + reason: ExampleAdapter1AvaliableReason, + message: ExampleAdapter1AvaliableMessage, last_transition_time: "2021-01-01T10:00:00Z", }, ], @@ -115,14 +116,14 @@ const exampleAdapterStatusList: AdapterStatusList = (#{ last_report_time: "2021-01-01T10:02:00Z", }, #{ - adapter: "dns", + adapter: ExampleAdapter2, observed_generation: 1, conditions: #[ #{ type: ConditionType.Available, status: AdapterConditionStatus.True, - reason: "DNS configured", - message: "DNS records created", + reason: ExampleAdapter2AvaliableReason, + message: ExampleAdapter2AvaliableMessage, last_transition_time: "2021-01-01T10:01:00Z", }, ], diff --git a/schemas/core/openapi.yaml b/schemas/core/openapi.yaml index 81624ba..46f47e7 100644 --- a/schemas/core/openapi.yaml +++ b/schemas/core/openapi.yaml @@ -521,23 +521,23 @@ components: AdapterStatus represents the complete status report from an adapter Contains multiple conditions, job metadata, and adapter-specific data example: - adapter: validator + adapter: adapter1 observed_generation: 1 conditions: - type: Available status: 'True' - reason: All validations passed - message: All 30 validation tests passed + reason: This adapter1 is available + message: This adapter1 is available last_transition_time: '2021-01-01T10:00:00Z' - type: Applied status: 'True' reason: Validation job applied - message: Validation job applied successfully + message: Adapter1 validation job applied successfully last_transition_time: '2021-01-01T10:00:00Z' - type: Health status: 'True' - reason: All adapter operations completed successfully - message: All adapter runtime operations completed successfully + reason: All adapter1 operations completed successfully + message: All adapter1 runtime operations completed successfully last_transition_time: '2021-01-01T10:00:00Z' metadata: job_name: validator-job-abc123 @@ -609,16 +609,16 @@ components: conditions: - type: Available status: 'True' - reason: All validations passed - message: All 30 validation tests passed + reason: This adapter1 is available + message: This adapter1 is available - type: Applied status: 'True' reason: Validation job applied - message: Validation job applied successfully + message: Adapter1 validation job applied successfully - type: Health status: 'True' - reason: All adapter operations completed successfully - message: All adapter runtime operations completed successfully + reason: All adapter1 operations completed successfully + message: All adapter1 runtime operations completed successfully metadata: job_name: validator-job-abc123 job_namespace: hyperfleet-system @@ -662,26 +662,26 @@ components: size: 2 total: 2 items: - - adapter: validator + - adapter: adapter1 observed_generation: 1 conditions: - type: Available status: 'True' - reason: All validations passed - message: All 30 validation tests passed + reason: This adapter1 is available + message: This adapter1 is available last_transition_time: '2021-01-01T10:00:00Z' metadata: job_name: validator-job-abc123 duration: 2m created_time: '2021-01-01T10:00:00Z' last_report_time: '2021-01-01T10:02:00Z' - - adapter: dns + - adapter: adapter2 observed_generation: 1 conditions: - type: Available status: 'True' - reason: DNS configured - message: DNS records created + reason: This adapter2 is available + message: This adapter2 is available last_transition_time: '2021-01-01T10:01:00Z' created_time: '2021-01-01T10:01:00Z' last_report_time: '2021-01-01T10:01:30Z' @@ -768,32 +768,32 @@ components: conditions: - type: Ready status: 'True' - reason: ResourceReady - message: All conditions successful for current spec generation + reason: All adapters reported Ready True for the current generation + message: All adapters reported Ready True for the current generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - type: Available status: 'True' - reason: ResourceAvailable - message: All conditions successful for observed_generation + reason: All adapters reported Available True for the same generation + message: All adapters reported Available True for the same generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - - type: ValidationSuccessful + - type: Adapter1Successful status: 'True' - reason: All validations passed - message: All 30 validation tests passed + reason: This adapter1 is available + message: This adapter1 is available observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - - type: DNSSuccessful + - type: Adapter2Successful status: 'True' - reason: DNS configured - message: DNS records created for custom.domain.com + reason: This adapter2 is available + message: This adapter2 is available observed_generation: 1 created_time: '2021-01-01T10:01:00Z' last_updated_time: '2021-01-01T10:01:00Z' @@ -879,8 +879,8 @@ components: List of status conditions for the cluster. **Mandatory conditions**: - - `type: "Available"`: indicates if the cluster is accessible and functional. - - `type: "Ready"`: indicates if the cluster has reached its desired state. + - `type: "Ready"`: Whether all adapters report successfully at the current generation. + - `type: "Available"`: Aggregated adapter result for a common observed_generation. These conditions are present immediately upon resource creation. description: |- @@ -1033,32 +1033,32 @@ components: conditions: - type: Ready status: 'True' - reason: ResourceReady - message: All conditions successful for observed_generation + reason: All adapters reported Ready True for the current generation + message: All adapters reported Ready True for the current generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - type: Available status: 'True' - reason: ResourceAvailable - message: All conditions successful for current spec generation + reason: All adapters reported Available True for the same generation + message: All adapters reported Available True for the same generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - - type: ValidationSuccessful + - type: Adapter1Successful status: 'True' - reason: All validations passed - message: NodePool validation passed + reason: This adapter1 is available + message: This adapter1 is available observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - - type: NodePoolSuccessful + - type: Adapter2Successful status: 'True' - reason: NodePool provisioned successfully - message: NodePool has been scaled to desired count + reason: This adapter2 is available + message: This adapter2 is available observed_generation: 1 created_time: '2021-01-01T10:01:00Z' last_updated_time: '2021-01-01T10:01:00Z' @@ -1197,8 +1197,8 @@ components: List of status conditions for the nodepool. **Mandatory conditions**: - - `type: "Available"`: indicates if the nodepool is accessible and functional. - - `type: "Ready"`: indicates if the nodepool has reached its desired state. + - `type: "Ready"`: Whether all adapters report successfully at the current generation. + - `type: "Available"`: Aggregated adapter result for a common observed_generation. These conditions are present immediately upon resource creation. description: |- diff --git a/schemas/gcp/openapi.yaml b/schemas/gcp/openapi.yaml index 3439f82..5c513f8 100644 --- a/schemas/gcp/openapi.yaml +++ b/schemas/gcp/openapi.yaml @@ -455,23 +455,23 @@ components: AdapterStatus represents the complete status report from an adapter Contains multiple conditions, job metadata, and adapter-specific data example: - adapter: validator + adapter: adapter1 observed_generation: 1 conditions: - type: Available status: 'True' - reason: All validations passed - message: All 30 validation tests passed + reason: This adapter1 is available + message: This adapter1 is available last_transition_time: '2021-01-01T10:00:00Z' - type: Applied status: 'True' reason: Validation job applied - message: Validation job applied successfully + message: Adapter1 validation job applied successfully last_transition_time: '2021-01-01T10:00:00Z' - type: Health status: 'True' - reason: All adapter operations completed successfully - message: All adapter runtime operations completed successfully + reason: All adapter1 operations completed successfully + message: All adapter1 runtime operations completed successfully last_transition_time: '2021-01-01T10:00:00Z' metadata: job_name: validator-job-abc123 @@ -518,26 +518,26 @@ components: size: 2 total: 2 items: - - adapter: validator + - adapter: adapter1 observed_generation: 1 conditions: - type: Available status: 'True' - reason: All validations passed - message: All 30 validation tests passed + reason: This adapter1 is available + message: This adapter1 is available last_transition_time: '2021-01-01T10:00:00Z' metadata: job_name: validator-job-abc123 duration: 2m created_time: '2021-01-01T10:00:00Z' last_report_time: '2021-01-01T10:02:00Z' - - adapter: dns + - adapter: adapter2 observed_generation: 1 conditions: - type: Available status: 'True' - reason: DNS configured - message: DNS records created + reason: This adapter2 is available + message: This adapter2 is available last_transition_time: '2021-01-01T10:01:00Z' created_time: '2021-01-01T10:01:00Z' last_report_time: '2021-01-01T10:01:30Z' @@ -666,32 +666,32 @@ components: conditions: - type: Ready status: 'True' - reason: ResourceReady - message: All conditions successful for current spec generation + reason: All adapters reported Ready True for the current generation + message: All adapters reported Ready True for the current generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - type: Available status: 'True' - reason: ResourceAvailable - message: All conditions successful for observed_generation + reason: All adapters reported Available True for the same generation + message: All adapters reported Available True for the same generation observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - - type: ValidationSuccessful + - type: Adapter1Successful status: 'True' - reason: All validations passed - message: All 30 validation tests passed + reason: This adapter1 is available + message: This adapter1 is available observed_generation: 1 created_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' - - type: DNSSuccessful + - type: Adapter2Successful status: 'True' - reason: DNS configured - message: DNS records created for custom.domain.com + reason: This adapter2 is available + message: This adapter2 is available observed_generation: 1 created_time: '2021-01-01T10:01:00Z' last_updated_time: '2021-01-01T10:01:00Z' @@ -837,8 +837,8 @@ components: List of status conditions for the cluster. **Mandatory conditions**: - - `type: "Available"`: indicates if the cluster is accessible and functional. - - `type: "Ready"`: indicates if the cluster has reached its desired state. + - `type: "Ready"`: Whether all adapters report successfully at the current generation. + - `type: "Available"`: Aggregated adapter result for a common observed_generation. These conditions are present immediately upon resource creation. description: |- @@ -1242,8 +1242,8 @@ components: List of status conditions for the nodepool. **Mandatory conditions**: - - `type: "Available"`: indicates if the nodepool is accessible and functional. - - `type: "Ready"`: indicates if the nodepool has reached its desired state. + - `type: "Ready"`: Whether all adapters report successfully at the current generation. + - `type: "Available"`: Aggregated adapter result for a common observed_generation. These conditions are present immediately upon resource creation. description: |- diff --git a/schemas/gcp/swagger.yaml b/schemas/gcp/swagger.yaml index 414ad78..c57a25b 100644 --- a/schemas/gcp/swagger.yaml +++ b/schemas/gcp/swagger.yaml @@ -511,21 +511,21 @@ definitions: AdapterStatus represents the complete status report from an adapter Contains multiple conditions, job metadata, and adapter-specific data example: - adapter: validator + adapter: adapter1 conditions: - last_transition_time: '2021-01-01T10:00:00Z' - message: All 30 validation tests passed - reason: All validations passed + message: This adapter1 is available + reason: This adapter1 is available status: 'True' type: Available - last_transition_time: '2021-01-01T10:00:00Z' - message: Validation job applied successfully + message: Adapter1 validation job applied successfully reason: Validation job applied status: 'True' type: Applied - last_transition_time: '2021-01-01T10:00:00Z' - message: All adapter runtime operations completed successfully - reason: All adapter operations completed successfully + message: All adapter1 runtime operations completed successfully + reason: All adapter1 operations completed successfully status: 'True' type: Health created_time: '2021-01-01T10:00:00Z' @@ -606,11 +606,11 @@ definitions: description: List of adapter statuses with pagination metadata example: items: - - adapter: validator + - adapter: adapter1 conditions: - last_transition_time: '2021-01-01T10:00:00Z' - message: All 30 validation tests passed - reason: All validations passed + message: This adapter1 is available + reason: This adapter1 is available status: 'True' type: Available created_time: '2021-01-01T10:00:00Z' @@ -619,11 +619,11 @@ definitions: duration: 2m job_name: validator-job-abc123 observed_generation: 1 - - adapter: dns + - adapter: adapter2 conditions: - last_transition_time: '2021-01-01T10:01:00Z' - message: DNS records created - reason: DNS configured + message: This adapter2 is available + reason: This adapter2 is available status: 'True' type: Available created_time: '2021-01-01T10:01:00Z' @@ -730,35 +730,35 @@ definitions: - created_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' - message: All conditions successful for current spec generation + message: All adapters reported Ready True for the current generation observed_generation: 1 - reason: ResourceReady + reason: All adapters reported Ready True for the current generation status: 'True' type: Ready - created_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' - message: All conditions successful for observed_generation + message: All adapters reported Available True for the same generation observed_generation: 1 - reason: ResourceAvailable + reason: All adapters reported Available True for the same generation status: 'True' type: Available - created_time: '2021-01-01T10:00:00Z' last_transition_time: '2021-01-01T10:00:00Z' last_updated_time: '2021-01-01T10:00:00Z' - message: All 30 validation tests passed + message: This adapter1 is available observed_generation: 1 - reason: All validations passed + reason: This adapter1 is available status: 'True' - type: ValidationSuccessful + type: Adapter1Successful - created_time: '2021-01-01T10:01:00Z' last_transition_time: '2021-01-01T10:01:00Z' last_updated_time: '2021-01-01T10:01:00Z' - message: DNS records created for custom.domain.com + message: This adapter2 is available observed_generation: 1 - reason: DNS configured + reason: This adapter2 is available status: 'True' - type: DNSSuccessful + type: Adapter2Successful updated_by: user-123@example.com updated_time: '2021-01-01T00:00:00Z' properties: @@ -960,11 +960,11 @@ definitions: **Mandatory conditions**: - - `type: "Available"`: indicates if the cluster is accessible and - functional. + - `type: "Ready"`: Whether all adapters report successfully at the + current generation. - - `type: "Ready"`: indicates if the cluster has reached its desired - state. + - `type: "Available"`: Aggregated adapter result for a common + observed_generation. These conditions are present immediately upon resource creation. @@ -1372,11 +1372,11 @@ definitions: **Mandatory conditions**: - - `type: "Available"`: indicates if the nodepool is accessible and - functional. + - `type: "Ready"`: Whether all adapters report successfully at the + current generation. - - `type: "Ready"`: indicates if the nodepool has reached its desired - state. + - `type: "Available"`: Aggregated adapter result for a common + observed_generation. These conditions are present immediately upon resource creation.