fix controller manager bug
This commit is contained in:
@@ -98,20 +98,21 @@ func Complete(s *options.KubeSphereControllerManagerOptions) *options.KubeSphere
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
func CreateClientSet(s *options.KubeSphereControllerManagerOptions, stopCh <-chan struct{}) error {
|
func CreateClientSet(conf *controllerconfig.Config, stopCh <-chan struct{}) error {
|
||||||
csop := &client.ClientSetOptions{}
|
csop := &client.ClientSetOptions{}
|
||||||
|
|
||||||
csop.SetKubernetesOptions(s.KubernetesOptions).
|
csop.SetKubernetesOptions(conf.KubernetesOptions).
|
||||||
SetDevopsOptions(s.DevopsOptions).
|
SetDevopsOptions(conf.DevopsOptions).
|
||||||
SetS3Options(s.S3Options).
|
SetS3Options(conf.S3Options).
|
||||||
SetOpenPitrixOptions(s.OpenPitrixOptions)
|
SetOpenPitrixOptions(conf.OpenPitrixOptions).
|
||||||
|
SetKubeSphereOptions(conf.KubeSphereOptions)
|
||||||
client.NewClientSetFactory(csop, stopCh)
|
client.NewClientSetFactory(csop, stopCh)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func Run(s *options.KubeSphereControllerManagerOptions, stopCh <-chan struct{}) error {
|
func Run(s *options.KubeSphereControllerManagerOptions, stopCh <-chan struct{}) error {
|
||||||
err := CreateClientSet(s, stopCh)
|
err := CreateClientSet(controllerconfig.Get(), stopCh)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(err)
|
klog.Error(err)
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user