Commit Graph

19 Commits

Author SHA1 Message Date
Andy Stoneberg ea93acc140
fix(ws): add secrets field to backend API schema (#331)
related: #239

This commit brings partial support for secrets to the backend API.  It enables the `frontend` component to successfully create a Workspace through the "wizard flow".

**HOWEVER**, it is important to note this secrets attribute is not supported within the `controller` component yet - as #240 is not yet merged. To unblock the `frontend` - the logic contained in this commit simply adds the necessary scaffolding to accept the `secrets` attribute defined within `volumes`.  Once umarshalled, the backend essentially ignores this data.  Code to fully enable the end to end flow is included in this PR - but simply commented out with `TODO:` comments denoting what can be uncommented once #240 is merged into `notebooks-v2`.  A test is also presently disabled with `XIt` - and can also be enabled when required code present.

Changes were initially coded against the branch provided on #240 to verify full end-to-end behavior.  Once confirmed, commit was rebased onto `notebooks-v2`, relevant code commented out as described above, and behavior retested to ensure desired outcome.

In summary, with these changes:
- `backend` API accepts `volumes.secrets` in the _Create_ payload
- secrets data is **NOT USED** when programmatically constructing the Workspace CR
- Resultant workspace has no `secrets` data - irrespective of it if was provided in the payload or not.

Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
2025-05-15 17:03:23 +00:00
Mohamed 45d778a972
feat(ws): complete api swagger documentation across workspaces, namespaces, and workspacekinds (#235)
* Add Swagger Config

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* add swag command

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Updated swagger output

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Updated general annotations

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Updated swagger docs version

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* updated swagger config

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* fix confilicts

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Add GetNamespaces Swagger Docs

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Add Workspaces Swagger Docs

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Add Workspaces Swagger Docs

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Add Workspacekinds Swagger Docs

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* fix: prevent Swagger from reading TODO comment by adding a tab

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* fix: resolve double api/v1 prefix in route paths

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

---------

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>
2025-05-15 16:33:23 +00:00
yehudit1987 19eca50561
feat(ws): add `pendingRestart` field to workspace model (#230)
Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com>
Co-authored-by: Yehudit Kerido <yehudit.kerido@nokia.com>
2025-03-13 16:04:57 +00:00
yehudit1987 f216c3ee10
feat(ws): add http service paths to WS get on backend (#213)
* Add missing ports field to workspace model

Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com>

* Add missing ports field to workspace model

Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com>

* Add services field to workspace model

Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com>

* Add services field to workspace model

Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com>

* Add services field to workspace model

Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com>

* mathew updates: 1

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

---------

Signed-off-by: Yehudit Kerido <yehudit.kerido@nokia.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Yehudit Kerido <yehudit.kerido@nokia.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2025-03-07 02:19:04 +00:00
Mohamed a5bf4ee76c
feat(ws): add swagger api docs to backend (#206)
* Add Swagger Config

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Removed make watch

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* add swag command

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Updated swagger output

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Serve YAML API spec alongside Swagger UI

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Updated general annotations

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* Updated swagger docs version

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* updated swagger config

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* add parseDependency to swag init

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>

* update http-swagger and factor handler out

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

* add swagger api path to readme

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

* regen swagger for camelCase change

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

* fix docstrings

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

---------

Signed-off-by: mohamed-ben-khemis <mohamedbenkhemiswork576@gmail.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2025-03-03 02:28:36 +00:00
Eder Ignatowicz 365c44bef2
feat(ws): update JSON field names to camelCase in types and README. (#214)
Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
2025-02-24 06:40:46 +00:00
Mathew Wicks e5d4e41dfe
feat(ws): add WorkspaceCreate model to backend (#205)
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2025-02-14 22:25:37 +00:00
Mathew Wicks bc6f311ac6
feat(ws): add auth to backend (#202)
* feat(ws): add auth to backend

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

* add `DISABLE_AUTH` for interim testing (enabled by default)

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

---------

Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2025-02-11 20:21:28 +00:00
Mathew Wicks f9da864e1d
feat(ws): introduce limits on HTTP body/header size (#195)
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2025-02-05 20:54:38 +00:00
Mathew Wicks 710cbd4753
feat(ws): refactor backend models and repositories (#192)
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2025-02-04 17:20:37 +00:00
Mohamed Akrem Chabchoub d06762d4ad
fix(ws): update JSON payload for listing workspaces (#134)
* fix(ws): update JSON payload for listing workspaces

Signed-off-by: mohamedch7 <121046693+mohamedch7@users.noreply.github.com>

* fix(ws): fix workspaceKind type to POD_TEMPLATE

Signed-off-by: mohamedch7 <121046693+mohamedch7@users.noreply.github.com>

* fix(ws): ensure podMetadata labels/annotations are not null

Signed-off-by: mohamedch7 <121046693+mohamedch7@users.noreply.github.com>

* fix(ws): fetch and use WorkspaceKind for determining home mount paths

Signed-off-by: mohamedch7 <121046693+mohamedch7@users.noreply.github.com>

* fix(ws): fix Volumes.Home values and tests

Signed-off-by: mohamedch7 <121046693+mohamedch7@users.noreply.github.com>

* fix(ws): fix PodConfig desired value

Signed-off-by: mohamedch7 <121046693+mohamedch7@users.noreply.github.com>

* chore: remove lint warnings by cleaning up comments and formatting

Signed-off-by: mohamedch7 <121046693+mohamedch7@users.noreply.github.com>

* fix(ws): refactor workspace model creation to include WorkspaceKind

Signed-off-by: mohamedch7 <121046693+mohamedch7@users.noreply.github.com>

* fix(ws): Move NewWorkspaceModelFromWorkspace from models to repositories

Signed-off-by: mohamedch7 <121046693+mohamedch7@users.noreply.github.com>

---------

Signed-off-by: mohamedch7 <121046693+mohamedch7@users.noreply.github.com>
2025-01-24 21:43:21 +00:00
Mathew Wicks e920dd99de
chore: update go linting + update dependencies for controller (#137)
* 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>
2024-12-02 16:56:58 +00:00
Eder Ignatowicz 2b747ac78d
feat(ws): Notebooks 2.0 // Backend // List namespaces (#124)
* 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>
2024-11-28 00:06:54 +00:00
Eder Ignatowicz e46633be34
feat(ws): add CRUD operations to backend (#66)
* 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: https://github.com/kubeflow/notebooks/pull/61 and https://github.com/kubeflow/notebooks/pull/65

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

This PR closes https://github.com/kubeflow/notebooks/issues/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>
2024-10-10 19:37:10 +00:00
Eder Ignatowicz f852c1683e
Notebooks 2.0 // Backend // List Workspaces API (#60)
Signed-off-by: Eder Ignatowicz <ignatowicz@gmail.com>
2024-09-23 21:54:32 +00:00
Mathew Wicks b0af8ae418
feat(ws): use controller-runtime for backend (#43)
* 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>
2024-09-14 20:18:24 +00:00
Eder Ignatowicz b0367e8b3d
feat(ws): initial commit for frontend (#19)
* 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>
2024-06-28 00:48:41 +00:00
Eder Ignatowicz a42f0a3e13
feat(ws): add kubernetes client to backend (#15)
* 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>
2024-06-08 19:25:05 +00:00
Eder Ignatowicz 9a945fb4bb
feat(ws): initial commit for backend (#7)
* 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>
2024-05-31 00:45:52 +00:00