Skip to content

Commit

Permalink
console: Fixes update issue in ConsolePlugin
Browse files Browse the repository at this point in the history
ConsolePlugin gets correctly updated in upgrade scenarios

Signed-off-by: Bipul Adhikari <badhikar@redhat.com>
  • Loading branch information
bipuladh authored and openshift-cherrypick-robot committed Jan 22, 2024
1 parent f250194 commit b64a912
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions controllers/clusterversion_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b64a912

Please sign in to comment.