forked from kubeflow/model-registry
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bff): update bff service filtering to match model registry servi…
…ces by component: model-registry label (kubeflow#633) Signed-off-by: Eder Ignatowicz <[email protected]>
- Loading branch information
Showing
3 changed files
with
109 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,3 +216,38 @@ curl -i -H "kubeflow-userid: [email protected]" "http://localhost:4000/api/v1/mod | |
# Get with a page size of 5, order by last update time in descending order. | ||
curl -i -H "kubeflow-userid: [email protected]" "http://localhost:4000/api/v1/model_registry/model-registry/registered_models?pageSize=5&orderBy=LAST_UPDATE_TIME&sortOrder=DESC" | ||
``` | ||
|
||
|
||
### FAQ | ||
|
||
#### 1. How do we filter model registry services from other Kubernetes services? | ||
|
||
We filter Model Registry services by using the Kubernetes label `component: model-registry. This label helps distinguish Model Registry services from other services in the cluster. | ||
|
||
For example, in our service manifest, the `component label is defined as follows: | ||
```yaml | ||
# ... | ||
labels: | ||
# ... | ||
component: model-registry | ||
#... | ||
``` | ||
You can view the complete Model Registry service manifest [here](https://github.com/kubeflow/model-registry/blob/main/manifests/kustomize/base/model-registry-service.yaml#L10). | ||
|
||
#### 2. What is the structure of the mock Kubernetes environment? | ||
|
||
The mock Kubernetes environment is activated when the environment variable `MOCK_K8S_CLIENT` is set to `true`. It is based on `env-test` and is designed to simulate a realistic Kubernetes setup for testing. The mock has the following characteristics: | ||
|
||
- **Namespaces**: | ||
- `kubeflow` | ||
- `dora-namespace` | ||
|
||
- **Users**: | ||
- `[email protected]` (has `cluster-admin` privileges) | ||
- `[email protected]` (restricted to the `dora-namespace`) | ||
|
||
- **Services (Model Registries)**: | ||
- `model-registry`: resides in the `kubeflow` namespace with the label `component: model-registry`. | ||
- `model-registry-dora`: resides in the `dora-namespace` namespace with the label `component: model-registry`. | ||
- `model-registry-bella`: resides in the `kubeflow` namespace with the label `component: model-registry`. | ||
- `non-model-registry`: resides in the `kubeflow` namespace *without* the label `component: model-registry`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters