[Az.ServiceFabric] Update New and Set commands for Managed Clusters with new parameters #29263
[Az.ServiceFabric] Update New and Set commands for Managed Clusters with new parameters #29263iliu816 wants to merge 5 commits intoAzure:mainfrom
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Az.ServiceFabric managed cluster cmdlets and PowerShell model wrappers to surface newly supported Service Fabric Managed Cluster, Node Type, Service, and Application properties from the underlying management SDK models.
Changes:
- Expanded
New-/Set-AzServiceFabricManagedClusterto support additional networking, infrastructure, security/auth, and health policy parameters. - Added new Node Type parameters (e.g., outbound-only, resilient ephemeral OS disk, secure boot, etc.) to
New-/Set-AzServiceFabricManagedNodeType. - Added managed application identity parameters and service DNS name support for managed cluster applications/services, plus corresponding model mapping updates.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ServiceFabric/ServiceFabric/Models/PSCluster.cs | Updates wrapper constructor to pass through newer SDK Cluster properties. |
| src/ServiceFabric/ServiceFabric/Models/ManagedClusters/PSManagedService.cs | Adjusts managed service projection/mapping; removes SystemData from output model. |
| src/ServiceFabric/ServiceFabric/Models/ManagedClusters/PSManagedNodeType.cs | Maps newly added NodeType SDK properties into PS wrapper. |
| src/ServiceFabric/ServiceFabric/Models/ManagedClusters/PSManagedCluster.cs | Maps newly added ManagedCluster SDK properties into PS wrapper. |
| src/ServiceFabric/ServiceFabric/Models/ManagedClusters/PSManagedApplicationTypeVersion.cs | Reorders base ctor args to match updated SDK signatures. |
| src/ServiceFabric/ServiceFabric/Models/ManagedClusters/PSManagedApplicationType.cs | Reorders base ctor args to match updated SDK signatures. |
| src/ServiceFabric/ServiceFabric/Models/ManagedClusters/PSManagedApplication.cs | Updates mapping to include identity/managed identities in base ctor. |
| src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/Services/NewAzServiceFabricManagedClusterService.cs | Adds -ServiceDnsName and maps it into service properties. |
| src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/NodeTypes/SetAzServiceFabricManagedNodeType.cs | Adds multiple new updatable node type parameters and applies them on update. |
| src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/NodeTypes/NewAzServiceFabricManagedNodeType.cs | Adds multiple new create-time node type parameters and applies them on create. |
| src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/ManagedClusters/SetAzServiceFabricManagedCluster.cs | Adds many new update parameters and applies them during cluster update. |
| src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/ManagedClusters/NewAzServiceFabricManagedCluster.cs | Adds many new create parameters and applies them during cluster create. |
| src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/Applications/SetAzServiceFabricManagedClusterApplication.cs | Adds application identity parameters and applies them during update. |
| src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/Applications/NewAzServiceFabricManagedClusterApplication.cs | Adds application identity parameters and applies them during create. |
You can also share your feedback on Copilot code review. Take the survey.
...c/ServiceFabric/Commands/ManagedClusters/ManagedClusters/NewAzServiceFabricManagedCluster.cs
Show resolved
Hide resolved
...c/ServiceFabric/Commands/ManagedClusters/ManagedClusters/NewAzServiceFabricManagedCluster.cs
Show resolved
Hide resolved
...c/ServiceFabric/Commands/ManagedClusters/ManagedClusters/SetAzServiceFabricManagedCluster.cs
Show resolved
Hide resolved
...eFabric/Commands/ManagedClusters/Applications/SetAzServiceFabricManagedClusterApplication.cs
Show resolved
Hide resolved
| [Parameter(Mandatory = false, ParameterSetName = ByResourceGroup, | ||
| HelpMessage = "Specify the type of managed identity for the application. Options are None, SystemAssigned, UserAssigned, and SystemAssigned,UserAssigned.")] | ||
| [Parameter(Mandatory = false, ParameterSetName = ByResourceId, | ||
| HelpMessage = "Specify the type of managed identity for the application. Options are None, SystemAssigned, UserAssigned, and SystemAssigned,UserAssigned.")] | ||
| [Parameter(Mandatory = false, ParameterSetName = ByInputObject, |
There was a problem hiding this comment.
New identity parameters introduce new behavior for managed cluster applications, but existing scenario tests for Set-AzServiceFabricManagedClusterApplication don't cover identity updates. Add/update tests to exercise setting identity type and user-assigned identities and validate the resulting properties.
src/ServiceFabric/ServiceFabric/Models/ManagedClusters/PSManagedService.cs
Show resolved
Hide resolved
| [Parameter(Mandatory = false, ParameterSetName = WithParamsByName, HelpMessage = "Indicates if this node type can only be used for outbound connections. Outbound-only node types will not have load balancing rules associated with them.")] | ||
| public bool? IsOutboundOnly { get; set; } | ||
|
|
||
| [Parameter(Mandatory = false, ParameterSetName = WithParamsByName, HelpMessage = "Enable resilient ephemeral OS disk for the node type. This provides better performance and resilience for ephemeral OS disks.")] | ||
| public bool? EnableResilientEphemeralOSDisk { get; set; } |
There was a problem hiding this comment.
New node type parameters (e.g., IsOutboundOnly/EnableResilientEphemeralOSDisk/SecureBootEnabled/UseEphemeralOSDisk, etc.) change Set-AzServiceFabricManagedNodeType behavior, but scenario tests currently only cover a subset of updates. Add coverage that sets these flags and asserts they round-trip via Get-AzServiceFabricManagedNodeType.
...c/ServiceFabric/Commands/ManagedClusters/ManagedClusters/SetAzServiceFabricManagedCluster.cs
Show resolved
Hide resolved
| [Parameter(Mandatory = false, ParameterSetName = StatelessSingleton, | ||
| HelpMessage = "Specify the DNS name for the service. This enables service discovery via DNS.")] | ||
| [Parameter(Mandatory = false, ParameterSetName = StatelessUniformInt64, | ||
| HelpMessage = "Specify the DNS name for the service. This enables service discovery via DNS.")] | ||
| [Parameter(Mandatory = false, ParameterSetName = StatelessNamed, |
There was a problem hiding this comment.
ServiceDnsName adds new service creation behavior for New-AzServiceFabricManagedClusterService, but existing scenario tests create services without exercising DNS-based service discovery. Add a test case that sets -ServiceDnsName and validates it is returned by Get-AzServiceFabricManagedClusterService.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
...eFabric/Commands/ManagedClusters/Applications/NewAzServiceFabricManagedClusterApplication.cs
Show resolved
Hide resolved
...eFabric/Commands/ManagedClusters/Applications/NewAzServiceFabricManagedClusterApplication.cs
Show resolved
Hide resolved
...eFabric/Commands/ManagedClusters/Applications/SetAzServiceFabricManagedClusterApplication.cs
Show resolved
Hide resolved
...eFabric/Commands/ManagedClusters/Applications/SetAzServiceFabricManagedClusterApplication.cs
Show resolved
Hide resolved
...eFabric/Commands/ManagedClusters/Applications/SetAzServiceFabricManagedClusterApplication.cs
Show resolved
Hide resolved
src/ServiceFabric/ServiceFabric/help/New-AzServiceFabricManagedClusterApplication.md
Show resolved
Hide resolved
...eFabric/Commands/ManagedClusters/Applications/NewAzServiceFabricManagedClusterApplication.cs
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Description
Set-AzServiceFabricManagedClusterApplicationto use correct resource completer for managed clusters instead of classic clusters.-IdentityType,-UserAssignedIdentityId, and-ApplicationManagedIdentitytoNew-AzServiceFabricManagedClusterApplicationto support managed identity configuration on applications.-IdentityType,-UserAssignedIdentityId, and-ApplicationManagedIdentitytoSet-AzServiceFabricManagedClusterApplicationto support managed identity configuration on applications.-AzureActiveDirectoryClientApplication,-AzureActiveDirectoryClusterApplication,-AzureActiveDirectoryTenantId,-EnableHttpGatewayExclusiveAuthMode,-HttpGatewayTokenAuthConnectionPort,-MaxPercentUnhealthyApplications,-MaxPercentUnhealthyNodes,-MaxUnusedVersionsToKeep,-AddonFeature,-DdosProtectionPlanId,-EnableIpv6,-EnableServicePublicIP,-PublicIPPrefixId,-PublicIPv6PrefixId,-SubnetId,-UseCustomVnet,-VMImage,-AllocatedOutboundPort,-EnableOutboundOnlyNodeTypes, and-SkipManagedNsgAssignmenttoNew-AzServiceFabricManagedCluster.-AzureActiveDirectoryClientApplication,-AzureActiveDirectoryClusterApplication,-AzureActiveDirectoryTenantId,-EnableHttpGatewayExclusiveAuthMode,-HttpGatewayTokenAuthConnectionPort,-MaxPercentUnhealthyApplications,-MaxPercentUnhealthyNodes,-MaxUnusedVersionsToKeep,-AddonFeature,-DdosProtectionPlanId,-PublicIPPrefixId,-PublicIPv6PrefixId,-VMImage,-AllocatedOutboundPort,-EnableOutboundOnlyNodeTypes, and-SkipManagedNsgAssignmenttoSet-AzServiceFabricManagedCluster.Manualoption for the-UpgradeModeparameter inSet-AzServiceFabricManagedCluster.-IsOutboundOnly,-EnableResilientEphemeralOSDisk,-EnableAcceleratedNetworking,-EnableEncryptionAtHost,-EnableNodePublicIP,-EnableNodePublicIPv6,-SecureBootEnabled, and-UseEphemeralOSDisktoNew-AzServiceFabricManagedNodeType.-IsOutboundOnly,-EnableResilientEphemeralOSDisk,-EnableAcceleratedNetworking,-EnableEncryptionAtHost,-EnableNodePublicIP,-EnableNodePublicIPv6,-SecureBootEnabled, and-UseEphemeralOSDisktoSet-AzServiceFabricManagedNodeType.-ServiceDnsNametoNew-AzServiceFabricManagedClusterServicefor DNS-based service discovery.Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.