11diff --git a/vendor/knative.dev/operator/pkg/reconciler/knativeserving/knativeserving.go b/vendor/knative.dev/operator/pkg/reconciler/knativeserving/knativeserving.go
2- index 4b8eca0b0..ccf9f2f67 100644
2+ index 77f091a68..bed9f89c4 100644
33--- a/vendor/knative.dev/operator/pkg/reconciler/knativeserving/knativeserving.go
44+++ b/vendor/knative.dev/operator/pkg/reconciler/knativeserving/knativeserving.go
5- @@ -19,14 +19,15 @@ package knativeserving
5+ @@ -19,14 +19,16 @@ package knativeserving
66 import (
77 "context"
88 "fmt"
9- + "os"
10-
9+ + "os"
10+
1111- mf "github.com/manifestival/manifestival"
1212 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1313 "k8s.io/client-go/kubernetes"
14-
14+
1515 "knative.dev/pkg/logging"
1616 pkgreconciler "knative.dev/pkg/reconciler"
17- -
17+
1818+ mf "github.com/manifestival/manifestival"
1919+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
2020 "knative.dev/operator/pkg/apis/operator/base"
2121 "knative.dev/operator/pkg/apis/operator/v1beta1"
2222 clientset "knative.dev/operator/pkg/client/clientset/versioned"
23- @@ -90 ,6 +91 ,12 @@ func (r *Reconciler) FinalizeKind(ctx context.Context, original *v1beta1.Knative
24- if manifest == nil {
23+ @@ -91 ,6 +93 ,12 @@ func (r *Reconciler) FinalizeKind(ctx context.Context, original *v1beta1.Knative
24+ logger.Warnf("No manifest found; no cluster-scoped resources will be finalized")
2525 return nil
2626 }
2727+ // we need this to apply the correct namespace to the resources otherwise it defaults to knative-serving
@@ -30,31 +30,31 @@ index 4b8eca0b0..ccf9f2f67 100644
3030+ logger.Error("Unable to apply kourier namespace transform", err)
3131+ return nil
3232+ }
33-
33+
3434 if err := common.Uninstall(manifest); err != nil {
3535 logger.Error("Failed to finalize platform resources", err)
36- @@ -97 ,6 +104 ,20 @@ func (r *Reconciler) FinalizeKind(ctx context.Context, original *v1beta1.Knative
36+ @@ -98 ,6 +106 ,20 @@ func (r *Reconciler) FinalizeKind(ctx context.Context, original *v1beta1.Knative
3737 return nil
3838 }
39-
39+
4040+ func overrideKourierNamespace(ks base.KComponent) mf.Transformer {
4141+ if ns, required := os.LookupEnv("REQUIRED_SERVING_INGRESS_NAMESPACE"); required {
4242+ nsInjector := mf.InjectNamespace(ns)
43- + return func(u *unstructured.Unstructured) error {
44- + provider := u.GetLabels()["networking.knative.dev/ingress-provider"]
45- + if provider != "kourier" {
46- + return nil
43+ + return func(u *unstructured.Unstructured) error {
44+ + provider := u.GetLabels()["networking.knative.dev/ingress-provider"]
45+ + if provider != "kourier" {
46+ + return nil
47+ + }
48+ + return nsInjector(u)
4749+ }
48- + return nsInjector(u)
49- + }
5050+ }
5151+ return nil
5252+ }
5353+
5454 // ReconcileKind compares the actual state with the desired, and attempts to
5555 // converge the two.
5656 func (r *Reconciler) ReconcileKind(ctx context.Context, ks *v1beta1.KnativeServing) pkgreconciler.Event {
57- @@ -117 ,6 +138 ,10 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, ks *v1beta1.KnativeServi
57+ @@ -118 ,6 +140 ,10 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, ks *v1beta1.KnativeServi
5858 security.AppendTargetSecurity,
5959 common.AppendAdditionalManifests,
6060 r.appendExtensionManifests,
@@ -64,5 +64,4 @@ index 4b8eca0b0..ccf9f2f67 100644
6464+ },
6565 r.transform,
6666 manifests.Install,
67- common.CheckDeployments,
68-
67+ manifests.SetManifestPaths, // setting path right after applying manifests to populate paths
0 commit comments