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 10, 2024
1 parent baa33fc commit 20238c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 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
8 changes: 1 addition & 7 deletions manifests/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ spec:
name: odh-ca-cert
subPath: odh-ca-bundle.crt
- name: oauth-proxy
env:
- name: NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
args:
- --https-address=:8443
- --provider=openshift
Expand All @@ -88,7 +82,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
3 changes: 0 additions & 3 deletions manifests/overlays/rhoai/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
- op: replace
path: /spec/template/spec/containers/0/image
value: $(odh-dashboard-image)
- op: replace
path: /spec/template/spec/containers/1/args/11
value: '--openshift-delegate-urls={"/": {"resource": "services", "verb": "get", "name": "rhods-dashboard", "namespace": "$(NAMESPACE)"}}'
- op: replace
path: /spec/template/spec/serviceAccount
value: rhods-dashboard
Expand Down

0 comments on commit 20238c8

Please sign in to comment.