-
Notifications
You must be signed in to change notification settings - Fork 260
[Multitenancy] : Add MT PodNetworkConfig CRD #2111
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
838e5b5 to
d931cb8
Compare
| } | ||
|
|
||
| // SetOwnerRef sets the controller of the MultitenantPodNetworkConfig to the given object atomically, using HTTP Patch. | ||
| // Deprecated: SetOwnerRef is deprecated, use the more correctly named SetControllerRef. |
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.
Let's not add a new function that's already deprecated
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.
removed
| } | ||
|
|
||
| // PatchSpec performs a server-side patch of the passed MultitenantPodNetworkConfigSpec to the MultitenantPodNetworkConfig specified by the NamespacedName. | ||
| func (c *Client) PatchSpec(ctx context.Context, key types.NamespacedName, spec *v1alpha1.MultitenantPodNetworkConfigSpec, fieldManager string) (*v1alpha1.MultitenantPodNetworkConfig, error) { |
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.
is this necessary? MTPNC will get created with known values for spec and I don't expect the spec to need to get updated
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.
removed
|
|
||
| // UpdateSpec does a fetch, deepcopy, and update of the MultitenantPodNetworkConfig with the passed spec. | ||
| // Deprecated: UpdateSpec is deprecated and usage should migrate to PatchSpec. | ||
| func (c *Client) UpdateSpec(ctx context.Context, key types.NamespacedName, spec *v1alpha1.MultitenantPodNetworkConfigSpec) (*v1alpha1.MultitenantPodNetworkConfig, error) { |
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.
also I think this func is not needed for same reason as above
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.
removed
thatmattlong
left a comment
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.
let's not add the helper funcs to the client which mutate the spec until we know we need them
03c295b to
f2172d8
Compare
| @@ -0,0 +1,3 @@ | |||
| # MultitenantPodNetworkConfig CRDs | |||
|
|
|||
| MPNC objects represent the network configuration goal state for a pod running a multitenant networked container and are created and managed by control plane as part of the network configuration, during Pod lifecycle events. | |||
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 would also add that it is created by AKS Customers. So any change in the CRD definition has to be backward compatible.
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.
MPNC object will be created by the swift control plane, though - the crds created by the AKS customers will be on a separate PR. The point on backward compat is valid, but the interface is between CNS and control plane.
| // MultitenantPodNetworkConfigStatus defines the observed state of PodNetworkConfig | ||
| type MultitenantPodNetworkConfigStatus struct { | ||
| // network container id | ||
| UUID string `json:"uuid,omitempty"` |
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.
Lets call it NCId only or CompartmentId
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.
updated
crd/multitenantpodnetworkconfig/api/v1alpha1/multitenantpodnetworkconfig.go
Show resolved
Hide resolved
crd/multitenantpodnetworkconfig/api/v1alpha1/multitenantpodnetworkconfig.go
Show resolved
Hide resolved
|
|
||
| // MultitenantPodNetworkConfig is the Schema for the multitenantpodnetworkconfigs API | ||
| // +kubebuilder:resource:scope=Namespaced | ||
| // +kubebuilder:resource:shortName=mpnc |
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.
suggest mtpnc for shotname since that's what we've been saying out loud
d686552 to
38b48b6
Compare
38b48b6 to
ca12e0f
Compare
Reason for Change:
New CRD MultitenantPodNetworkConfig added to enable VNET multitenancy – which will be watched and managed by the control plane.
Issue Fixed:
Requirements:
Notes: