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

feat(ws): Notebooks 2.0 // FrontEnd // Add CPU and RAM columns #165

Closed
wants to merge 30 commits into from

Conversation

senanz
Copy link

@senanz senanz commented Dec 24, 2024

feat(ws): Notebooks 2.0 // FrontEnd // Add CPU and RAM columns

Add new columns CPU and RAM that used by the workspace, fixes #151

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kimwnasptd for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

jiridanek and others added 26 commits December 24, 2024 11:44
* feat: Generate kubebuilder project

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* fixup add unittests gha

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* fixup disable permissions for all of the available scopes

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* fixup add triggers for release branches

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* fixup remove duplicated gitignores

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* fixup remove workflow dispatch

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* Apply suggestions from code review

Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* fixup rename the project to workspace-controller

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* fixup update kubebuilder to 3.15

https://github.com/kubernetes-sigs/kubebuilder/releases/tag/v3.15.0

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

---------

Signed-off-by: Jiri Daněk <jdanek@redhat.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* feat(ws): initial commit for backend

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

* Fixing docker build

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

* Fixing git ignore

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

---------

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* feat (ws): Backend Kubernetes client

- Creation of Kubernetes Client;
- Wrapping the client on application;

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

* Update workspaces/backend/cmd/main.go

Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* Adding .docker ignore

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

---------

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* feat(ws): add `Workspace` and `WorkspaceKind` CRD scaffolds

Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* fixup, regenerate WOrkspaceKind to be cluster scope

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* fixes to crd spec

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* updates to CRD spec

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Jiri Daněk <jdanek@redhat.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* feat: client ui frontend scaffolding

In this PR:
- UI frontend scaffolding
- Github Action for frontend and backend

Most of the content of this PR is extract from https://github.com/patternfly/patternfly-react-seed/tree/v6. Thank you so much patternfly team for the seed!

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

* Changes requested by code review

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

* Fixing icons

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

---------

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* feat(ws): add `containerSecurityContext` to WorkspaceKind + cleanup descriptions

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* feat(ws): make all optional fields go pointers

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* feat(ws): remove `readOnlyRootFilesystem=true` from tests

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
…#21)

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* feat(ws): implement a reconciliation loop for the workspace

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* remove comments

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* add correct rbac permission for controller

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* implemented collision handling using ownerReferences

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* update the status field during workspace reconciliation

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* add watcher to workspace kind

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* handle the case that multiple ports are specified for an image

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* generate correctly the StatefulSet spec

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* set status.state of the Workspace

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* add rbac permission for configmap

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* update dockerfile

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* mathew updates

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* mathew updates 2

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* mathew updates 3

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* fix todos

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* mathew updates 4

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* handle extraEnv value replacement

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* mathew updates 5

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* mathew updates 6

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
…script-loader` (#24)

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* test(ws): add safety prompt for E2E test execution

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* mathew updates 1

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* test(ws): add e2e tests

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* mathew updates 1

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* mathew updates 2

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* run the kubebuilder e2e test

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* fixup cluster must be named kind

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* fixup, specify kind version

Signed-off-by: Jiri Daněk <jdanek@redhat.com>

* mathew commit 1

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* mathew commit 2

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Jiri Daněk <jdanek@redhat.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* feat(ws): populate the status.pauseTime on the workspace

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* test(ws): add unit test

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* mathew commit 1

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* add validating webhook

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* add tests for workspacekind and workspace webhooks

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* re-add cert-manager

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* refactor  ValidateCreate and ValidateUpdate functions in wokrspaceKind webhook

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* add e2e test for webhooks

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* mathew refactor 1

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* mathew refactor 2

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* mathew refactor 3

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* feat(ws): use controller-runtime with backend

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* revert healthcheck to normal results

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* feat(ws): Notebooks 2.0 // Backend // List Workspaces API - II

In this PR:
- FUP for Notebooks 2.0 // Backend // List Workspaces API (#60) review
- Create /api/v1/workspaces to return all workspaces
- Review API endpoints as requested

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

* Notebooks 2.0 // Backend // CRUD Workspaces API

In this PR:
- Created handlers and repositories for create, get and delete workspace
- Improved the type of our json response

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

* feat(ws): Notebooks 2.0 // Backend // List WorkspaceKinds

This PR builds on top of: #61 and #65

In this PR:
- Created handlers and repositories for get workspacekinds

This PR closes #51

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

* mathew: fix linting

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
Signed-off-by: Griffin-Sullivan <gsulliva@redhat.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
Signed-off-by: Griffin-Sullivan <gsulliva@redhat.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* feat(ws): Notebooks 2.0 // Backend // List namespaces #53

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

* adding test coverage

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

* ci: run controller and backend tests on pr

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* chore: update controller kubebuilder

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* chore: add new controller linting

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* chore: update backend (similar to controller kubebuilder update)

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

* chore: add new backend linting

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
#140)

* Workspaces initial frontend

Signed-off-by: paulovmr <832830+paulovmr@users.noreply.github.com>

* Fixing a CVE and cypress test

Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>

---------

Signed-off-by: paulovmr <832830+paulovmr@users.noreply.github.com>
Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
Co-authored-by: Eder Ignatowicz <ignatowicz@gmail.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
Signed-off-by: paulovmr <832830+paulovmr@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
Adembc and others added 4 commits December 24, 2024 11:44
* test(ws): enhance e2e test setup and cleanup

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* code review fixes

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* remove env variable from e2e test GHA

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* lint fixes

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* mathew updates 1

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>

---------

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
Signed-off-by: Griffin-Sullivan <gsulliva@redhat.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
* ci: add semantic PRs action

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* ci: add release.yaml

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* ci: update semantic pr action to latest version and use scopes instead of disalowScopes

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

* keep only validate PR title

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>

---------

Signed-off-by: Adem Baccara <71262172+Adembc@users.noreply.github.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
Signed-off-by: Senan Zedan (EXT-Nokia) <senan.zedan.ext@nokia.com>
@senanz senanz closed this Dec 24, 2024
@senanz senanz deleted the add_columns branch December 24, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

Notebooks 2.0 // Frontend // Workspaces table // Workspace CPU and RAM columns
7 participants