Skip to content

Commit

Permalink
fix local dev env with external cluster and non-admin user
Browse files Browse the repository at this point in the history
  • Loading branch information
christianvogt committed May 8, 2024
1 parent 070fe7e commit 958d4f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions frontend/config/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ module.exports = merge(
.trim();
} catch (e) {
console.info('Failed to GET dashboard route, constructing host manually.');
dashboardHost = new URL(execSync(`oc whoami --show-server`).toString()).host
.replace(/:\d+$/, '')
.replace(/^api./, `${app}-${odhProject}.apps.`);
dashboardHost = new URL(execSync(`oc whoami --show-console`).toString()).host
.replace(/^[^.]+\./, `${app}-${odhProject}.`);
}
console.info('Dashboard host:', dashboardHost);

Expand Down
2 changes: 1 addition & 1 deletion manifests/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
- --cookie-secret-file=/etc/oauth/config/cookie_secret
- --cookie-expire=23h0m0s
- --pass-access-token
- '--openshift-delegate-urls={"/": {"resource": "services", "verb": "get", "name": "odh-dashboard", "namespace": "$(NAMESPACE)"}}'
- '--openshift-delegate-urls={"/": {"resource": "projects", "verb": "list"}}'
- --skip-auth-regex=^/metrics
image: oauth-proxy
ports:
Expand Down

0 comments on commit 958d4f2

Please sign in to comment.