Skip to content

Conversation

@andyatmiami
Copy link
Contributor

@andyatmiami andyatmiami commented Nov 10, 2025

⚠️ WORK IN PROGRESS

This commit implements serving of workspacekind assets (logos and icons) from ConfigMaps through the backend API, with SHA256 hash support for cache-busting.

Key changes:

  • Add endpoint to serve workspacekind assets from ConfigMaps at /api/v1/workspacekinds/{name}/assets/{icon|logo}.svg
  • Compute and include SHA256 hashes for ConfigMap-based assets as query parameters for cache-busting
  • Add ConfigMap client support to repositories for accessing asset content
    • partial cache for performance/efficiency that keys off label:
      • notebooks.kubeflow.org/image-source: true
  • Add GetConfigMapContent method to WorkspaceKindRepository and WorkspaceRepository for retrieving asset content from ConfigMaps
  • Update model functions to support SHA256 hashes in asset URLs:
    • NewWorkspaceKindModelFromWorkspaceKindWithAssetHashes
    • NewWorkspaceModelFromWorkspaceWithAssetHashes
  • Added workspacekind_imagesource_configmap.yaml for reference example
  • Refactored backend mgr setup in main.go to leverage helper/k8s.go
    • easier to keep logic in sync in e2e tests - particularly with new partial cache

Remote URL specification of assets is still supported - but the browser queries
the source URL directly for content.

TODOS

  • appropriate cache-related response headers

SCREENSHOTS

image image image

@google-oss-prow
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 ask for approval from andyatmiami. 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

@google-oss-prow google-oss-prow bot added area/controller area - related to controller components area/v2 area - version - kubeflow notebooks v2 size/XL labels Nov 10, 2025
@andyatmiami andyatmiami force-pushed the feat/logos-icons branch 3 times, most recently from 37c0693 to 45316eb Compare November 10, 2025 21:06
@andyatmiami andyatmiami force-pushed the feat/logos-icons branch 2 times, most recently from 15f0998 to 9b203ac Compare November 12, 2025 20:28
This commit implements serving of workspacekind assets (logos and icons)
from ConfigMaps through the backend API, with SHA256 hash support for
cache-busting.

Key changes:
- Add endpoint to serve workspacekind assets from ConfigMaps at
  `/api/v1/workspacekinds/{name}/assets/{icon|logo}.svg`
- Compute and include SHA256 hashes for ConfigMap-based assets as query
  parameters for cache-busting
- Add ConfigMap client support to repositories for accessing asset content
    - partial cache for performance/efficiency that keys off label:
        - `notebooks.kubeflow.org/image-source: true`
- Add GetConfigMapContent method to WorkspaceKindRepository for
  retrieving asset content from ConfigMaps
- Update model functions to support SHA256 hashes in asset URLs:
  - NewWorkspaceKindModelFromWorkspaceKindWithAssetHashes
  - NewWorkspaceModelFromWorkspaceWithAssetHashes
- Added workspacekind_imagesource_configmap.yaml for reference example
- Refactored `backend` `mgr` setup in `main.go` to leverage `helper/k8s.go`
    - easier to keep logic in sync in e2e tests - particularly with new partial cache

Remote URL specification of assets is still supported - but the browser queries
the source URL directly for content.

Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/backend area - related to backend components area/controller area - related to controller components area/v2 area - version - kubeflow notebooks v2 do-not-merge/work-in-progress size/XXL

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

1 participant