diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/examples/2026-06-15-preview/ListAsyncOperationStatus.json b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/examples/2026-06-15-preview/ListAsyncOperationStatus.json new file mode 100644 index 000000000000..533e3d878416 --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/examples/2026-06-15-preview/ListAsyncOperationStatus.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2026-06-15-preview", + "clusterName": "clusterName1", + "clusterResourceName": "connectedClusters", + "clusterRp": "Microsoft.Kubernetes", + "resourceGroupName": "rg1", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "name": "99999999-9999-9999-9999-999999999999", + "error": null, + "id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/99999999-9999-9999-9999-999999999999", + "properties": {}, + "status": "Deleting" + }, + { + "name": "88888888-8888-8888-8888-888888888888", + "error": null, + "id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/cassandraExtension1/operations/88888888-8888-8888-8888-888888888888", + "properties": {}, + "status": "Creating" + } + ] + } + } + }, + "operationId": "OperationStatus_List", + "title": "AsyncOperationStatus List" +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/examples/2026-06-15-preview/OperationsList.json b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/examples/2026-06-15-preview/OperationsList.json new file mode 100644 index 000000000000..f9d001b10025 --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/examples/2026-06-15-preview/OperationsList.json @@ -0,0 +1,169 @@ +{ + "parameters": { + "api-version": "2026-06-15-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/write", + "display": { + "description": "Creates or updates source control configuration.", + "operation": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/write", + "provider": "Microsoft Kubernetes Configuration", + "resource": "Microsoft.KubernetesConfiguration/sourceControlConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/read", + "display": { + "description": "Gets source control configuration.", + "operation": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/read", + "provider": "Microsoft Kubernetes Configuration", + "resource": "Microsoft.KubernetesConfiguration/sourceControlConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/delete", + "display": { + "description": "Deletes source control configuration.", + "operation": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/delete", + "provider": "Microsoft Kubernetes Configuration", + "resource": "Microsoft.KubernetesConfiguration/sourceControlConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/extensions/read", + "display": { + "description": "Get the specified Extension.", + "operation": "Get extension", + "provider": "Microsoft KubernetesConfiguration", + "resource": "extensions" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/extensions/write", + "display": { + "description": "Create the Extension specified.", + "operation": "Create a Extension", + "provider": "Microsoft KubernetesConfiguration", + "resource": "extensions" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/extensions/delete", + "display": { + "description": "Delete the specified Extension.", + "operation": "Delete Extension", + "provider": "Microsoft KubernetesConfiguration", + "resource": "extensions" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/extensions/operations/read", + "display": { + "description": "Get the Status of the Extension Async Operation.", + "operation": "Get Extension Async Operation Status", + "provider": "Microsoft KubernetesConfiguration", + "resource": "extensions" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/fluxConfigurations/read", + "display": { + "description": "Get the specified Flux Configuration.", + "operation": "Get fluxConfiguration", + "provider": "Microsoft KubernetesConfiguration", + "resource": "fluxConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/fluxConfigurations/write", + "display": { + "description": "Create the Flux Configuration specified.", + "operation": "Create a fluxConfiguration", + "provider": "Microsoft KubernetesConfiguration", + "resource": "fluxConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/fluxConfigurations/delete", + "display": { + "description": "Delete the specified Flux Configuration.", + "operation": "Delete Flux Configuration", + "provider": "Microsoft KubernetesConfiguration", + "resource": "fluxConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/fluxConfigurations/operations/read", + "display": { + "description": "Get the Status of the Flux Configuration Async Operation.", + "operation": "Get Flux Configuration Async Operation Status", + "provider": "Microsoft KubernetesConfiguration", + "resource": "fluxConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/register/action", + "display": { + "description": "Registers subscription to Microsoft.KubernetesConfiguration resource provider.", + "operation": "Microsoft.KubernetesConfiguration/register/action", + "provider": "Microsoft Kubernetes Configuration", + "resource": "Register" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/extensionTypes/read", + "display": { + "description": "Get Kubernetes Configuration Available Extensions", + "operation": "Microsoft.KubernetesConfiguration/extensionTypes/read", + "provider": "Microsoft KubernetesConfiguration", + "resource": "extensionTypes" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/upgradeAssessments/read", + "display": { + "description": "Get the specified Upgrade Assessment.", + "operation": "Get Upgrade Assessment", + "provider": "Microsoft KubernetesConfiguration", + "resource": "upgradeAssessments" + }, + "isDataAction": false, + "origin": "user,system" + } + ] + } + } + }, + "operationId": "Operations_List", + "title": "List Operations" +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/main.tsp b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/main.tsp index c51a9ccc7b1e..fa5734dfacc9 100644 --- a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/main.tsp +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/main.tsp @@ -44,6 +44,12 @@ enum Versions { * The 2025-04-01 API version. */ v2025_04_01: "2025-04-01", + + /** + * The 2026-06-15-preview API version. + */ + @Azure.Core.previewVersion + v2026_06_15_preview: "2026-06-15-preview", } interface Operations diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/preview/2026-06-15-preview/examples/ListAsyncOperationStatus.json b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/preview/2026-06-15-preview/examples/ListAsyncOperationStatus.json new file mode 100644 index 000000000000..533e3d878416 --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/preview/2026-06-15-preview/examples/ListAsyncOperationStatus.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2026-06-15-preview", + "clusterName": "clusterName1", + "clusterResourceName": "connectedClusters", + "clusterRp": "Microsoft.Kubernetes", + "resourceGroupName": "rg1", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "name": "99999999-9999-9999-9999-999999999999", + "error": null, + "id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/ClusterMonitor/operations/99999999-9999-9999-9999-999999999999", + "properties": {}, + "status": "Deleting" + }, + { + "name": "88888888-8888-8888-8888-888888888888", + "error": null, + "id": "/subscriptions/subId1/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/extensions/cassandraExtension1/operations/88888888-8888-8888-8888-888888888888", + "properties": {}, + "status": "Creating" + } + ] + } + } + }, + "operationId": "OperationStatus_List", + "title": "AsyncOperationStatus List" +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/preview/2026-06-15-preview/examples/OperationsList.json b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/preview/2026-06-15-preview/examples/OperationsList.json new file mode 100644 index 000000000000..f9d001b10025 --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/preview/2026-06-15-preview/examples/OperationsList.json @@ -0,0 +1,169 @@ +{ + "parameters": { + "api-version": "2026-06-15-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/write", + "display": { + "description": "Creates or updates source control configuration.", + "operation": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/write", + "provider": "Microsoft Kubernetes Configuration", + "resource": "Microsoft.KubernetesConfiguration/sourceControlConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/read", + "display": { + "description": "Gets source control configuration.", + "operation": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/read", + "provider": "Microsoft Kubernetes Configuration", + "resource": "Microsoft.KubernetesConfiguration/sourceControlConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/delete", + "display": { + "description": "Deletes source control configuration.", + "operation": "Microsoft.KubernetesConfiguration/sourceControlConfigurations/delete", + "provider": "Microsoft Kubernetes Configuration", + "resource": "Microsoft.KubernetesConfiguration/sourceControlConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/extensions/read", + "display": { + "description": "Get the specified Extension.", + "operation": "Get extension", + "provider": "Microsoft KubernetesConfiguration", + "resource": "extensions" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/extensions/write", + "display": { + "description": "Create the Extension specified.", + "operation": "Create a Extension", + "provider": "Microsoft KubernetesConfiguration", + "resource": "extensions" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/extensions/delete", + "display": { + "description": "Delete the specified Extension.", + "operation": "Delete Extension", + "provider": "Microsoft KubernetesConfiguration", + "resource": "extensions" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/extensions/operations/read", + "display": { + "description": "Get the Status of the Extension Async Operation.", + "operation": "Get Extension Async Operation Status", + "provider": "Microsoft KubernetesConfiguration", + "resource": "extensions" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/fluxConfigurations/read", + "display": { + "description": "Get the specified Flux Configuration.", + "operation": "Get fluxConfiguration", + "provider": "Microsoft KubernetesConfiguration", + "resource": "fluxConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/fluxConfigurations/write", + "display": { + "description": "Create the Flux Configuration specified.", + "operation": "Create a fluxConfiguration", + "provider": "Microsoft KubernetesConfiguration", + "resource": "fluxConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/fluxConfigurations/delete", + "display": { + "description": "Delete the specified Flux Configuration.", + "operation": "Delete Flux Configuration", + "provider": "Microsoft KubernetesConfiguration", + "resource": "fluxConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/fluxConfigurations/operations/read", + "display": { + "description": "Get the Status of the Flux Configuration Async Operation.", + "operation": "Get Flux Configuration Async Operation Status", + "provider": "Microsoft KubernetesConfiguration", + "resource": "fluxConfigurations" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/register/action", + "display": { + "description": "Registers subscription to Microsoft.KubernetesConfiguration resource provider.", + "operation": "Microsoft.KubernetesConfiguration/register/action", + "provider": "Microsoft Kubernetes Configuration", + "resource": "Register" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/extensionTypes/read", + "display": { + "description": "Get Kubernetes Configuration Available Extensions", + "operation": "Microsoft.KubernetesConfiguration/extensionTypes/read", + "provider": "Microsoft KubernetesConfiguration", + "resource": "extensionTypes" + }, + "isDataAction": false, + "origin": "user,system" + }, + { + "name": "Microsoft.KubernetesConfiguration/upgradeAssessments/read", + "display": { + "description": "Get the specified Upgrade Assessment.", + "operation": "Get Upgrade Assessment", + "provider": "Microsoft KubernetesConfiguration", + "resource": "upgradeAssessments" + }, + "isDataAction": false, + "origin": "user,system" + } + ] + } + } + }, + "operationId": "Operations_List", + "title": "List Operations" +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/preview/2026-06-15-preview/operations.json b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/preview/2026-06-15-preview/operations.json new file mode 100644 index 000000000000..f4cd254ed5ba --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/preview/2026-06-15-preview/operations.json @@ -0,0 +1,275 @@ +{ + "swagger": "2.0", + "info": { + "title": "OperationsClient", + "version": "2026-06-15-preview", + "description": "Use these APIs to create extension resources through ARM, for Kubernetes Clusters.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "Operations in a Cluster" + } + ], + "paths": { + "/providers/Microsoft.KubernetesConfiguration/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List all the available operations the KubernetesConfiguration resource provider supports.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/ResourceProviderOperationList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List Operations": { + "$ref": "./examples/OperationsList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/operations": { + "get": { + "operationId": "OperationStatus_List", + "tags": [ + "Operations in a Cluster" + ], + "description": "List Async Operations, currently in progress, in a cluster", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "clusterRp", + "in": "path", + "description": "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService.", + "required": true, + "type": "string" + }, + { + "name": "clusterResourceName", + "in": "path", + "description": "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters, appliances.", + "required": true, + "type": "string" + }, + { + "name": "clusterName", + "in": "path", + "description": "The name of the kubernetes cluster.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationStatusList" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "AsyncOperationStatus List": { + "$ref": "./examples/ListAsyncOperationStatus.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "OperationStatusList": { + "type": "object", + "description": "The async operations in progress, in the cluster.", + "properties": { + "value": { + "type": "array", + "description": "List of async operations in progress, in the cluster.", + "items": { + "$ref": "#/definitions/OperationStatusResult" + }, + "readOnly": true + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of Operation Result objects, if any.", + "readOnly": true + } + } + }, + "OperationStatusResult": { + "type": "object", + "description": "The current status of an async operation.", + "properties": { + "id": { + "type": "string", + "description": "Fully qualified ID for the async operation." + }, + "name": { + "type": "string", + "description": "Name of the async operation." + }, + "status": { + "type": "string", + "description": "Operation status." + }, + "properties": { + "type": "object", + "description": "Additional information, if available.", + "x-nullable": true, + "additionalProperties": { + "type": "string" + } + }, + "error": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorDetail", + "description": "If present, details of the operation error.", + "x-nullable": true, + "readOnly": true + } + }, + "required": [ + "status" + ] + }, + "ResourceProviderOperation": { + "type": "object", + "description": "Supported operation of this resource provider.", + "properties": { + "name": { + "type": "string", + "description": "Operation name, in format of {provider}/{resource}/{operation}" + }, + "display": { + "$ref": "#/definitions/ResourceProviderOperationDisplay", + "description": "Display metadata associated with the operation." + }, + "isDataAction": { + "type": "boolean", + "description": "The flag that indicates whether the operation applies to data plane.", + "readOnly": true + }, + "origin": { + "type": "string", + "description": "Origin of the operation", + "readOnly": true + } + } + }, + "ResourceProviderOperationDisplay": { + "type": "object", + "description": "Display metadata associated with the operation.", + "properties": { + "provider": { + "type": "string", + "description": "Resource provider: Microsoft KubernetesConfiguration." + }, + "resource": { + "type": "string", + "description": "Resource on which the operation is performed." + }, + "operation": { + "type": "string", + "description": "Type of operation: get, read, delete, etc." + }, + "description": { + "type": "string", + "description": "Description of this operation." + } + } + }, + "ResourceProviderOperationList": { + "type": "object", + "description": "Result of the request to list operations.", + "properties": { + "value": { + "type": "array", + "description": "List of operations supported by this resource provider.", + "items": { + "$ref": "#/definitions/ResourceProviderOperation" + }, + "readOnly": true, + "x-ms-identifiers": [ + "name" + ] + }, + "nextLink": { + "type": "string", + "description": "URL to the next set of results, if any.", + "readOnly": true + } + } + } + }, + "parameters": {} +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/readme.md b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/readme.md index 343cf7d7893e..844bc36b9366 100644 --- a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/readme.md +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/operations/readme.md @@ -28,7 +28,31 @@ These are the global settings for the operations in KubernetesConfiguration. title: OperationsClient description: Operations Client openapi-type: arm -tag: package-2025-04 +tag: package-2026-06-preview +``` + +--- + +### Tag: package-2026-06-preview + +These settings apply only when `--tag=package-2026-06-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2026-06-preview' +input-file: + - preview/2026-06-15-preview/operations.json +suppressions: + - code: OperationsApiSchemaUsesCommonTypes + from: operations.json + reason: This is for existing operation status endpoint at resource level and not operations endpoint. So it doesn't follow the schema. + - code: OperationsApiTenantLevelOnly + from: operations.json + reason: This is for existing operation status endpoint at resource level and not operations endpoint. So it doesn't follow the schema. + - code: ResourceNameRestriction + from: operations.json + reason: This is for existing operation status endpoint at resource level and not operations endpoint. So it doesn't follow the schema. + - code: OperationsApiResponseSchema + from: operations.json + reason: This is for existing operation status endpoint at resource level and not operations endpoint. So it doesn't follow the schema. ``` --- diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/UpgradeAssessment.tsp b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/UpgradeAssessment.tsp new file mode 100644 index 000000000000..cd91d25092a6 --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/UpgradeAssessment.tsp @@ -0,0 +1,104 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; + +namespace Microsoft.KubernetesConfiguration; + +/** Allowed instance name for the upgrade assessment singleton. */ +union UpgradeAssessmentName { + string, + + /** The only valid instance; one assessment per cluster. */ + default: "default", +} + +/** + * ARM resource representing a Kubernetes cluster upgrade assessment. + */ +model UpgradeAssessment + is Azure.ResourceManager.ProxyResource { + @path + @key("upgradeAssessmentName") + @segment("upgradeAssessments") + @pattern("^default$") + name: UpgradeAssessmentName; +} + +/** + * Operations alias for UpgradeAssessments using the cluster extension routing pattern. + * Generates URLs of the form: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/upgradeAssessments[/{upgradeAssessmentName}] + */ +alias UpgradeAssessmentOps = Azure.ResourceManager.Legacy.ExtensionOperations< + { + ...ApiVersionParameter; + ...SubscriptionIdParameter; + ...ResourceGroupParameter; + + /** + * The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, + * Microsoft.HybridContainerService. + */ + @path + @segment("providers") + @key + @pattern("^Microsoft\\.(ContainerService|Kubernetes|HybridContainerService)$") + clusterRp: string; + + /** + * The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, + * provisionedClusters, appliances. + */ + @key + @path + @pattern("^[a-zA-Z]+$") + clusterResourceName: string; + + /** + * The name of the kubernetes cluster. + */ + @key + @path + @pattern("^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,62}$") + clusterName: string; + }, + { + ...Azure.ResourceManager.Extension.ExtensionProviderNamespace; + ...ParentKeysOf; + }, + { + ...Azure.ResourceManager.Extension.ExtensionProviderNamespace; + ...KeysOf; + } +>; + +@armResourceOperations(#{ allowStaticRoutes: true, omitTags: true }) +interface UpgradeAssessments { + /** + * Get the upgrade assessment for a cluster. + */ + @tag("UpgradeAssessments") + get is UpgradeAssessmentOps.Read; + + /** + * List upgrade assessments for the cluster. + */ + @tag("UpgradeAssessments") + list is UpgradeAssessmentOps.List; +} + +@@doc( + UpgradeAssessment.name, + "Name of the upgrade assessment. Must be 'default'; only one upgrade assessment exists per cluster." +); +@@doc( + UpgradeAssessment.properties, + "Properties of the UpgradeAssessments resource." +); diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/examples/2026-06-15-preview/GetUpgradeAssessments.json b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/examples/2026-06-15-preview/GetUpgradeAssessments.json new file mode 100644 index 000000000000..2a42e0f71ade --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/examples/2026-06-15-preview/GetUpgradeAssessments.json @@ -0,0 +1,121 @@ +{ + "title": "Get Upgrade Assessment", + "operationId": "UpgradeAssessments_Get", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000001", + "resourceGroupName": "rg1", + "clusterRp": "Microsoft.Kubernetes", + "clusterResourceName": "connectedClusters", + "clusterName": "clusterName1", + "upgradeAssessmentName": "default", + "api-version": "2026-06-15-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/upgradeAssessments/default", + "name": "default", + "type": "Microsoft.KubernetesConfiguration/upgradeAssessments", + "systemData": { + "createdBy": "string", + "createdByType": "Application", + "createdAt": "2026-06-02T10:15:00.000Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application", + "lastModifiedAt": "2026-06-02T10:15:00.000Z" + }, + "properties": { + "currentKubernetesVersion": "1.27.9", + "targetKubernetesVersion": "1.30.0", + "assessmentTime": "2026-06-02T10:15:00Z", + "overallSeverity": "Critical", + "componentCompatibility": [ + { + "name": "kube-proxy", + "version": "1.27.9", + "compatibilityStatus": "Compatible", + "severity": "None" + }, + { + "name": "coredns", + "version": "1.10.1", + "compatibilityStatus": "Compatible", + "severity": "None" + }, + { + "name": "cert-manager", + "version": "1.8.0", + "compatibilityStatus": "Incompatible", + "severity": "Critical", + "minCompatibleVersion": "1.12.0", + "notes": "cert-manager v1.8.0 does not support Kubernetes 1.30+. Upgrade to >= 1.12.0." + }, + { + "name": "ingress-nginx", + "version": "1.2.1", + "compatibilityStatus": "Incompatible", + "severity": "Critical", + "minCompatibleVersion": "1.9.0", + "notes": "ingress-nginx v1.2.1 uses networking.k8s.io/v1beta1 which is removed in Kubernetes 1.29. Upgrade to >= 1.9.0." + } + ], + "deprecatedApis": [ + { + "group": "networking.k8s.io", + "version": "v1beta1", + "resource": "ingresses", + "removedRelease": "1.22", + "usageMetrics": { + "get": 142, + "list": 89, + "watch": 512, + "post": 3, + "put": 7 + }, + "lastUsageObservedAt": "2026-06-02T09:58:34Z", + "severity": "Critical" + }, + { + "group": "policy", + "version": "v1beta1", + "resource": "poddisruptionbudgets", + "removedRelease": "1.25", + "usageMetrics": { + "get": 54, + "list": 31, + "watch": 210 + }, + "lastUsageObservedAt": "2026-06-02T10:01:12Z", + "severity": "Critical" + } + ], + "readinessChecks": [ + { + "category": "APIServerHealth", + "severity": "None", + "details": "API server /healthz and /readyz endpoints responded successfully." + }, + { + "category": "NodeStatus", + "name": "aks-nodepool1-12345678-vmss000000", + "severity": "None", + "details": "Node is Ready. Kubelet version: v1.27.9." + }, + { + "category": "NodeStatus", + "name": "aks-nodepool1-12345678-vmss000001", + "severity": "None", + "details": "Node is Ready. Kubelet version: v1.27.9." + }, + { + "category": "PodDisruptionBudget", + "name": "default/my-app", + "severity": "Warning", + "details": "PodDisruptionBudget 'my-app' in namespace 'default' may block node drain during upgrade." + } + ] + } + } + } + } +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/examples/2026-06-15-preview/ListUpgradeAssessments.json b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/examples/2026-06-15-preview/ListUpgradeAssessments.json new file mode 100644 index 000000000000..5d8d882df231 --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/examples/2026-06-15-preview/ListUpgradeAssessments.json @@ -0,0 +1,71 @@ +{ + "title": "List Upgrade Assessments", + "operationId": "UpgradeAssessments_List", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000001", + "resourceGroupName": "rg1", + "clusterRp": "Microsoft.Kubernetes", + "clusterResourceName": "connectedClusters", + "clusterName": "clusterName1", + "api-version": "2026-06-15-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/upgradeAssessments/default", + "name": "default", + "type": "Microsoft.KubernetesConfiguration/upgradeAssessments", + "systemData": { + "createdBy": "string", + "createdByType": "Application", + "createdAt": "2026-06-02T10:15:00.000Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application", + "lastModifiedAt": "2026-06-02T10:15:00.000Z" + }, + "properties": { + "currentKubernetesVersion": "1.27.9", + "targetKubernetesVersion": "1.30.0", + "assessmentTime": "2026-06-02T10:15:00Z", + "overallSeverity": "Critical", + "componentCompatibility": [ + { + "name": "kube-proxy", + "version": "1.27.9", + "compatibilityStatus": "Compatible", + "severity": "None" + }, + { + "name": "cert-manager", + "version": "1.8.0", + "compatibilityStatus": "Incompatible", + "severity": "Critical", + "minCompatibleVersion": "1.12.0", + "notes": "cert-manager v1.8.0 does not support Kubernetes 1.30+. Upgrade to >= 1.12.0." + } + ], + "deprecatedApis": [ + { + "group": "networking.k8s.io", + "version": "v1beta1", + "resource": "ingresses", + "removedRelease": "1.22", + "severity": "Critical" + } + ], + "readinessChecks": [ + { + "category": "APIServerHealth", + "severity": "None", + "details": "API server /healthz and /readyz endpoints responded successfully." + } + ] + } + } + ] + } + } + } +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/main.tsp b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/main.tsp new file mode 100644 index 000000000000..cb2c6e11eb0d --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/main.tsp @@ -0,0 +1,34 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./UpgradeAssessment.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; + +/** + * APIs for cluster upgrade assessment resources under Microsoft.KubernetesConfiguration. + */ +#suppress "@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint" "UpgradeAssessments is a proxy resource provider under Microsoft.Kubernetes; no independent operations endpoint is registered." +@armProviderNamespace +@service(#{ title: "UpgradeAssessmentsClient" }) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v6) +namespace Microsoft.KubernetesConfiguration; + +/** + * The available API versions. + */ +enum Versions { + /** + * The 2026-06-15-preview API version. + */ + @Azure.Core.previewVersion + v2026_06_15_preview: "2026-06-15-preview", +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/models.tsp b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/models.tsp new file mode 100644 index 000000000000..dd2d3e52cef9 --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/models.tsp @@ -0,0 +1,200 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@azure-tools/typespec-azure-core"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using TypeSpec.Versioning; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Microsoft.KubernetesConfiguration; + +// ─── UpgradeAssessment enums ────────────────────────────────────────────────── + +/** Severity of an upgrade-assessment finding or readiness check. */ +union Severity { + string, + + /** No issues found. */ + None: "None", + + /** Non-blocking issues found; upgrade is possible but action is recommended. */ + Warning: "Warning", + + /** Blocking issues found; upgrade should not proceed without remediation. */ + Critical: "Critical", + + /** Severity could not be determined. */ + Unknown: "Unknown", +} + +/** Compatibility status of a cluster component with the target Kubernetes version. */ +union CompatibilityStatus { + string, + + /** Component is compatible with the target version. */ + Compatible: "Compatible", + + /** Compatibility with the target version has not been tested. */ + Untested: "Untested", + + /** Component is incompatible with the target version. */ + Incompatible: "Incompatible", + + /** Compatibility could not be determined due to insufficient information. */ + Unknown: "Unknown", +} + +/** Category of a cluster readiness check. */ +union ReadinessCategory { + string, + + /** Node status check. */ + NodeStatus: "NodeStatus", + + /** API server health check. */ + APIServerHealth: "APIServerHealth", + + /** Pod disruption budget check. */ + PodDisruptionBudget: "PodDisruptionBudget", +} + +// ─── UpgradeAssessment sub-models ───────────────────────────────────────────── + +/** Compatibility status of a single cluster component with the target Kubernetes version. */ +model ComponentCompatibility { + /** Component name (e.g., 'containerd', 'calico'). */ + name: string; + + /** Installed component version. */ + version: string; + + /** Compatibility of the component with the target Kubernetes version. */ + compatibilityStatus: CompatibilityStatus; + + /** Severity associated with this compatibility result. */ + severity: Severity; + + /** Minimum component version known to be compatible with targetKubernetesVersion. */ + minCompatibleVersion?: string; + + /** Additional notes about compatibility. */ + notes?: string; +} + +/** Observed call counts per HTTP verb for a deprecated Kubernetes API. */ +model HttpVerbUsageMetrics { + /** Number of GET requests observed. */ + get?: int64; + + /** Number of LIST requests observed. */ + list?: int64; + + /** Number of POST (create) requests observed. */ + post?: int64; + + /** Number of PUT (replace) requests observed. */ + put?: int64; + + /** Number of PATCH requests observed. */ + patch?: int64; + + /** Number of DELETE requests observed. */ + delete?: int64; + + /** Number of WATCH requests observed. */ + watch?: int64; +} + +/** A deprecated Kubernetes API still in use in the cluster. */ +model DeprecatedApiUsage { + /** API group (e.g., 'flowcontrol.apiserver.k8s.io'). */ + group: string; + + /** API version (e.g., 'v1beta3'). */ + version: string; + + /** Resource plural name (e.g., 'flowschemas'). */ + resource: string; + + /** Kubernetes release in which this API is removed (e.g., '1.32'). */ + removedRelease?: string; + + /** HTTP verb call counts observed for this deprecated API. */ + usageMetrics?: HttpVerbUsageMetrics; + + /** UTC timestamp of the last observed usage. */ + lastUsageObservedAt?: utcDateTime; + + /** Severity of continued use of this deprecated API. */ + severity?: Severity; +} + +/** A single cluster readiness check result. */ +model ReadinessCheck { + /** Category of the readiness check. */ + category: ReadinessCategory; + + /** + * Subject of the check (node name, workload namespace/name, etc.). + * Optional for cluster-wide checks. + */ + name?: string; + + /** Severity of the check result. */ + severity?: Severity; + + /** Human-readable reason when severity is not 'None'. */ + details?: string; +} + +// ─── ARM resource properties ────────────────────────────────────────────────── + +/** Properties of a single UpgradeAssessment ARM resource. */ +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "UpgradeAssessment is a read-only resource (GET/LIST only, no PUT) with no provisioning lifecycle, so provisioningState is intentionally omitted." +model UpgradeAssessmentProperties { + /** Current Kubernetes version running on the cluster (e.g., '1.29'). */ + @visibility(Lifecycle.Read) + currentKubernetesVersion?: string; + + /** Target Kubernetes version to evaluate for upgrade (e.g., '1.30'). */ + @visibility(Lifecycle.Read) + targetKubernetesVersion?: string; + + /** + * UTC timestamp when the in-cluster agent last computed this assessment. + */ + @visibility(Lifecycle.Read) + assessmentTime?: utcDateTime; + + /** + * Rolled-up severity across all checks; highest severity wins. + */ + @visibility(Lifecycle.Read) + overallSeverity?: Severity; + + /** + * Per-component compatibility results with the target Kubernetes version. + */ + @visibility(Lifecycle.Read) + @identifiers(#["name"]) + componentCompatibility?: ComponentCompatibility[]; + + /** + * Deprecated Kubernetes APIs still in use in the cluster. + */ + @visibility(Lifecycle.Read) + @identifiers(#[]) + deprecatedApis?: DeprecatedApiUsage[]; + + /** + * Cluster readiness check results. + */ + @visibility(Lifecycle.Read) + @identifiers(#[]) + readinessChecks?: ReadinessCheck[]; +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/preview/2026-06-15-preview/examples/GetUpgradeAssessments.json b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/preview/2026-06-15-preview/examples/GetUpgradeAssessments.json new file mode 100644 index 000000000000..2a42e0f71ade --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/preview/2026-06-15-preview/examples/GetUpgradeAssessments.json @@ -0,0 +1,121 @@ +{ + "title": "Get Upgrade Assessment", + "operationId": "UpgradeAssessments_Get", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000001", + "resourceGroupName": "rg1", + "clusterRp": "Microsoft.Kubernetes", + "clusterResourceName": "connectedClusters", + "clusterName": "clusterName1", + "upgradeAssessmentName": "default", + "api-version": "2026-06-15-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/upgradeAssessments/default", + "name": "default", + "type": "Microsoft.KubernetesConfiguration/upgradeAssessments", + "systemData": { + "createdBy": "string", + "createdByType": "Application", + "createdAt": "2026-06-02T10:15:00.000Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application", + "lastModifiedAt": "2026-06-02T10:15:00.000Z" + }, + "properties": { + "currentKubernetesVersion": "1.27.9", + "targetKubernetesVersion": "1.30.0", + "assessmentTime": "2026-06-02T10:15:00Z", + "overallSeverity": "Critical", + "componentCompatibility": [ + { + "name": "kube-proxy", + "version": "1.27.9", + "compatibilityStatus": "Compatible", + "severity": "None" + }, + { + "name": "coredns", + "version": "1.10.1", + "compatibilityStatus": "Compatible", + "severity": "None" + }, + { + "name": "cert-manager", + "version": "1.8.0", + "compatibilityStatus": "Incompatible", + "severity": "Critical", + "minCompatibleVersion": "1.12.0", + "notes": "cert-manager v1.8.0 does not support Kubernetes 1.30+. Upgrade to >= 1.12.0." + }, + { + "name": "ingress-nginx", + "version": "1.2.1", + "compatibilityStatus": "Incompatible", + "severity": "Critical", + "minCompatibleVersion": "1.9.0", + "notes": "ingress-nginx v1.2.1 uses networking.k8s.io/v1beta1 which is removed in Kubernetes 1.29. Upgrade to >= 1.9.0." + } + ], + "deprecatedApis": [ + { + "group": "networking.k8s.io", + "version": "v1beta1", + "resource": "ingresses", + "removedRelease": "1.22", + "usageMetrics": { + "get": 142, + "list": 89, + "watch": 512, + "post": 3, + "put": 7 + }, + "lastUsageObservedAt": "2026-06-02T09:58:34Z", + "severity": "Critical" + }, + { + "group": "policy", + "version": "v1beta1", + "resource": "poddisruptionbudgets", + "removedRelease": "1.25", + "usageMetrics": { + "get": 54, + "list": 31, + "watch": 210 + }, + "lastUsageObservedAt": "2026-06-02T10:01:12Z", + "severity": "Critical" + } + ], + "readinessChecks": [ + { + "category": "APIServerHealth", + "severity": "None", + "details": "API server /healthz and /readyz endpoints responded successfully." + }, + { + "category": "NodeStatus", + "name": "aks-nodepool1-12345678-vmss000000", + "severity": "None", + "details": "Node is Ready. Kubelet version: v1.27.9." + }, + { + "category": "NodeStatus", + "name": "aks-nodepool1-12345678-vmss000001", + "severity": "None", + "details": "Node is Ready. Kubelet version: v1.27.9." + }, + { + "category": "PodDisruptionBudget", + "name": "default/my-app", + "severity": "Warning", + "details": "PodDisruptionBudget 'my-app' in namespace 'default' may block node drain during upgrade." + } + ] + } + } + } + } +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/preview/2026-06-15-preview/examples/ListUpgradeAssessments.json b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/preview/2026-06-15-preview/examples/ListUpgradeAssessments.json new file mode 100644 index 000000000000..5d8d882df231 --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/preview/2026-06-15-preview/examples/ListUpgradeAssessments.json @@ -0,0 +1,71 @@ +{ + "title": "List Upgrade Assessments", + "operationId": "UpgradeAssessments_List", + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000001", + "resourceGroupName": "rg1", + "clusterRp": "Microsoft.Kubernetes", + "clusterResourceName": "connectedClusters", + "clusterName": "clusterName1", + "api-version": "2026-06-15-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/clusterName1/providers/Microsoft.KubernetesConfiguration/upgradeAssessments/default", + "name": "default", + "type": "Microsoft.KubernetesConfiguration/upgradeAssessments", + "systemData": { + "createdBy": "string", + "createdByType": "Application", + "createdAt": "2026-06-02T10:15:00.000Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application", + "lastModifiedAt": "2026-06-02T10:15:00.000Z" + }, + "properties": { + "currentKubernetesVersion": "1.27.9", + "targetKubernetesVersion": "1.30.0", + "assessmentTime": "2026-06-02T10:15:00Z", + "overallSeverity": "Critical", + "componentCompatibility": [ + { + "name": "kube-proxy", + "version": "1.27.9", + "compatibilityStatus": "Compatible", + "severity": "None" + }, + { + "name": "cert-manager", + "version": "1.8.0", + "compatibilityStatus": "Incompatible", + "severity": "Critical", + "minCompatibleVersion": "1.12.0", + "notes": "cert-manager v1.8.0 does not support Kubernetes 1.30+. Upgrade to >= 1.12.0." + } + ], + "deprecatedApis": [ + { + "group": "networking.k8s.io", + "version": "v1beta1", + "resource": "ingresses", + "removedRelease": "1.22", + "severity": "Critical" + } + ], + "readinessChecks": [ + { + "category": "APIServerHealth", + "severity": "None", + "details": "API server /healthz and /readyz endpoints responded successfully." + } + ] + } + } + ] + } + } + } +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/preview/2026-06-15-preview/upgradeAssessments.json b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/preview/2026-06-15-preview/upgradeAssessments.json new file mode 100644 index 000000000000..d8171685e661 --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/preview/2026-06-15-preview/upgradeAssessments.json @@ -0,0 +1,556 @@ +{ + "swagger": "2.0", + "info": { + "title": "UpgradeAssessmentsClient", + "version": "2026-06-15-preview", + "description": "APIs for cluster upgrade assessment resources under Microsoft.KubernetesConfiguration.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "UpgradeAssessments" + } + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/upgradeAssessments": { + "get": { + "operationId": "UpgradeAssessments_List", + "tags": [ + "UpgradeAssessments" + ], + "description": "List upgrade assessments for the cluster.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "clusterRp", + "in": "path", + "description": "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,\nMicrosoft.HybridContainerService.", + "required": true, + "type": "string", + "pattern": "^Microsoft\\.(ContainerService|Kubernetes|HybridContainerService)$" + }, + { + "name": "clusterResourceName", + "in": "path", + "description": "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,\nprovisionedClusters, appliances.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z]+$" + }, + { + "name": "clusterName", + "in": "path", + "description": "The name of the kubernetes cluster.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,62}$" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/UpgradeAssessmentListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List Upgrade Assessments": { + "$ref": "./examples/ListUpgradeAssessments.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/upgradeAssessments/{upgradeAssessmentName}": { + "get": { + "operationId": "UpgradeAssessments_Get", + "tags": [ + "UpgradeAssessments" + ], + "description": "Get the upgrade assessment for a cluster.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "clusterRp", + "in": "path", + "description": "The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes,\nMicrosoft.HybridContainerService.", + "required": true, + "type": "string", + "pattern": "^Microsoft\\.(ContainerService|Kubernetes|HybridContainerService)$" + }, + { + "name": "clusterResourceName", + "in": "path", + "description": "The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters,\nprovisionedClusters, appliances.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z]+$" + }, + { + "name": "clusterName", + "in": "path", + "description": "The name of the kubernetes cluster.", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-_.]{0,62}$" + }, + { + "name": "upgradeAssessmentName", + "in": "path", + "description": "Name of the upgrade assessment. Must be 'default'; only one upgrade assessment exists per cluster.", + "required": true, + "type": "string", + "pattern": "^default$", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "UpgradeAssessmentName", + "modelAsString": true, + "values": [ + { + "name": "default", + "value": "default", + "description": "The only valid instance; one assessment per cluster." + } + ] + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/UpgradeAssessment" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get Upgrade Assessment": { + "$ref": "./examples/GetUpgradeAssessments.json" + } + } + } + } + }, + "definitions": { + "CompatibilityStatus": { + "type": "string", + "description": "Compatibility status of a cluster component with the target Kubernetes version.", + "enum": [ + "Compatible", + "Untested", + "Incompatible", + "Unknown" + ], + "x-ms-enum": { + "name": "CompatibilityStatus", + "modelAsString": true, + "values": [ + { + "name": "Compatible", + "value": "Compatible", + "description": "Component is compatible with the target version." + }, + { + "name": "Untested", + "value": "Untested", + "description": "Compatibility with the target version has not been tested." + }, + { + "name": "Incompatible", + "value": "Incompatible", + "description": "Component is incompatible with the target version." + }, + { + "name": "Unknown", + "value": "Unknown", + "description": "Compatibility could not be determined due to insufficient information." + } + ] + } + }, + "ComponentCompatibility": { + "type": "object", + "description": "Compatibility status of a single cluster component with the target Kubernetes version.", + "properties": { + "name": { + "type": "string", + "description": "Component name (e.g., 'containerd', 'calico')." + }, + "version": { + "type": "string", + "description": "Installed component version." + }, + "compatibilityStatus": { + "$ref": "#/definitions/CompatibilityStatus", + "description": "Compatibility of the component with the target Kubernetes version." + }, + "severity": { + "$ref": "#/definitions/Severity", + "description": "Severity associated with this compatibility result." + }, + "minCompatibleVersion": { + "type": "string", + "description": "Minimum component version known to be compatible with targetKubernetesVersion." + }, + "notes": { + "type": "string", + "description": "Additional notes about compatibility." + } + }, + "required": [ + "name", + "version", + "compatibilityStatus", + "severity" + ] + }, + "DeprecatedApiUsage": { + "type": "object", + "description": "A deprecated Kubernetes API still in use in the cluster.", + "properties": { + "group": { + "type": "string", + "description": "API group (e.g., 'flowcontrol.apiserver.k8s.io')." + }, + "version": { + "type": "string", + "description": "API version (e.g., 'v1beta3')." + }, + "resource": { + "type": "string", + "description": "Resource plural name (e.g., 'flowschemas')." + }, + "removedRelease": { + "type": "string", + "description": "Kubernetes release in which this API is removed (e.g., '1.32')." + }, + "usageMetrics": { + "$ref": "#/definitions/HttpVerbUsageMetrics", + "description": "HTTP verb call counts observed for this deprecated API." + }, + "lastUsageObservedAt": { + "type": "string", + "format": "date-time", + "description": "UTC timestamp of the last observed usage." + }, + "severity": { + "$ref": "#/definitions/Severity", + "description": "Severity of continued use of this deprecated API." + } + }, + "required": [ + "group", + "version", + "resource" + ] + }, + "HttpVerbUsageMetrics": { + "type": "object", + "description": "Observed call counts per HTTP verb for a deprecated Kubernetes API.", + "properties": { + "get": { + "type": "integer", + "format": "int64", + "description": "Number of GET requests observed." + }, + "list": { + "type": "integer", + "format": "int64", + "description": "Number of LIST requests observed." + }, + "post": { + "type": "integer", + "format": "int64", + "description": "Number of POST (create) requests observed." + }, + "put": { + "type": "integer", + "format": "int64", + "description": "Number of PUT (replace) requests observed." + }, + "patch": { + "type": "integer", + "format": "int64", + "description": "Number of PATCH requests observed." + }, + "delete": { + "type": "integer", + "format": "int64", + "description": "Number of DELETE requests observed." + }, + "watch": { + "type": "integer", + "format": "int64", + "description": "Number of WATCH requests observed." + } + } + }, + "ReadinessCategory": { + "type": "string", + "description": "Category of a cluster readiness check.", + "enum": [ + "NodeStatus", + "APIServerHealth", + "PodDisruptionBudget" + ], + "x-ms-enum": { + "name": "ReadinessCategory", + "modelAsString": true, + "values": [ + { + "name": "NodeStatus", + "value": "NodeStatus", + "description": "Node status check." + }, + { + "name": "APIServerHealth", + "value": "APIServerHealth", + "description": "API server health check." + }, + { + "name": "PodDisruptionBudget", + "value": "PodDisruptionBudget", + "description": "Pod disruption budget check." + } + ] + } + }, + "ReadinessCheck": { + "type": "object", + "description": "A single cluster readiness check result.", + "properties": { + "category": { + "$ref": "#/definitions/ReadinessCategory", + "description": "Category of the readiness check." + }, + "name": { + "type": "string", + "description": "Subject of the check (node name, workload namespace/name, etc.).\nOptional for cluster-wide checks." + }, + "severity": { + "$ref": "#/definitions/Severity", + "description": "Severity of the check result." + }, + "details": { + "type": "string", + "description": "Human-readable reason when severity is not 'None'." + } + }, + "required": [ + "category" + ] + }, + "Severity": { + "type": "string", + "description": "Severity of an upgrade-assessment finding or readiness check.", + "enum": [ + "None", + "Warning", + "Critical", + "Unknown" + ], + "x-ms-enum": { + "name": "Severity", + "modelAsString": true, + "values": [ + { + "name": "None", + "value": "None", + "description": "No issues found." + }, + { + "name": "Warning", + "value": "Warning", + "description": "Non-blocking issues found; upgrade is possible but action is recommended." + }, + { + "name": "Critical", + "value": "Critical", + "description": "Blocking issues found; upgrade should not proceed without remediation." + }, + { + "name": "Unknown", + "value": "Unknown", + "description": "Severity could not be determined." + } + ] + } + }, + "UpgradeAssessment": { + "type": "object", + "description": "ARM resource representing a Kubernetes cluster upgrade assessment.", + "properties": { + "properties": { + "$ref": "#/definitions/UpgradeAssessmentProperties", + "description": "Properties of the UpgradeAssessments resource." + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v6/types.json#/definitions/ProxyResource" + } + ] + }, + "UpgradeAssessmentListResult": { + "type": "object", + "description": "The response of a UpgradeAssessment list operation.", + "properties": { + "value": { + "type": "array", + "description": "The UpgradeAssessment items on this page", + "items": { + "$ref": "#/definitions/UpgradeAssessment" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "UpgradeAssessmentName": { + "type": "string", + "description": "Allowed instance name for the upgrade assessment singleton.", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "UpgradeAssessmentName", + "modelAsString": true, + "values": [ + { + "name": "default", + "value": "default", + "description": "The only valid instance; one assessment per cluster." + } + ] + } + }, + "UpgradeAssessmentProperties": { + "type": "object", + "description": "Properties of a single UpgradeAssessment ARM resource.", + "properties": { + "currentKubernetesVersion": { + "type": "string", + "description": "Current Kubernetes version running on the cluster (e.g., '1.29').", + "readOnly": true + }, + "targetKubernetesVersion": { + "type": "string", + "description": "Target Kubernetes version to evaluate for upgrade (e.g., '1.30').", + "readOnly": true + }, + "assessmentTime": { + "type": "string", + "format": "date-time", + "description": "UTC timestamp when the in-cluster agent last computed this assessment.", + "readOnly": true + }, + "overallSeverity": { + "$ref": "#/definitions/Severity", + "description": "Rolled-up severity across all checks; highest severity wins.", + "readOnly": true + }, + "componentCompatibility": { + "type": "array", + "description": "Per-component compatibility results with the target Kubernetes version.", + "items": { + "$ref": "#/definitions/ComponentCompatibility" + }, + "readOnly": true, + "x-ms-identifiers": [ + "name" + ] + }, + "deprecatedApis": { + "type": "array", + "description": "Deprecated Kubernetes APIs still in use in the cluster.", + "items": { + "$ref": "#/definitions/DeprecatedApiUsage" + }, + "readOnly": true, + "x-ms-identifiers": [] + }, + "readinessChecks": { + "type": "array", + "description": "Cluster readiness check results.", + "items": { + "$ref": "#/definitions/ReadinessCheck" + }, + "readOnly": true, + "x-ms-identifiers": [] + } + } + } + }, + "parameters": {} +} diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/readme.md b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/readme.md new file mode 100644 index 000000000000..a2558dd30f63 --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/readme.md @@ -0,0 +1,47 @@ +# kubernetesconfiguration + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for KubernetesConfiguration. + +## Getting Started + +To build the SDKs for UpgradeAssessments in KubernetesConfiguration, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the UpgradeAssessments in KubernetesConfiguration. + +``` yaml +title: UpgradeAssessmentsClient +description: APIs for cluster upgrade assessment resources under Microsoft.KubernetesConfiguration. +openapi-type: arm +tag: package-2026-06-preview +``` + +--- + +### Tag: package-2026-06-preview + +These settings apply only when `--tag=package-2026-06-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2026-06-preview' +input-file: + - preview/2026-06-15-preview/upgradeAssessments.json +suppressions: + - code: OperationsAPIImplementation + from: upgradeAssessments.json + reason: Operations API is implemented as a separate service. +``` diff --git a/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/tspconfig.yaml b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/tspconfig.yaml new file mode 100644 index 000000000000..0f8b481df84c --- /dev/null +++ b/specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/upgradeAssessments/tspconfig.yaml @@ -0,0 +1,50 @@ +parameters: + "service-dir": + default: "sdk/upgradeassessments" +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + omit-unreachable-types: false + emitter-output-dir: "{project-root}" + output-file: "{version-status}/{version}/upgradeAssessments.json" + arm-types-dir: "{project-root}/../../../../common-types/resource-management" + emit-lro-options: "all" + examples-dir: "{project-root}/examples" + "@azure-tools/typespec-python": + service-dir: sdk/kubernetesconfiguration + emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-kubernetesconfiguration-upgradeassessments" + namespace: "azure.mgmt.kubernetesconfiguration.upgradeassessments" + generate-test: true + generate-sample: true + flavor: "azure" + "@azure-tools/typespec-java": + service-dir: sdk/kubernetesconfiguration + emitter-output-dir: "{output-dir}/{service-dir}/azure-resourcemanager-kubernetesconfiguration-upgradeassessments" + namespace: "com.azure.resourcemanager.kubernetesconfiguration.upgradeassessments" + service-name: "UpgradeAssessments" + flavor: azure + "@azure-tools/typespec-ts": + service-dir: sdk/kubernetesconfiguration + emitter-output-dir: "{output-dir}/{service-dir}/arm-kubernetesconfiguration-upgradeassessments" + flavor: "azure" + compatibility-lro: true + experimental-extensible-enums: true + package-details: + name: "@azure/arm-kubernetesconfiguration-upgradeassessments" + "@azure-tools/typespec-go": + service-dir: "sdk/resourcemanager/kubernetesconfiguration" + emitter-output-dir: "{output-dir}/{service-dir}/armupgradeassessments" + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/armupgradeassessments" + fix-const-stuttering: true + flavor: "azure" + generate-samples: true + generate-fakes: true + head-as-boolean: true + inject-spans: true + "@azure-typespec/http-client-csharp-mgmt": + namespace: "Azure.ResourceManager.KubernetesConfiguration.UpgradeAssessments" + emitter-output-dir: "{output-dir}/sdk/kubernetesconfiguration/{namespace}" +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/resource-manager"