-
Notifications
You must be signed in to change notification settings - Fork 242
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
[Multitenancy]: Add PodNetwork CRD #2133
Conversation
// customer vnet guid | ||
Network string `json:"network,omitempty"` | ||
// customer subnet name | ||
Subnet string `json:"subnet,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.
I would call the whole Subnet ResourceId here.
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.
So should I rename it SubnetID? SubnetResourceID?
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.
@neaggarwMS would subnet resource id have vnet guid? If so, maybe we can drop vnetGUID and just have subnet resource id
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.
nevermind, it would not have vnet guid, confirmed it with vipin
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 to SubnetResourceID
type PodNetworkSpec struct { | ||
// +kubebuilder:validation:Optional | ||
// customer vnet guid | ||
Network string `json:"network,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.
For Azure Naming, lets call it VnetGuid.
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
2eeb0a7
to
aa0761d
Compare
7d37430
Signed-off-by: aggarwal0009 <[email protected]>
Signed-off-by: aggarwal0009 <[email protected]>
type Status string | ||
|
||
const ( | ||
Nil Status = "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.
Do we need a Nil
status? Conceptually, what is the difference between "Nil"
and ""
?
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.
no, we don't need nil as an enum value.
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
type PodNetworkStatus struct { | ||
// +kubebuilder:validation:Optional | ||
Status Status `json:"status,omitempty"` | ||
ErrorMessage string `json:"errorMessage,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.
I thought we were going to use events on the object to convey error messages instead of putting it into the object. It's kind of an anti-pattern to have a field for error message in a resource (can't think of any other k8s resource that has a field like this)
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 we agreed to use enum values on status for known error categories => actionable repair item. (e.g.: subnet is not delegated to this service => revalidate and create the SAL)
For error debug details we discussed having the error message, but agreed that can just go into events if the status enum is informative enough.
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 errorMessage field in favor or events.
a16fd3c
to
1d78feb
Compare
4190192
to
1d78feb
Compare
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.
couple nits, otherwise lgtm
Co-authored-by: Evan Baker <[email protected]> Signed-off-by: aggarwal0009 <[email protected]>
Reason for Change:
This CRD is added to enable VNET multitenancy – which will be watched and managed by the control plane.
These represent a Cx subnet already delegated by the customer to the Orchestrator RP
Issue Fixed:
Requirements:
Notes: