File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -42,18 +42,22 @@ type CloudProvider struct {
4242// Initialize creates the Kubernetes and Oxide clients and spawns any additional
4343// controllers, if necessary.
4444func (c * CloudProvider ) Initialize (clientBuilder cloudprovider.ControllerClientBuilder , stop <- chan struct {}) {
45- kubernetesClient := clientBuilder .ClientOrDie (CloudProviderName )
46- c .kubernetesClient = kubernetesClient
45+ kubernetesClient , err := clientBuilder .Client (CloudProviderName )
46+ if err != nil {
47+ klog .Fatalf ("failed to initialize kubernetes client: %v" , err )
48+ return
49+ }
4750
51+ c .kubernetesClient = kubernetesClient
4852 klog .InfoS ("initialized client" , "type" , "kubernetes" )
4953
5054 oxideClient , err := oxide .NewClient (nil )
5155 if err != nil {
5256 klog .Fatalf ("failed to create oxide client: %v" , err )
5357 return
5458 }
55- c .oxideClient = oxideClient
5659
60+ c .oxideClient = oxideClient
5761 klog .InfoS ("initialized client" , "type" , "oxide" )
5862}
5963
You can’t perform that action at this time.
0 commit comments