Fix segmentation violation error in karmada-agent component
Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>
This commit is contained in:
parent
b939368e08
commit
c0525e8715
|
@ -184,8 +184,12 @@ func run(ctx context.Context, opts *options.Options) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if clusterSecret != nil {
|
||||||
registerOption.Secret = *clusterSecret
|
registerOption.Secret = *clusterSecret
|
||||||
|
}
|
||||||
|
if impersonatorSecret != nil {
|
||||||
registerOption.ImpersonatorSecret = *impersonatorSecret
|
registerOption.ImpersonatorSecret = *impersonatorSecret
|
||||||
|
}
|
||||||
err = util.RegisterClusterInControllerPlane(registerOption, controlPlaneKubeClient, generateClusterInControllerPlane)
|
err = util.RegisterClusterInControllerPlane(registerOption, controlPlaneKubeClient, generateClusterInControllerPlane)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to register with karmada control plane: %w", err)
|
return fmt.Errorf("failed to register with karmada control plane: %w", err)
|
||||||
|
|
Loading…
Reference in New Issue