Skip to content

[Mgmt] Polish Kubernetes management API#59432

Open
ArcturusZhang wants to merge 5 commits into
Azure:mainfrom
ArcturusZhang:mgmt/kubernetes-api-review-fixes
Open

[Mgmt] Polish Kubernetes management API#59432
ArcturusZhang wants to merge 5 commits into
Azure:mainfrom
ArcturusZhang:mgmt/kubernetes-api-review-fixes

Conversation

@ArcturusZhang
Copy link
Copy Markdown
Member

@ArcturusZhang ArcturusZhang commented May 26, 2026

Applies C# management SDK API review fixes for Azure.ResourceManager.Kubernetes only.

Changes:

  • Regenerates Azure.ResourceManager.Kubernetes from TypeSpec customizations in Customize Kubernetes C# management SDK API azure-rest-api-specs#43497.
  • Keeps the management SDK pinned to Microsoft.Kubernetes 2025-12-01-preview.
  • Adds contextual ConnectedCluster* and ClusterUserCredential* names for generated models/enums that were previously generic.
  • Renames the cluster credential action payload from ListClusterUserCredentialProperties to GetClusterUserCredentialContent and the operation parameter to content.
  • Fixes acronym casing (Aad, Aws, Gcp, Id, Rbac).
  • Fixes boolean and timestamp/unit property names (IsGatewayEnabled, IsWorkloadIdentityEnabled, UseClientProxy, OccurredOn, ExpirationTimeInSeconds).
  • Emits PrivateLinkScopeResourceId as ResourceIdentifier.

Companion specs PR: Azure/azure-rest-api-specs#43497

ArcturusZhang and others added 2 commits May 26, 2026 10:47
Regenerate Azure.ResourceManager.Kubernetes from TypeSpec customizations that address management API review naming and type issues.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the TypeSpec pin to the standalone management API review specs branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerate Azure.ResourceManager.Kubernetes after adding ConnectedCluster and cluster credential context to generated model names.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ArcturusZhang ArcturusZhang changed the title [Mgmt] Customize Azure.ResourceManager.Kubernetes API names [Mgmt] Polish Kubernetes management API May 26, 2026
Rename the connected cluster credential action payload to GetClusterUserCredentialContent and use content as the operation parameter name.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@live1206 live1206 marked this pull request as ready for review May 26, 2026 09:16
Copilot AI review requested due to automatic review settings May 26, 2026 09:16
Copy link
Copy Markdown
Member

@live1206 live1206 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migration review completed.

Phase 1 (versioning): passed — no package version/changelog changes and no ApiCompat baseline entries were added.
Phase 2 (API review): passed — the management naming scanner reported no violations, contextual model names are service/resource-scoped, and the changed API surface follows the mgmt naming/type guidelines.
Phase 3 (breaking changes): skipped — this package does not declare ApiCompatVersion / prior stable baseline. The package build succeeded.
Phase 4 (migration customization): passed — no SDK customization files were added/modified; no manual customization issues found.
Phase 5 (TypeSpec decorator preference): passed — API polish is driven by C#-scoped TypeSpec decorators in the companion specs PR rather than SDK-side customization code.

Inline comments: 0. Critical issues: 0. Should-fix issues: 0. Suggestions: 0.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Regenerates Azure.ResourceManager.Kubernetes from updated TypeSpec customizations to polish the management API surface (contextual model names, acronym casing, boolean/timestamp naming, typed ResourceIdentifier, LRO update). The wire contract and pinned Microsoft.Kubernetes 2025-12-01-preview API version are unchanged.

Changes:

  • Renamed generic model/enum types to contextual ConnectedCluster* / ClusterUserCredential* equivalents and renamed the credential action payload to GetClusterUserCredentialContent (with content parameter).
  • Adjusted property naming: acronym casing (Aad/Aws/Gcp/Id/Rbac), boolean/timestamp/unit names (IsGatewayEnabled, IsWorkloadIdentityEnabled, UseClientProxy, OccurredOn, ExpirationTimeInSeconds), and PrivateLinkScopeResourceId typed as ResourceIdentifier.
  • ConnectedClusterResource.Update[Async] is now an LRO returning ArmOperation<ConnectedClusterResource> with OperationFinalStateVia.Location, and the tag helpers were updated accordingly.

Reviewed changes

Copilot reviewed 4 out of 48 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsp-location.yaml Bumps TypeSpec commit pin.
api/Azure.ResourceManager.Kubernetes.net8.0.cs API baseline updated to new public surface.
src/Generated/ConnectedClusterResource.cs Update LRO conversion; GetClusterUserCredential parameter rename; tag helpers unwrap LRO result.
src/Generated/ArmKubernetesModelFactory.cs Factory signatures updated for renamed types/properties.
src/Generated/RestOperations/ConnectedClusterRestOperations.cs PATCH builder renamed to CreateUpdateAsyncRequest.
src/Generated/Models/AzureResourceManagerKubernetesContext.cs MRW buildable list updated to renamed types.
src/Generated/Models/ConnectedClusterProperties.{cs,Serialization.cs} Contextual types, ResourceIdentifier, Is* naming, IsGateway wrapper.
src/Generated/Models/ConnectedClusterPatchProperties.{cs,Serialization.cs} Acronym/boolean rename, IsGateway wrapper.
src/Generated/Models/ConnectedClusterAadProfile.{cs,Serialization.cs} Renamed from AadProfile; acronym casing.
src/Generated/Models/ConnectedClusterAgentError.{cs,Serialization.cs} Renamed from AgentError; TimeOccurredOn.
src/Generated/Models/ConnectedClusterArcAgentProfile.{cs,Serialization.cs} Renamed; updated nested types.
src/Generated/Models/ConnectedClusterArcAgentryConfiguration.{cs,Serialization.cs} Renamed from ArcAgentryConfigurations.
src/Generated/Models/ConnectedClusterOidcIssuerProfile.{cs,Serialization.cs} Renamed from OidcIssuerProfile.
src/Generated/Models/ConnectedClusterSecurityProfile.{cs,Serialization.cs} Renamed; wrapper now IsWorkloadIdentity.
src/Generated/Models/ConnectedClusterSystemComponent.{cs,Serialization.cs} Renamed from SystemComponent.
src/Generated/Models/ConnectedClusterWorkloadIdentityProfile.{cs,Serialization.cs} Renamed from SecurityProfileWorkloadIdentity.
src/Generated/Models/ConnectedClusterKind.cs Acronym casing Aws/Gcp.
src/Generated/Models/ConnectedClusterConnectivityStatus.cs Renamed enum struct.
src/Generated/Models/ConnectedClusterAutoUpgradeMode.cs (new) Replacement for AutoUpgradeOptions.
src/Generated/Models/ConnectedClusterAzureHybridBenefit.cs (new) Replacement for AzureHybridBenefit.
src/Generated/Models/ConnectedClusterPrivateLinkState.cs (new) Replacement for PrivateLinkState.
src/Generated/Models/ConnectedClusterProvisioningState.cs (new) Replacement for ProvisioningState.
src/Generated/Models/ClusterUserCredentialAuthenticationMethod.cs (new) Replacement for AuthenticationMethod with Aad casing.
src/Generated/Models/ClusterUserCredentialHybridConnectionConfig.{cs,Serialization.cs} Renamed; ExpirationTimeExpirationTimeInSeconds.
src/Generated/Models/ClusterUserCredentialResult.{cs,Serialization.cs} Renamed from CredentialResult.
src/Generated/Models/ClusterUserCredentialsResult.{cs,Serialization.cs} Renamed from CredentialResults.
src/Generated/Models/GetClusterUserCredentialContent.{cs,Serialization.cs} Renamed from ListClusterUserCredentialProperties; ClientProxyUseClientProxy.
src/Generated/Models/{AuthenticationMethod,AutoUpgradeOptions,AzureHybridBenefit,PrivateLinkState,ProvisioningState}.cs Removed legacy enum struct files.


/// <summary> Details of the gateway used by the Arc router for connectivity. </summary>
internal Gateway Gateway { get; set; }
internal Gateway IsGateway { get; set; }
Point Azure.ResourceManager.Kubernetes generation at the merged azure-rest-api-specs main commit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ArcturusZhang ArcturusZhang marked this pull request as draft May 26, 2026 09:54
@ArcturusZhang ArcturusZhang marked this pull request as ready for review May 26, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants