@@ -29,6 +29,7 @@ import (
2929 "github.com/RHEcosystemAppEng/dbaas-operator/controllers/reconcilers/console_plugin"
3030 providers_installation "github.com/RHEcosystemAppEng/dbaas-operator/controllers/reconcilers/providers_installation"
3131 "github.com/RHEcosystemAppEng/dbaas-operator/controllers/reconcilers/quickstart_installation"
32+ "golang.org/x/mod/semver"
3233
3334 "github.com/go-logr/logr"
3435
@@ -72,6 +73,7 @@ type DBaaSPlatformReconciler struct {
7273 Log logr.Logger
7374 installComplete bool
7475 operatorNameVersion string
76+ OcpVersion string
7577}
7678
7779//+kubebuilder:rbac:groups=dbaas.redhat.com,resources=*,verbs=get;list;watch;create;update;patch;delete
@@ -239,6 +241,9 @@ func (r *DBaaSPlatformReconciler) getReconcilerForPlatform(platformConfig dbaasv
239241 case dbaasv1alpha1 .TypeProvider :
240242 return providers_installation .NewReconciler (r .Client , r .Scheme , r .Log , platformConfig )
241243 case dbaasv1alpha1 .TypeConsolePlugin :
244+ if r .OcpVersion != "" && semver .Compare (r .OcpVersion , "v4.9" ) <= 0 {
245+ platformConfig .Image += reconcilers .CONSOLE_PLUGIN_49_TAG
246+ }
242247 return console_plugin .NewReconciler (r .Client , r .Scheme , r .Log , platformConfig )
243248 case dbaasv1alpha1 .TypeQuickStart :
244249 return quickstart_installation .NewReconciler (r .Client , r .Scheme , r .Log )
0 commit comments