cluster-api-provider-ibmcloud icon indicating copy to clipboard operation
cluster-api-provider-ibmcloud copied to clipboard

Add webhook for validating powervscluster.spec.loadbalancer.additionallister.port against 6443

Open Karthik-K-N opened this issue 1 year ago • 3 comments

/kind feature /area provider/ibmcloud

Describe the solution you'd like [A clear and concise description of what you want to happen.]

As of today by default we create loadbalancer pool and listner with port 6443.

If knowingly user tries to configure a loadbalancer with same port again it throws error

{
  "lastTransitionTime": "2024-03-11T13:54:30Z",
  "message": "Port '6443' is used by another listener instance. Please choose a different port.",
  "reason": "LoadBalancerReconciliationFailed",
  "severity": "Error",
  "status": "False",
  "type": "LoadBalancerReady"
}

So better to fail it early with the help of webhook

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Karthik-K-N avatar Mar 14 '24 05:03 Karthik-K-N

Is there validation for duplicates in the list? For numbers outside of an allowed range?

hamzy avatar Mar 14 '24 09:03 hamzy

We can plan to add it, may be even we can use kubebuilder tags to avoid them

Karthik-K-N avatar Mar 14 '24 11:03 Karthik-K-N

/assign @KeerthanaAP

KeerthanaAP avatar Apr 03 '24 06:04 KeerthanaAP