From 6775a226854565c30ca35c11b45897f76cf718ad Mon Sep 17 00:00:00 2001 From: Wen Zhou Date: Thu, 20 Jun 2024 09:22:22 +0200 Subject: [PATCH] update: for ODH change consolelink location Signed-off-by: Wen Zhou --- components/dashboard/dashboard.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/dashboard/dashboard.go b/components/dashboard/dashboard.go index df1adff2d8d..666c460e0df 100644 --- a/components/dashboard/dashboard.go +++ b/components/dashboard/dashboard.go @@ -30,8 +30,8 @@ var ( ComponentNameUpstream = "dashboard" PathUpstream = deploy.DefaultManifestPath + "/" + ComponentNameUpstream + "/odh" - PathCommon = deploy.DefaultManifestPath + "/" + ComponentNameUpstream + "/common" - ConsoleLinkPathUpstream = PathCommon + "/consolelink" + PathCommon = deploy.DefaultManifestPath + "/" + ComponentNameUpstream + "/common" + ConsoleLinkPathUpstream = deploy.DefaultManifestPath + "/" + ComponentNameUpstream + "/overrides/consolelink" ComponentNameDownstream = "rhods-dashboard" PathDownstream = deploy.DefaultManifestPath + "/" + ComponentNameUpstream + "/rhoai" @@ -249,7 +249,7 @@ func (d *Dashboard) configConsoleLink(ctx context.Context, cli client.Client, pl routeName = "odh-dashboard" } - pathConsoleLink := filepath.Join(manifestsPath, "consolelink.yaml") + fileConsoleLink := filepath.Join(manifestsPath, "consolelink.yaml") consoleRoute := &routev1.Route{} if err := cli.Get(ctx, client.ObjectKey{Name: ConsoleLinkName, Namespace: ConsoleLinkNS}, consoleRoute); err != nil { @@ -258,7 +258,7 @@ func (d *Dashboard) configConsoleLink(ctx context.Context, cli client.Client, pl domainIndex := strings.Index(consoleRoute.Spec.Host, ".") consoleLinkDomain := consoleRoute.Spec.Host[domainIndex+1:] - if err := common.ReplaceStringsInFile(pathConsoleLink, map[string]string{ + if err := common.ReplaceStringsInFile(fileConsoleLink, map[string]string{ "": "https://" + routeName + "-" + namespace + "." + consoleLinkDomain, "": sectionTitle, }); err != nil {