Skip to content

Commit

Permalink
Fix panic issue
Browse files Browse the repository at this point in the history
Signed-off-by: Rokibul Hasan <[email protected]>
  • Loading branch information
RokibulHasan7 committed Oct 26, 2024
1 parent 750e384 commit d5073ed
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/cmd/get/hubinfo/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,9 @@ func (o *Options) printComponents() error {
}

o.printer.Write(printer.LEVEL_0, "Components:\n")
if check.IsFeatureEnabled(cmgr.Spec.AddOnManagerConfiguration.FeatureGates, string(feature.AddonManagement)) {
if err := o.printAddOnManager(cmgr); err != nil {
return err
}

if err := o.printAddOnManager(cmgr); err != nil {
return err
}
if err := o.printRegistration(cmgr); err != nil {
return err
Expand Down Expand Up @@ -150,7 +149,7 @@ func (o *Options) printRegistration(cmgr *v1.ClusterManager) error {

func (o *Options) printWork(cmgr *v1.ClusterManager) error {
o.printer.Write(printer.LEVEL_1, "Work:\n")
if check.IsFeatureEnabled(cmgr.Spec.WorkConfiguration.FeatureGates, string(feature.ManifestWorkReplicaSet)) {
if cmgr.Spec.WorkConfiguration != nil && check.IsFeatureEnabled(cmgr.Spec.WorkConfiguration.FeatureGates, string(feature.ManifestWorkReplicaSet)) {
err := printer.PrintComponentsDeploy(o.printer, o.kubeClient, cmgr.Status.RelatedResources, componentNameWorkController)
if err != nil {
return err
Expand Down

0 comments on commit d5073ed

Please sign in to comment.