Andy Stoneberg
e1b1b05b6d
ci: add publish workflow for controller
...
This commit adds a GHA workflow to support publishing a container image for the `workspaces/controller` component as well as some updates to the `Makefile` to establish reasonable (but overridable) defaults.
Key behavior:
- Publishes controller images on any workspaces/ directory change
- Builds images with commit SHA tags by default
- "release" images with use the tag as defined by the `VERSION` file
- a `-dirty` suffix is added to the tag if the codebase is not `porcelain`
- no `latest` tag is ever produced on images
- Uses `ghcr.io/kubeflow/notebooks` registry with configurable naming
example image name from "random" commit:
- `ghcr.io/kubeflow/notebooks/workspaces-controller:sha-3fa851ab3173942dbaa1a609468e7f9eadf5f4e4`
example image name from release:
- `ghcr.io/kubeflow/notebooks/workspaces-controller:v2.0.0`
Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
2025-09-19 17:03:37 -04:00
Andy Stoneberg
aa26b048b9
chore: update controller manifests to follow conventions
...
This commit brings about various changes to improve naming consistency across the `workspaces/` components.
The original `controller/` manifests were generated by kubebuilder and were not aligned with the conventions we have established in the `backend` and `frontend` components. Changing the manifests also had a "trickle effect" of requiring minor modifications to the `Makefile` as well as some e2e tests and documentation.
Key manifest changes:
- dropped `namePrefix` transformation
- standardized on `kubeflow-workspaces` namespace
- leveraged name of `workspaces-controller` where sensible
- Standardized `app.kubernetes.io/*` labels across all resources
- leveraging `labels` transformation as much as possible
- selectively applied `includeSelectors: true` when appropriate
- Removed legacy control-plane=controller-manager labels
- replaced with appropriate `app.kubernetes.io/*` labels to keep behavioral parity
Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
2025-09-18 17:05:47 -04:00
Mathew Wicks
ca3289c8d1
chore: add OWNERS files with reviewers and labels ( #450 )
...
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2025-06-26 21:42:17 +00:00
Andy Stoneberg
dd4ef1f939
chore: reference ghcr.io images in workspacekind yaml ( #305 )
...
Given we have migrated all our images from docker.io to ghcr.io - our `notebooks-v2` branch should reference the "proper" container registry.
This commit updates the code to use:
- `ghcr.io/kubeflow/kubeflow/notebook-servers`
Affected areas:
- `jupyterlab_scipy_180` and `jupyterlab_scipy_190` `imageConfig` entries
- various test files
Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
2025-06-26 20:49:17 +00:00
Mathew Wicks
24a4472fcf
feat(ws): validate podMetadata for ws and wsk in webhook ( #436 )
...
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2025-06-26 18:46:17 +00:00
aTheo
91484fee07
feat(ws): retry failed reconciles much less aggressively ( #256 )
...
* feat:Notebooks 2.0 // retry reconciliation failures less aggressively
Signed-off-by: Adriana Theodorakopoulou <atheodorak@outlook.com>
* mathew: fixes 1
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
---------
Signed-off-by: Adriana Theodorakopoulou <atheodorak@outlook.com>
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
Co-authored-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2025-04-15 23:12:23 +00:00
Mathew Wicks
6f147902d7
feat(ws): add `podTemplatePod` to Workspace status, for backend logs ( #210 )
...
* feat(ws): add `podTemplatePod` to Workspace status, for backend logs
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
* remove accidental diff
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
---------
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2025-02-14 22:05:37 +00:00
Mathew Wicks
e1da4cad78
fix(ws): handle empty pod metadata in controller ( #193 )
...
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2025-02-04 17:23:36 +00:00
Adem Baccara
d1a8c3ccb7
test(ws): enhance e2e test setup and cleanup ( #39 )
...
* 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>
2024-12-05 21:14:00 +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
Adem Baccara
bc4e4454bc
feat(ws): add validation webhooks for Workspace and WorkspaceKind ( #34 )
...
* 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>
2024-08-29 00:14:03 +00:00
Adem Baccara
38b8955d68
feat(ws): set `status.pauseTime` on workspace ( #26 )
...
* 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>
2024-08-06 01:42:39 +00:00
Adem Baccara
12610f06e9
test(ws): add e2e tests ( #30 )
...
* 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>
2024-08-06 00:40:39 +00:00
Adem Baccara
50fda656e8
test(ws): add safety prompt for E2E test execution ( #28 )
...
* 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>
2024-08-05 16:42:39 +00:00
Adem Baccara
0cacff77ee
feat(ws): initial Workspace and WorkspaceKind controller loops ( #22 )
...
* 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>
2024-07-15 21:21:55 +00:00
Mathew Wicks
ca78327ea5
fix(ws): use correct `nodeSelector` type and add CRD validation tests ( #21 )
...
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2024-07-05 19:38:48 +00:00
Mathew Wicks
a8de501944
feat(ws): add `containerSecurityContext` to WorkspaceKind ( #20 )
...
* 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>
2024-06-30 17:01:43 +00:00
Mathew Wicks
565a740adf
feat(ws): update `Workspace` and `WorkspaceKind` definitions ( #16 )
...
Signed-off-by: Mathew Wicks <5735406+thesuperzapper@users.noreply.github.com>
2024-06-21 19:00:07 +00:00
Jiri Daněk
0ff4d0371a
feat(ws): add `Workspace` and `WorkspaceKind` CRD scaffolds ( #6 )
...
* 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>
2024-06-19 01:00:59 +00:00
Jiri Daněk
20a3de3bd7
feat(ws): initial commit for controller ( #5 )
...
* 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>
2024-05-23 18:36:26 +00:00