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
Re-Introducing the Volumes Viewer #6876
Re-Introducing the Volumes Viewer #6876
Conversation
db4f0cc
to
b976d4e
Compare
…olumes viewer changes
- Now includes a status.URL field - Reverted changes to status.py to minimize diff
@TobiasGoerke thanks for keep pushing this! I'd propose we break down the next steps like this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a first pass. The code looks very good and it's great to see test coverage! I've left some small comments.
Would there be an "easy" way to generate some certs (Makefile rule?) so that we can also make run
the controller locally?
Lastly, once we finish with the tasks on manifests/gh-actions, to ensure this component is integrated with the repo, I think the next items to tackle will be:
- Integrating with the volumes web app. I can help there since we had some code for this in the old Arrikto Rok flavor of the app (in this repo)
- Work on the culling mechanism, which would be very similar with feat: istio metrics based notebook culling (for VSCode and RStudio) #6927
Thank you for the review - it's much appreciated! I've tried to integrate all of your remarks.
I've prepared a new branch with the three untested GH actions that we can create a PR off, once this PR is merged. See here.
Regarding the volumes web app: About culling: would it make sense to move this functionality to a common place so that both the notebook and pvcviewer controller can use it? |
Hmm are you sure about this? Could you point me to this part on the Makefile? For me when I
Yes! And we have a place for common controller code in https://github.com/kubeflow/kubeflow/tree/master/components/common
ACK! |
Sorry, forgot to push that commit. It should look like this now:
This would involve refactoring the notebooks controller and move some code to the common dir. I'd suggest to implement culling in a separate PR to make the changes more maneagable. WDYT? Also: do we wait for #6927 to get merged?
|
Now everything seems to work as expected, thanks!
For sure, let's not increase the scope of this PR any longer. We'll most probably need to create a design doc for #6927, since it has quite a lot of technical context and decisions in it. |
So at this point everything looks good so we can merge. We also do have a plan forward for the rest of the items (images, gh actions etc) so looking forward to next steps! Thank you very much for your time and persistence on this @TobiasGoerke /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kimwnasptd The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
cd $$TMP_DIR ;\ | ||
go mod init tmp ;\ | ||
echo "Downloading $(2)" ;\ | ||
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioning it now, to just keep it in our cache. When I initially tried to get the controller-gen bin with Golang 1.20 it failed to create the binary.
After looking around I found out that go get
gets deprecated in favor of go install
. Install worked in my case, but I didn't look too much into it grafana/k6-operator#104 (comment)
Let's keep it in our cache for the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I've had the same issue but didn't want to change the Makefile as the other components, such as the notebook controller, have the same issue..
Great to see this merged, thank you for your support! |
* Integrating volumes viewer into volumes ui backend * Integrating volumes viewer into volumes ui frontend * Modified the volume viewer's manifests to be in accordance with the volumes viewer changes * Bootstrapping/creating VolumesViewer Controller * Changed/reverted image definitions * Fixed code style issues * Run prettier on index-default.component.ts * Reverted accidental method call change back to getSelectedNamespace2 * Reverted package-lock.json * Now using the VOLUME_VIEWER_IMAGE env variable in the viewer's podTemplate * Set readinessProbe.initialDelaySeconds=2 for new viewers * Removed downward api references in favor of Python variable expansion * Revised crd schema - Now includes a status.URL field - Reverted changes to status.py to minimize diff * Providing NAME as a possible var for var expansion * Return and use the VolumesViewer.Status.URL * Reconcile status while deletion ongoing * Restored empty line to get file off diff * Reducing diff on get.py * Run prettier * Updated OWNERS/README * Changes to schema comments / renaming * Improved test performance and reliability By cleaning up resources created by tests in afterEach() Also: Pod watch now only triggers for non-terminating RUNNING/PENDING pods, reducing the number of reconciliation calls * Renaming VolumesViewer -> PVCViewer as discussed in community meeting * Moving changes to volumes frontend to another PR as discussed in community meeting * Renaming file names * Renaming PVCViewerSpec.PodTemplate -> PodSpec * Renaming PVCViewerSpec.Service -> Networking * Adding the Spec.PVC field and validating/defaulting webhooks * Adding the option to load a default podSpec from file * Introduced PVCViewer.Status.Conditions * Validator requires the PVC to be used in podSpec * Added tests for the validating webhook * Removed debug log message * Updating manifests to work with new webhooks * Updating documentation * Refactored manager according to specs * Modifying pvcviewer OWNERS * Makefile & renaming comp -> pvcviewer-controller * Changing nameprefix to pvcviewer- * Setting imagePullPolicy: IfNotPresent * Adding a base directory * Generating TLS certs for make run * Adding a log time encoder
Volumes Viewer
About two years ago, @davidspek proposed a pvcviewer. We've been using and enjoying this feature quite a lot since then and I'm convinced this feature needs to find its way to Kubeflow's core.
Unfortunately, the PR staled and never got merged even though it sparked serious interest among the community.
This is my attempt to move forward with this feature, making it available for all users.
Pre-Existing Work
@davidspek provided a functional prototype of the volumes viewer. His work comprises a pvcviewer resource definition, a resource controller and changes to the volumes UI.
His changes already got partially merged into the volumes UI but are only available within the rok distribution.
The initial controller was based off the tensorboard controller and was WIP in many regards.
My Work
I've re-implemented the volumes viewer, and made it compatible with the current volumes UI's master.
Also, the controller has been re-written from scratch and is well-tested. It now comprises new features, such as restarting pods on RWO-Nodename changes.
API
I've included an example of a viewer object. The API is similar to what @kimwnasptd descibed in another thread.
Creating a VolumesViewer currently looks like this (comments included explaining its functionality).
How to install
Using the current kubeflow master:
kustomize build components/crud-web-apps/volumes/manifests/overlays/istio | kubectl apply -f -
kustomize build components/volumes-viewer/config/overlays/kubeflow | kubectl apply -f -
kubectl -n kubeflow set image deploy/volumes-web-app-deployment volumes-web-app=tobiasgoerke/kubeflow-volumes-web-app:test-v3
kubectl -n kubeflow set image deploy/volumes-viewer-controller-manager manager=tobiasgoerke/kubeflow-volumes-viewer:test-v3
Outlook and Future Work
Thus, I've decided to create a new controller (like @davidspek did in his PR) and call the integration into the pipelines WG optional and out-of-scope. In case this PR gets merged, I'll rename the VolumesViewer controller and push for it to be accepted as a generic viewer. This would enable the volumes viewer, notebooks, tensorboard etc. to use a common implementation and controller. For this PR, the CRD and controller could be dropped then, leaving us with only changes to the volumes UI. I've designed this PR with this possible step in mind so that a generic viewer would only require one file to change.