diff --git a/controllers/clusterversion_controller.go b/controllers/clusterversion_controller.go index c87227b8e..3a4073847 100644 --- a/controllers/clusterversion_controller.go +++ b/controllers/clusterversion_controller.go @@ -30,6 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" + consolev1alpha1 "github.com/openshift/api/console/v1alpha1" "github.com/red-hat-storage/odf-operator/console" "github.com/red-hat-storage/odf-operator/pkg/util" ) @@ -129,6 +130,20 @@ func (r *ClusterVersionReconciler) ensureConsolePlugin(clusterVersion string) er logger.Info(fmt.Sprintf("Set the BasePath for odf-console plugin as '%s'", basePath)) odfConsolePlugin.Spec.Service.BasePath = basePath } + if odfConsolePlugin.Spec.Proxy == nil { + odfConsolePlugin.Spec.Proxy = []consolev1alpha1.ConsolePluginProxy{ + { + Type: consolev1alpha1.ProxyTypeService, + Alias: "provider-proxy", + Service: consolev1alpha1.ConsolePluginProxyServiceConfig{ + Name: "ux-backend-proxy", + Namespace: OperatorNamespace, + Port: 8888, + }, + Authorize: true, + }, + } + } return nil }) if err != nil && !errors.IsAlreadyExists(err) {