Skip to content

feat: Add filterRules schema to WorkspaceKind CRD#1263

Open
gangli113 wants to merge 1 commit into
kubeflow:notebooks-v2from
gangli113:feat-wsk-filterrules
Open

feat: Add filterRules schema to WorkspaceKind CRD#1263
gangli113 wants to merge 1 commit into
kubeflow:notebooks-v2from
gangli113:feat-wsk-filterrules

Conversation

@gangli113

Copy link
Copy Markdown

Description

Adds a new optional spec.filterRules[] field to the WorkspaceKind CRD to store admin-defined
rules that downstream consumers (the backend API server) use to dynamically filter which
WorkspaceKinds, imageConfig values, and podConfig values are visible or allowed in a given
context. The controller does not evaluate these rules — it only persists and validates them.

Schema follows the approved proposal in #683.

Changes

  • add FilterRule types with kubebuilder validation markers
  • regenerate CRD manifests and DeepCopy methods
  • webhook validation: at-least-one-effect, scope-appropriate match types, well-formed selectors
  • unit tests covering all scope types, match combinations, and invalid configurations
  • add filterRules examples to the 3 sample WorkspaceKinds

Closes #690

@github-project-automation github-project-automation Bot moved this to Needs Triage in Kubeflow Notebooks Jul 20, 2026
@google-oss-prow google-oss-prow Bot added the area/controller area - related to controller components label Jul 20, 2026
@google-oss-prow

Copy link
Copy Markdown

[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 andyatmiami for approval. For more information see the Kubernetes Code Review Process.

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

Details 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/v2 area - version - kubeflow notebooks v2 size/XXL labels Jul 20, 2026
…tibility selectors

Add a new optional spec.filterRules[] field to the WorkspaceKind CRD to store
admin-defined rules that downstream consumers (the backend API server) use to
dynamically filter which WorkspaceKinds, imageConfig values, and podConfig
values are visible or allowed in a given context. The controller only persists
and validates these rules; it does not evaluate them.

- add FilterRule types with kubebuilder validation markers
- regenerate CRD manifests and DeepCopy methods
- add webhook validation for label selectors, at-least-one-effect, and
  scope-appropriate match types
- add unit tests covering all scope types, match combinations, and invalid
  configurations
- add filterRules examples to the 3 sample WorkspaceKinds

Closes: kubeflow#690

Signed-off-by: Gang Li <ganglica@google.com>
@gangli113
gangli113 force-pushed the feat-wsk-filterrules branch from c7cf9d0 to 19f2a91 Compare July 20, 2026 18:25
@gangli113

Copy link
Copy Markdown
Author

/cc @andyatmiami @thesuperzapper

@gangli113

Copy link
Copy Markdown
Author

/ok-to-test

@google-oss-prow

Copy link
Copy Markdown

@gangli113: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/ok-to-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/controller area - related to controller components area/v2 area - version - kubeflow notebooks v2 size/XXL

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

1 participant