@@ -271,14 +271,14 @@ func (r *RayClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request)
271
271
// - Or fallback to the well-known defaults
272
272
// add check if running on openshift or vanilla kubernetes
273
273
var kubeRayNamespaces []string
274
- kubeRayNamespaces = []string {cluster . Namespace }
274
+ kubeRayNamespaces = []string {kubeRayDefaultNamespace }
275
275
276
276
if r .IsOpenShift {
277
277
dsci := & dsciv1.DSCInitialization {}
278
278
279
- err := r .Client .Get (ctx , client.ObjectKey {Name : "default-dsci" }, dsci )
279
+ err := r .Client .Get (ctx , client.ObjectKey {Name : defaultDSCINamespace }, dsci )
280
280
if errors .IsNotFound (err ) {
281
- kubeRayNamespaces = []string {"opendatahub" , "redhat-ods-applications" }
281
+ kubeRayNamespaces = []string {odhNamespace , rhdsAppsNamespace }
282
282
} else if err != nil {
283
283
return ctrl.Result {}, err
284
284
} else {
@@ -557,7 +557,7 @@ func desiredHeadNetworkPolicy(cluster *rayv1.RayCluster, cfg *config.KubeRayConf
557
557
networkingv1ac .NetworkPolicyIngressRule ().
558
558
WithFrom (
559
559
networkingv1ac .NetworkPolicyPeer ().WithPodSelector (metav1ac .LabelSelector ().
560
- WithMatchLabels (map [string ]string {"app.kubernetes.io/component" : "kuberay-operator" })).
560
+ WithMatchLabels (map [string ]string {"app.kubernetes.io/component" : kubeRayOperatorNamespace })).
561
561
WithNamespaceSelector (metav1ac .LabelSelector ().
562
562
WithMatchExpressions (metav1ac .LabelSelectorRequirement ().
563
563
WithKey (corev1 .LabelMetadataName ).
0 commit comments