Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update oauth-proxy openshift-delegate-urls #2789

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"}}'
christianvogt marked this conversation as resolved.
Show resolved Hide resolved
- --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
Loading