Skip to content

Conversation

rejain456
Copy link
Contributor

Reason for Change:

Issue Fixed:

Requirements:

Notes:

@rejain456 rejain456 requested a review from a team as a code owner October 15, 2025 23:12
@rejain456 rejain456 requested review from Copilot and nairashu October 15, 2025 23:12
Copy link
Contributor

@Copilot 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

This PR fixes a bug in Azure CNS where overlay subnet expansions were incorrectly triggering PrimaryCA mismatch errors. The fix adds scenario-aware validation that skips the subnet comparison check for overlay network containers when subnet expansion occurs.

Key Changes:

  • Added Scenario field to CreateNetworkContainerRequest to track the network container type
  • Modified validation logic to skip PrimaryCA comparison for overlay scenarios
  • Populated the Scenario field in both dynamic and static NC request creation paths

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cns/NetworkContainerContract.go Adds Scenario field to track NC type
cns/restserver/internalapi.go Implements conditional PrimaryCA validation based on scenario
cns/kubecontroller/nodenetworkconfig/conversion.go Sets Scenario field for dynamic NC requests
cns/kubecontroller/nodenetworkconfig/conversion_linux.go Sets Scenario field for static NC requests
cns/restserver/util.go Removes unnecessary blank line

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

nairashu
nairashu previously approved these changes Oct 16, 2025
@rejain789 rejain789 force-pushed the jainriya/podCidrExpansionCNSBugFix branch from 893e491 to c853b69 Compare October 17, 2025 00:21
@rejain789 rejain789 requested review from a team as code owners October 17, 2025 15:40
@rejain789 rejain789 requested a review from vipul-21 October 17, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants