Skip to content

fix: do not allow spec update on mtpnc #3953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

isaac-dasan
Copy link
Member

@isaac-dasan isaac-dasan commented Aug 20, 2025

Signed-off-by: GitHub [email protected]

Reason for Change:
Prevent users from updating spec of mtpnc, pn, pni once objects are created

Issue Fixed:

Requirements:

Notes:

@Copilot Copilot AI review requested due to automatic review settings August 20, 2025 20:59
@isaac-dasan isaac-dasan requested a review from a team as a code owner August 20, 2025 20:59
@isaac-dasan isaac-dasan requested a review from csfmomo August 20, 2025 20:59
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 adds immutability validation to prevent spec updates after creation for three Kubernetes custom resources: MultitenantPodNetworkConfig (mtpnc), PodNetwork (pn), and PodNetworkInstance (pni).

  • Adds Kubernetes validation rules to make spec fields immutable after resource creation
  • Implements consistent validation across all three multitenancy CRD types
  • Updates both Go API definitions and generated YAML manifests

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
multitenantpodnetworkconfig.go Adds kubebuilder validation annotation for spec immutability
podnetwork.go Adds kubebuilder validation annotation for spec immutability
podnetworkinstance.go Adds kubebuilder validation annotation for spec immutability
multitenancy.acn.azure.com_multitenantpodnetworkconfigs.yaml Generated YAML manifest with x-kubernetes-validations for spec immutability
multitenancy.acn.azure.com_podnetworks.yaml Generated YAML manifest with x-kubernetes-validations for spec immutability
multitenancy.acn.azure.com_podnetworkinstances.yaml Generated YAML manifest with x-kubernetes-validations for spec immutability

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

@isaac-dasan isaac-dasan changed the title fix: do not allow spec update on mtpnc, pn and pni fix: do not allow spec update on mtpnc Aug 21, 2025
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.

1 participant