* jwa(back): ability to setting annotations on NB resource
* jwa(back): update spanwer yaml, dump logo from yaml if file doesn't exist
* jwa(front): add annotations and VSCode/RStudio image types/config
* jwa(front): add server type toggle to UI
* jwa(front): set annotations in notebook request based on server-type
* jwa(front): add server type column to index page
* review: improve button toggle formatting
* jwa(back): set rstudio-tidyverse image in spawner_ui_config
* review: move rewrite and headers to backend
* review: add logo SVGs and set them in environment*.ts
* review: fix how allowing custom images works
* review: add server type logo to index
* Add base dockerfile for all jupyter based images
* cleanup jupyter notebook image
Co-authored-by: Mathew Wicks <thesuperzapper@users.noreply.github.com>
* Add base dockerfile for all Web-IDE images (jupyter, r-studio, vs-code)
remove sudo from image
Add S6-overlay
Change naming and add CD
Add ci build test
change naming in prow config to avoid character limit
Add OWNERS file
rename folder
rename folder (again)
remove labels
Rename to the final folder
* cleanup base notebook image Dockerfile
Co-authored-by: Mathew Wicks <thesuperzapper@users.noreply.github.com>
* web-apps(back): Introduce an APP_NO_AUTHNZ env var
The admin can use the APP_NO_AUTHNZ={True,False} to configure if the
application should perform authnz checks or not.
In case of False, then the app will not be expecting a logged in user, in the
`kubeflow-userid` header, and will not perform authorization checks using
SubjectAccessReviews.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Expose if Dashboard is connected
The NamespaceService will also provide an observable that informs
different parts of the app if the CentralDashboard is present.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* review: Use enumeration for Dashboard state
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* review: Move common vars to a settings module
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
As part of the work of wg-manifests for 1.3
(https://github.com/kubeflow/manifests/issues/1735), we are moving manifests
development in upstream repos. This gives the application developers full
ownership of their manifests, tracked in a single place.
This commit copies the manifests for application `Jupyter Web App`
from path `apps/jupyter/jupyter-web-app/upstream` of kubeflow/manifests to path
`components/crud-web-apps/jupyter/manifests` of the upstream repo (https://github.com/kubeflow/kubeflow).
Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
As part of the work of wg-manifests for 1.3
(https://github.com/kubeflow/manifests/issues/1735), we are moving manifests
development in upstream repos. This gives the application developers full
ownership of their manifests, tracked in a single place.
This commit copies the manifests for application `Notebook Controller`
from path `apps/jupyter/notebook-controller/upstream` of kubeflow/manifests to path
`components/notebook-controller/config` of the upstream repo (https://github.com/kubeflow/kubeflow).
Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
In order for the frontend tests to run in a CI system, which will be
using a container to run them, we will need to make some adjustments.
Namely, we will need to:
* Run a headless version of Chrome
* Run the `ng test` in non-watch mode, in order for the testing process
to terminate and not watch for changes to the codebase.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(back): Export package code for wheel
When building the wheel we need to define Python packages
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* Don't include init in root dir
We don't want to have an init file in the setup directory
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(back): Fetch the correct default SC
The backend would only check for the annotation of the default
StorageClass but not if it's value would be true/false.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(back): Fetch Pod logs
Extend the common backend libraries to fetch pod logs
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Add global variables.scss
Since we will need the page padding in multiple places we'll create a
scss file to store these values.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Export the Dialog module
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Rework the Toolbar component
* Add option to make button to be stroked
* Don't emit an event when a button is clicked. Expect a function which
will be executed from this component.
* Put all the buttons on the right to mimic Pipelines UI
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Make the app's background white
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Export commonly used modules
The mat-divider and mat-icon modules are oftenly used so we could
include them in the exports of the KubeflowModule.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Key-val should be on top in list
In the list that shows key-valu pairs in lines we want the key to remain
on top if the value has a big height. Previously the key-title would be
in the middle height of the value, which looked weird.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Add a Comment component for forms
This is used to explain different sections in the form.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Bar at the bottom for every form
We want our forms to have a bar on the bottom with CREATE CANCEL buttons
and the ability to view the yaml contents of a CR.
This component is only used for visualization. The logic component
should be handling this component via this component's inputs/outputs
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): General purpose css
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Make k8s fields optional
We might need to instantiate a k8s objecti with only some of the
subfields, like only the spec and not metadata.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* remove redundant link class
Co-authored-by: Tasos Alexiou <tasos@arrikto.com>
* support fit-content for firefox as well
Co-authored-by: Tasos Alexiou <tasos@arrikto.com>
* firefox fit-content support
Co-authored-by: Tasos Alexiou <tasos@arrikto.com>
* use button instead of span
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Co-authored-by: Tasos Alexiou <tasos@arrikto.com>
* Use node:12 as specified in the docs
* Move to buster-slim
Move images that build the kubeflow library and frontend to buster-slim to reduce image size. Tested with the Jupyter Web App, assumed to also work for Tensorboards Web App once https://github.com/kubeflow/kubeflow/issues/5529 is solved.
Upgrade go version of the notebook-controller to 1.15, across the
Dockerfile, Makefile and README. We used the same Golang version as our Kubernetes
dependency, after @Jeffwan's suggestion.
* web-apps(back): Helper config functions
Introduce helper function for creating the config object for an app.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* twa: Update the build process
Update both the frontend and the backend of the Tensorboards web app to
follow the build/run process of the other web apps as well.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* twa: Update the README
Restructure the README to look like the JWA one. Also update the
instructions with the latest process for running the web app.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* Correct ContainerStatus of Notebook CR
The Notebook Controller doesn't set the State of the CR correctly. In some cases
the first container is the istio-sidecar which results in an incorrect state being
shown to the Notebook CR. This is fix now by showing the Notebook container
ContainerState to the Notebook CR ContainerState
* Changed log statement and added a comment
Implemented remarks of @yanniszark and @kimwnasptd
* Small reorganization of some if statements
* web-apps(back): Add CSRF protection to the backend
The server of each crud-web-app will be setting an XSRF-TOKEN cookie to
the frontend. On each unsafe method (POST, PATCH etc) the backend will
check to make sure that the request:
* Contains an XSRF-TOKEN cookie
* Contains an X-XSRF-TOKEN header
* The value of the above values are the same
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(back): Document the CSRF_SAMESITE env var
Add a new table in the README of the common code to include the ENV vars
that a user can set in any web app. In the future we should also extend
the README of every app with the supported ENV vars.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Update the README
Update the readme with detailed commands on how to consume the library
as well as developer guidelines.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Fix typo in README
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Udate the common library
Add new components to the library. These components will enhance
* The current common table for visualizing objects
* The components we can use for a details-page for each object
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* web-apps(front): Add unit tests to common lib
Fix and introduce new unit tests for most of the components in the
library. We expect the developers to always run `ng test` before any PR
to ensure that the existing functionality is not broken.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* jwa(front): Add required packages for common lib
The common library will expect extra npm modules to be installed in each
app that consumes it.
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
We use the local `../common` module to build `notebook-controller`. We
also need to specify a valid pseudo-version for `common` to support
importing the Notebook API in other modules. This is because according
to the `go.mod` docs [1]:
> exclude and replace directives only operate on the current (“main”)
> module. exclude and replace directives in modules other than the main
> module are ignored when building the main module.
If we don't replace the default "zero version" for `common` that is
generated in our require directive, then then builds fail for modules
that require the Notebook API. They will encounter an an "invalid
version" error for `common` at commit hash "000000000000".
[1]: https://github.com/golang/go/wiki/Modules#gomod
* Implemented functional tests using ginkgo
The notebook controller can be tested using sigs.k8s.io/controller-runtime/pkg/envtest which comes as part of kubebuilder. With this we should be able to measurable test coverage.
* Fixed the incorrect test condition and included fix to download the envtest binaries.
Fixed the incorrect test condition and included fix to download the envtest binaries.
* Some tweaks based on review.
* Removed the check-license as it was blocking the test.
Included some of the tweaked yaml's files that were being generated.
The default leader election ID is controller-leader-election-helper which could conflict when multiple controllers run within the same namespace. This is a required field in later versions of controller-runtime.