-
Notifications
You must be signed in to change notification settings - Fork 585
Add loadbalancer field to Power VS machine provider spec #1415
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,15 @@ type PowerVSResourceType string | |
| // PowerVSProcessorType enum attribute to identify the PowerVS instance processor type | ||
| type PowerVSProcessorType string | ||
|
|
||
| // IBMVPCLoadBalancerType is the type of LoadBalancer to use when registering | ||
| // an instance with load balancers specified in LoadBalancerNames | ||
| type IBMVPCLoadBalancerType string | ||
|
|
||
| // ApplicationLoadBalancerType is possible values for IBMVPCLoadBalancerType. | ||
| const ( | ||
| ApplicationLoadBalancerType IBMVPCLoadBalancerType = "Application" // Application Load Balancer for VPC (ALB) | ||
| ) | ||
|
|
||
| const ( | ||
| // PowerVSResourceTypeID enum property to identify an ID type resource reference | ||
| PowerVSResourceTypeID PowerVSResourceType = "ID" | ||
|
|
@@ -121,6 +130,11 @@ type PowerVSMachineProviderConfig struct { | |
| // default, which is subject to change over time. The current default is 32. | ||
| // +optional | ||
| MemoryGiB int32 `json:"memoryGiB,omitempty"` | ||
|
|
||
| // loadBalancers is the set of load balancers to which the new control plane instance | ||
| // should be added once it is created. | ||
| // +optional | ||
| LoadBalancers []LoadBalancerReference `json:"loadBalancers,omitempty"` | ||
| } | ||
|
|
||
| // PowerVSResource is a reference to a specific PowerVS resource by ID, Name or RegEx | ||
|
|
@@ -150,7 +164,7 @@ type PowerVSResource struct { | |
| // | ||
| // Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). | ||
| // +openshift:compatibility-gen:level=1 | ||
| //+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
| // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
| type PowerVSMachineProviderStatus struct { | ||
| metav1.TypeMeta `json:",inline"` | ||
|
|
||
|
|
@@ -190,3 +204,24 @@ type PowerVSSecretReference struct { | |
| // +optional | ||
| Name string `json:"name,omitempty"` | ||
| } | ||
|
|
||
| // LoadBalancerReference is a reference to a load balancer on IBM Cloud virtual private cloud(VPC). | ||
| type LoadBalancerReference struct { | ||
| // name of the LoadBalancer in IBM Cloud VPC. | ||
| // The name should be between 1 and 63 characters long and may consist of lowercase alphanumeric characters and hyphens only. | ||
| // The value must not end with a hyphen. | ||
| // It is a reference to existing LoadBalancer created by openshift installer component. | ||
| // +kubebuilder:validation:Required | ||
| // +kubebuilder:validation:Pattern=`^([a-z]|[a-z][-a-z0-9]*[a-z0-9]|[0-9][-a-z0-9]*([a-z]|[-a-z][-a-z0-9]*[a-z0-9]))$` | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=63 | ||
| Name string `json:"name"` | ||
|
Contributor
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. Lets add a kubebuilder validation for the alpha numeric characters and hyphen, then we will want to explain this limitation within the godoc, and also, we should probably set a maximum length, is there anything in IBM that limits the length or the characters?
Contributor
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. I found the following in the docs, how wil we handle this? Convert any hyphen to an underscore internally? How will we limit the name length given the
Member
Author
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. Loadbalancer name may contain hyphens, Currently this is how the installer creates the loadbalancer
Contributor
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. Great, thanks for finding that, can you explain this in prose within the godoc please? We need to say something along the lines of I think I've understood that regex correctly anyway
Member
Author
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.
Updated accordingly, Please take a look. Thank you. |
||
| // type of the LoadBalancer service supported by IBM Cloud VPC. | ||
| // Currently, only Application LoadBalancer is supported. | ||
| // More details about Application LoadBalancer | ||
| // https://cloud.ibm.com/docs/vpc?topic=vpc-load-balancers-about&interface=ui | ||
| // Supported values are Application. | ||
| // +kubebuilder:validation:Required | ||
| // +kubebuilder:validation:Enum:="Application" | ||
| Type IBMVPCLoadBalancerType `json:"type"` | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.