Skip to content

Commit

Permalink
fix: replace %w with %v for klog
Browse files Browse the repository at this point in the history
replace %w with %v for klog as
Fatalf does not support error-wrapping

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
  • Loading branch information
Madhu-1 authored and mergify[bot] committed Nov 8, 2023
1 parent 4996d0f commit 3be3bf9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sidecar/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ func main() {

controllerEndpoint, err := util.BuildEndpointURL(*controllerIP, *controllerPort, *podName, *podNamespace)
if err != nil {
klog.Fatalf("Failed to validate controller endpoint: %w", err)
klog.Fatalf("Failed to validate controller endpoint: %v", err)
}

csiClient, err := client.New(*csiAddonsAddress, *timeout)
if err != nil {
klog.Fatalf("Failed to connect to %q : %w", *csiAddonsAddress, err)
klog.Fatalf("Failed to connect to %q : %v", *csiAddonsAddress, err)
}

err = csiClient.Probe()
if err != nil {
klog.Fatalf("Failed to probe driver: %w", err)
klog.Fatalf("Failed to probe driver: %v", err)
}

cfg, err := rest.InClusterConfig()
if err != nil {
klog.Fatalf("Failed to get cluster config: %w", err)
klog.Fatalf("Failed to get cluster config: %v", err)
}

kubeClient, err := kubernetes.NewForConfig(cfg)
Expand Down

0 comments on commit 3be3bf9

Please sign in to comment.