-
Notifications
You must be signed in to change notification settings - Fork 260
Consume ACL for APIPA Endpoint from CreateNC Req #535
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
Conversation
cns/hnsclient/hnsclient_windows.go
Outdated
|
|
||
| var requestedAclPolicy hcn.AclPolicySetting | ||
|
|
||
| if err := json.Unmarshal(requestedPolicy.Settings, &requestedAclPolicy); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you don't need to create new err here. ( err := )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
|
|
||
| // Validate - Validates network container request policies | ||
| func (networkContainerRequestPolicy *NetworkContainerRequestPolicies) Validate() error { | ||
| // validate ACL policy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As one of my comments said can we enforce the validation on apipa endpoint? Check if the provided acl is on apipa endpoint type, if not fail the validation because we don;t have support for acls on cust subnet endpoint. When we add that we should remove the enforced apipa endpoint validation you'll add here. Let me know if it makes sense / you want to discuss this further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, restricted this API only to APIPA in latest commit.
|
@tamilmani1989 can you please check the struct to see if this has everything we will need when we extend this to linux as well. If there is anything missing we should add those fields now. |
|
@aegal how did you e2e test this? Tested invoking CNI via containerd which triggerd the CreateHostNCApipaEndpointRequest which reported success. I can send you a log file offline. |
…pdateNetworkContainerRequest adding DNC changes here for early review, **Requires CNS changes to be checked in first** Azure#535 -Includes a Endpoint policy in NetworkContainerRequest API -Includes Endpoint policy in CNS CreateOrUpdateNetworkContainerRequest -Includes Endpoint policy in CreateOrUpdateNetworkContainerRequest for Publish PR URL: https://msazure.visualstudio.com/DefaultCollection/One/_git/Networking-Aquarius/pullrequest/2750702 Related work items: #6501471
What this PR does / why we need it:
This PR consumes endpoint policies targeting APIPA endpoints. In the future, we are extending policies to requested by the orchestrator in a extensible way from the Create Network Container Request.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #533Special notes for your reviewer:
Tested the successful creation of the HostNCApipaEndpoint with the additional policies requested.
Release note: