diff --git a/components/odh-notebook-controller/controllers/notebook_controller_test.go b/components/odh-notebook-controller/controllers/notebook_controller_test.go index 869068945b3..b45adc2bda7 100644 --- a/components/odh-notebook-controller/controllers/notebook_controller_test.go +++ b/components/odh-notebook-controller/controllers/notebook_controller_test.go @@ -439,7 +439,6 @@ var _ = Describe("The Openshift Notebook controller", func() { "--upstream=http://localhost:8888", "--upstream-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt", "--email-domain=*", - "--skip-provider-button", `--openshift-sar={"verb":"get","resource":"notebooks","resourceAPIGroup":"kubeflow.org",` + `"resourceName":"` + Name + `","namespace":"$(NAMESPACE)"}`, "--logout-url=https://example.notebook-url/notebook/" + Namespace + "/" + Name, diff --git a/components/odh-notebook-controller/controllers/notebook_webhook.go b/components/odh-notebook-controller/controllers/notebook_webhook.go index 358ebc1f754..91b7a76197f 100644 --- a/components/odh-notebook-controller/controllers/notebook_webhook.go +++ b/components/odh-notebook-controller/controllers/notebook_webhook.go @@ -19,9 +19,10 @@ import ( "context" "encoding/json" "fmt" - configv1 "github.com/openshift/api/config/v1" "net/http" + configv1 "github.com/openshift/api/config/v1" + nbv1 "github.com/kubeflow/kubeflow/components/notebook-controller/api/v1" "github.com/kubeflow/kubeflow/components/notebook-controller/pkg/culler" admissionv1 "k8s.io/api/admission/v1" @@ -91,7 +92,6 @@ func InjectOAuthProxy(notebook *nbv1.Notebook, oauth OAuthConfig) error { "--upstream=http://localhost:8888", "--upstream-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt", "--email-domain=*", - "--skip-provider-button", `--openshift-sar={"verb":"get","resource":"notebooks","resourceAPIGroup":"kubeflow.org",` + `"resourceName":"` + notebook.Name + `","namespace":"$(NAMESPACE)"}`, },