kubernetes-sigs / vsphere-csi-driver

vSphere storage Container Storage Interface (CSI) plugin
https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/index.html
Apache License 2.0
296 stars 179 forks source link

Remove deprecated usage of controller-runtime manager port field #2872

Closed adikul30 closed 5 months ago

adikul30 commented 5 months ago

instead pass port within options to webhook.NewServer

What this PR does / why we need it: Passing in custom port value to controller-runtime's Manager.New() is deprecated. So, it defaults to using port 9443 which is causing conflict with the capv controller pod. We need to pass in the port to the webhookServer options.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Testing done: Replaced image for webhook and controller. It's up and running fine.

root@420ff98e6e54c74d07c5c6b3c456e998 [ ~ ]# k -n vmware-system-csi get po
NAME                                      READY   STATUS    RESTARTS      AGE
vsphere-csi-controller-645cf4b968-nxknp   7/7     Running   3 (57s ago)   97s
vsphere-csi-controller-645cf4b968-x5st6   7/7     Running   0             26s
vsphere-csi-webhook-568d8f9789-gb6zs      1/1     Running   0             98s
vsphere-csi-webhook-568d8f9789-xthft      1/1     Running   0             74s
Build #1406 (Apr 30, 2024, 10:54:09 AM)
adkulkarni
PR 2872
Ran 1 of 848 Specs in 326.797 seconds SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 847 Skipped PASS Ginkgo ran 1 suite in 6m42.137547113s Test Suite Passed make: Leaving directory `/home/worker/workspace/csi-wcp-precheckin/Results/1406/vsphere-csi-driver' 

Special notes for your reviewer:

Release note:

Remove deprecated usage of controller-runtime manager port field
adikul30 commented 5 months ago
Build #1406 (Apr 30, 2024, 10:54:09 AM)
adkulkarni
PR 2872
Ran 1 of 848 Specs in 326.797 seconds SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 847 Skipped PASS Ginkgo ran 1 suite in 6m42.137547113s Test Suite Passed make: Leaving directory `/home/worker/workspace/csi-wcp-precheckin/Results/1406/vsphere-csi-driver' 
divyenpatel commented 5 months ago

/ok-to-test

shalini-b commented 5 months ago

/approve /lgtm

k8s-ci-robot commented 5 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adikul30, shalini-b

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/OWNERS)~~ [adikul30,shalini-b] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment