feat: add GlobalPodSecurity config plumbing#4319
Open
alam-tahmid wants to merge 1 commit intoAzure:masterfrom
Open
feat: add GlobalPodSecurity config plumbing#4319alam-tahmid wants to merge 1 commit intoAzure:masterfrom
alam-tahmid wants to merge 1 commit intoAzure:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces GlobalPodSecurity configuration plumbing to carry a new boolean knob from CNI network config into endpoint metadata, and updates default CNI conflists to surface the option (defaulting to false).
Changes:
- Added
globalPodSecurityto CNINetworkConfig(JSON) and plumbed it intonetwork.EndpointInfo. - Extended
networkendpoint-related structs to carryGlobalPodSecurity. - Added unit tests for config unmarshalling and
createEpInfopropagation, and updated default Linux/Windows conflists to include the flag (set tofalse).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
network/endpoint.go |
Adds GlobalPodSecurity fields to endpoint and EndpointInfo structs. |
cni/network/network.go |
Wires NetworkConfig.GlobalPodSecurity into generated EndpointInfo. |
cni/network/network_test.go |
Adds coverage to ensure createEpInfo propagates the flag into EndpointInfo. |
cni/netconfig.go |
Adds GlobalPodSecurity to CNI JSON config (globalPodSecurity). |
cni/netconfig_test.go |
Adds JSON unmarshal tests for globalPodSecurity defaulting/values. |
cni/azure-windows.conflist |
Adds "globalPodSecurity": false to default Windows conflist. |
cni/azure-linux.conflist |
Adds "globalPodSecurity": false to default Linux conflist. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b7af504 to
0d1ce9f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for Change:
Add
GlobalPodSecurityconfig plumbing to support forcing same-VM pod-to-pod traffic through AzureVFP for NSG evaluation. This is the first of 3 PRs — it adds the config field, endpoint struct wiring, and default
conflist entries.
Issue Fixed:
Requirements:
Notes:
This is PR 1 of 3 for the
GlobalPodSecurityfeature:The field defaults to false (no behavioral change until explicitly enabled).