Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions controllers/dscinitialization/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ var (
prometheusManifestsPath = filepath.Join(deploy.DefaultManifestPath, ComponentName, "prometheus", "base")
prometheusConfigPath = filepath.Join(deploy.DefaultManifestPath, ComponentName, "prometheus", "apps")
networkpolicyPath = filepath.Join(deploy.DefaultManifestPath, ComponentName, "networkpolicy")
NameConsoleLink = "console"
NamespaceConsoleLink = "openshift-console"
)

// only when reconcile on DSCI CR, initial set to true
Expand Down Expand Up @@ -349,7 +347,7 @@ func configurePrometheus(ctx context.Context, dsciInit *dsciv1.DSCInitialization
func configureBlackboxExporter(ctx context.Context, dsciInit *dsciv1.DSCInitialization, r *DSCInitializationReconciler) error {
log := logf.FromContext(ctx)
consoleRoute := &routev1.Route{}
err := r.Client.Get(ctx, client.ObjectKey{Name: "console", Namespace: "openshift-console"}, consoleRoute)
err := r.Client.Get(ctx, client.ObjectKey{Name: cluster.NameConsoleLink, Namespace: cluster.NamespaceConsoleLink}, consoleRoute)
if err != nil {
if !k8serr.IsNotFound(err) {
return err
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ func getCommonCache(ctx context.Context, cli client.Client, platform cluster.Pla
if platform == cluster.ManagedRhoai {
namespaceConfigs["redhat-ods-monitoring"] = cache.Config{}
namespaceConfigs["redhat-ods-applications"] = cache.Config{}
namespaceConfigs[cluster.NamespaceConsoleLink] = cache.Config{}
return namespaceConfigs, nil
}
cNamespaceList := &corev1.NamespaceList{}
Expand Down
4 changes: 4 additions & 0 deletions pkg/cluster/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ const (

// Default OpenShift version CR name.
OpenShiftVersionObj = "version"

// Managed cluster required route.
NameConsoleLink = "console"
NamespaceConsoleLink = "openshift-console"
)