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

Resolve: Facilitate local development #6

Merged
merged 3 commits into from
Aug 20, 2020

Conversation

brendangadd
Copy link
Contributor

  • Add Azure auth support to API server
  • Proxy front-end API calls to local API's default port
  • Stop front-end from unnecessarily polling namespaces
  • Use text field for active namespace when front-end not hooked up to
    the central dashboard
  • Stop namespace service from defaulting to "kubeflow" namespace

Closes #2

  * Add Azure auth support to API server
  * Proxy front-end API calls to local API's default port
  * Stop front-end from unnecessarily polling namespaces
  * Use text field for active namespace when front-end not hooked up to
    the central dashboard
  * Stop namespace service from defaulting to "kubeflow" namespace
@saffaalvi
Copy link
Contributor

saffaalvi commented Aug 19, 2020

From running go run . -spawner-config samples/spawner_ui_config.yaml from project root, these errors appear:

E0819 15:46:58.527947   89510 reflector.go:383] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to watch *v1.Namespace: unknown (get namespaces)
E0819 15:46:58.670002   89510 reflector.go:178] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1alpha1.PodDefault: poddefaults.kubeflow.org is forbidden: User "saffa.alvi@cloud.statcan.ca" cannot list resource "poddefaults" in API group "kubeflow.org" at the cluster scope
E0819 15:46:58.757596   89510 reflector.go:178] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1.StorageClass: storageclasses.storage.k8s.io is forbidden: User "saffa.alvi@cloud.statcan.ca" cannot list resource "storageclasses" in API group "storage.k8s.io" at the cluster scope
E0819 15:46:58.802642   89510 reflector.go:178] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1.PersistentVolumeClaim: persistentvolumeclaims is forbidden: User "saffa.alvi@cloud.statcan.ca" cannot list resource "persistentvolumeclaims" in API group "" at the cluster scope
E0819 15:46:58.832532   89510 reflector.go:383] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to watch *v1.Notebook: unknown (get notebooks.kubeflow.org)
E0819 15:46:58.874803   89510 reflector.go:178] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1.Event: events is forbidden: User "saffa.alvi@cloud.statcan.ca" cannot list resource "events" in API group "" at the cluster scope
E0819 15:46:59.789585   89510 reflector.go:383] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to watch *v1.Notebook: unknown (get notebooks.kubeflow.org)
E0819 15:46:59.819772   89510 reflector.go:178] pkg/mod/k8s.io/client-go@v0.18.6/tools/cache/reflector.go:125: Failed to list *v1.Event: events is forbidden: User "saffa.alvi@cloud.statcan.ca" cannot list resource "events" in API group "" at the cluster scope

From front-end folder, running npm install and KF_USER_ID=<your_cloud_account> npm start with my cloud account, these errors appear:

subjectaccessreviews.authorization.k8s.io is forbidden: User "saffa.alvi@cloud.statcan.ca" cannot create resource "subjectaccessreviews" in API group "authorization.k8s.io" at the cluster scope

Screen Shot 2020-08-19 at 2 24 12 PM

Most likely due to not having the required level of k8s permission, so it isn't letting the API server hydrate its cache of the referenced resources

@saffaalvi
Copy link
Contributor

saffaalvi commented Aug 20, 2020

Steps taken to test this:

  1. kubectl setup
  2. install Go
  3. From project root, run . -spawner-config samples/spawner_ui_config.yaml
  4. From front-end folder, npm install and KF_USER_ID=<your_cloud_account> npm start

After step 4, open browser to http://localhost:4200/jupyter/, update namespace, everything works fine and no errors.

Copy link
Contributor

@wg102 wg102 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only comment would be to add some documentation about how to set it up, the 4 steps we need, and possibly also the necessary permissions for other future users.

@brendangadd
Copy link
Contributor Author

My only comment would be to add some documentation about how to set it up, the 4 steps we need, and possibly also the necessary permissions for other future users.

@wg102 Good point. I'd usually block this PR to address your comment, but these changes are currently aimed at you and @saffaalvi and you both know how to run it. So I created #10 to do this in a separate PR.

@saffaalvi saffaalvi merged commit 7ad65c2 into master Aug 20, 2020
@saffaalvi saffaalvi deleted the 2-facilitate-local-development branch August 20, 2020 21:30
saffaalvi added a commit that referenced this pull request Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Facilitate local development
4 participants