From e1ed9fa7ead42433c563b4997a30c3384be738ba Mon Sep 17 00:00:00 2001 From: Vaishnavi Hire Date: Mon, 31 Jul 2023 18:30:46 -0400 Subject: [PATCH] Add Authentication overlay for dashboard (cherry picked from commit fb72455ee23ce21486b0378da63fb4914fee1642) --- components/dashboard/dashboard.go | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/components/dashboard/dashboard.go b/components/dashboard/dashboard.go index 2701d7977af..6fb077783bd 100644 --- a/components/dashboard/dashboard.go +++ b/components/dashboard/dashboard.go @@ -18,6 +18,7 @@ import ( const ( ComponentName = "odh-dashboard" Path = deploy.DefaultManifestPath + "/" + ComponentName + "/base" + PathSupported = deploy.DefaultManifestPath + "/" + ComponentName + "/overlays/authentication" PathISVSM = deploy.DefaultManifestPath + "/" + ComponentName + "/overlays/apps-onprem" PathISVAddOn = deploy.DefaultManifestPath + "/" + ComponentName + "/overlays/apps-addon" PathOVMS = deploy.DefaultManifestPath + "/" + ComponentName + "/modelserving" @@ -108,12 +109,23 @@ func (d *Dashboard) ReconcileComponent(owner metav1.Object, cli client.Client, s } // Deploy odh-dashboard manifests - err = deploy.DeployManifestsFromPath(owner, cli, ComponentName, - Path, - namespace, - scheme, enabled) - if err != nil { - return err + if platform == deploy.OpenDataHub { + err = deploy.DeployManifestsFromPath(owner, cli, ComponentName, + Path, + namespace, + scheme, enabled) + if err != nil { + return err + } + } else { + // Apply authentication overlay + err = deploy.DeployManifestsFromPath(owner, cli, ComponentName, + PathSupported, + namespace, + scheme, enabled) + if err != nil { + return err + } } // ISV handling