-
Notifications
You must be signed in to change notification settings - Fork 541
WIP: CORENET-5857: Add a field for specifying UDN Name for a project #2265
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,9 @@ const ( | |
// ProjectRequesterAnnotation is the username that requested a given project. Its not guaranteed to be present, | ||
// but it is set by the default project template. | ||
ProjectRequesterAnnotation = "openshift.io/requester" | ||
|
||
// ProjectUDNName is a label which refers to a UDN Name for a project | ||
ProjectUDNName = "k8s.ovn.org/primary-user-defined-network" | ||
) | ||
|
||
// ProjectSpec describes the attributes on a Project | ||
|
@@ -108,4 +111,9 @@ type ProjectRequest struct { | |
DisplayName string `json:"displayName,omitempty" protobuf:"bytes,2,opt,name=displayName"` | ||
// description is the description to apply to a project | ||
Description string `json:"description,omitempty" protobuf:"bytes,3,opt,name=description"` | ||
// udnName is the User Defined Networks Name to apply to a project | ||
// Reference of regex and max length: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set | ||
// +kubebuilder:validation:MaxLength=63 | ||
// +kubebuilder:validation:Pattern=`^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$` | ||
UDNName string `json:"udnName,omitempty" protobuf:"bytes,4,opt,name=udnName"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this field is intended to be optional and therefore should have the What happens if this value is not provided by a user? Explain this in the GoDoc as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, is the empty string ( |
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Don't include a documentation reference here. Instead, state in plain sentences what the constraints of this field are.