kubernetes / cloud-provider-vsphere

Kubernetes Cloud Provider for vSphere https://cloud-provider-vsphere.sigs.k8s.io
Apache License 2.0
244 stars 177 forks source link

cloud provider vsphere pod didn't restart gracefully as expected #1212

Open XudongLiuHarold opened 3 months ago

XudongLiuHarold commented 3 months ago

What happened?

In https://github.com/kubernetes/cloud-provider-vsphere/blob/master/cmd/vsphere-cloud-controller-manager/main.go#L273, cloud provider vsphere is using klog.Fatalf to log information, it will exit directly so the stop channel didn't receive the signal

klog.Fatalf("restarting pod because received event %v\n", event)
stopCh <- struct{}{}

What did you expect to happen?

The pod should not exit at klog.Fatalf and allow the signal to be send to the channel

How can we reproduce it (as minimally and precisely as possible)?

existing in current version

Anything else we need to know (please consider providing level 4 or above logs of CPI)?

No response

Kubernetes version

```console $ kubectl version # paste output here ```

v1.31.0

Cloud provider or hardware configuration

OS version

```console # On Linux: $ cat /etc/os-release # paste output here $ uname -a # paste output here # On Windows: C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture # paste output here ```

Kernel (e.g. uname -a)

Install tools

Container runtime (CRI) and and version (if applicable)

Related plugins (CNI, CSI, ...) and versions (if applicable)

Others

XudongLiuHarold commented 3 months ago

/assign

k8s-triage-robot commented 2 days ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale