⚠️ Group API server fields under spec.apiServer#3169
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
7b48a64 to
de89db1
Compare
967292a to
4a40e56
Compare
|
/test pull-cluster-api-provider-openstack-e2e-full-test |
|
/retest |
|
@lentzi90 && @bnallapeta, this is ready from my side |
bnallapeta
left a comment
There was a problem hiding this comment.
Looks good overall. Minor comment.
Also, on the status question, I think its best to change the below to maintain consistency. If we don't do this, we might carry the inconsistency in naming in the long run.
Status.APIServerLoadBalancer → Status.ManagedAPIServerLoadBalancer
|
|
||
| for _, v := range flavors { | ||
| if v.Enabled && v.Name == *openStackCluster.Spec.APIServerLoadBalancer.Flavor { | ||
| if v.Enabled && v.Name == *openStackCluster.Spec.APIServer.ManagedLoadBalancer.Flavor { |
There was a problem hiding this comment.
technically, although this is the same, I think we should change this to lbSpec.Flavour to maintain consistency with the rest of the code.
| } | ||
| if lbFlavorID == "" { | ||
| record.Warnf(openStackCluster, "OctaviaFlavorNotFound", "Flavor %s specified for Octavia not found, using the default flavor.", *openStackCluster.Spec.APIServerLoadBalancer.Flavor) | ||
| record.Warnf(openStackCluster, "OctaviaFlavorNotFound", "Flavor %s specified for Octavia not found, using the default flavor.", *openStackCluster.Spec.APIServer.ManagedLoadBalancer.Flavor) |
| } | ||
|
|
||
| availabilityZone = openStackCluster.Spec.APIServerLoadBalancer.AvailabilityZone | ||
| availabilityZone = openStackCluster.Spec.APIServer.ManagedLoadBalancer.AvailabilityZone |
lentzi90
left a comment
There was a problem hiding this comment.
Great stuff!
I have basically only one thing that needs fixing. The other two are just minor things.
We probably don't test that specific jsonpatch in the e2e tests so this is why it wasn't detected.
Consolidate the various flat API server fields (apiServerFloatingIP, apiServerFixedIP, apiServerPort, disableAPIServerFloatingIP, and apiServerLoadBalancer) into a single structured spec.apiServer object, with apiServerLoadBalancer renamed to managedLoadBalancer within it. Includes conversion from v1beta1 and updated webhook validation.
…ancer Rename the status field for consistency with the spec-side rename introduced in the API server fields restructure (spec.apiServer.managedLoadBalancer). Includes conversion functions and updated tests.
|
/test pull-cluster-api-provider-openstack-e2e-full-test |
|
@lentzi90 && @bnallapeta: |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lentzi90 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
/hold cancel |
|
@nikParasyr: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/retest |
1 similar comment
|
/retest |
What this PR does / why we need it:
Consolidate the various flat API server fields (apiServerFloatingIP, apiServerFixedIP, apiServerPort, disableAPIServerFloatingIP, and apiServerLoadBalancer) into a single structured spec.apiServer object, with apiServerLoadBalancer renamed to managedLoadBalancer within it. Includes conversion from v1beta1 and updated webhook validation.
Which issue(s) this PR fixes :
Fixes #2899
Special notes for your reviewer:
Not sure whether OSC.status should be updated as well to reflect this change. Open to suggestions=> addressedTODOs:
/hold