Skip to content

Commit

Permalink
Update addon-manager detection
Browse files Browse the repository at this point in the history
Signed-off-by: Rokibul Hasan <[email protected]>
  • Loading branch information
RokibulHasan7 committed Oct 28, 2024
1 parent ad43749 commit 93e4866
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/cmd/get/hubinfo/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,8 @@ func (o *Options) printComponents() error {

o.printer.Write(printer.LEVEL_0, "Components:\n")

if cmgr.Spec.AddOnManagerConfiguration != nil && 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 @@ -166,6 +164,9 @@ func (o *Options) printPlacement(cmgr *v1.ClusterManager) error {
}

func (o *Options) printAddOnManager(cmgr *v1.ClusterManager) error {
if cmgr.Spec.AddOnManagerConfiguration != nil && !check.IsFeatureEnabled(cmgr.Spec.AddOnManagerConfiguration.FeatureGates, string(feature.AddonManagement)) {
return nil
}
o.printer.Write(printer.LEVEL_1, "AddOn Manager:\n")
return printer.PrintComponentsDeploy(o.printer, o.kubeClient, cmgr.Status.RelatedResources, componentNameAddOnManagerController)
}
Expand Down

0 comments on commit 93e4866

Please sign in to comment.