Notebooks 2.0 // Controller // Implement VirtualService reconciliation #37
Labels
area/controller
area - related to controller components
project/notebooks-v2
project - kubeflow notebooks v2
Milestone
related #85
Now that #34 is merged, there are only a small number of remaining tasks for the "Kubeflow Workspaces Controller to be finished.
One task to finish the workspace controller loop, so it also reconciles the Istio VirtualServices required to make the Workspace Pods accessible on the Istio mesh
Implementation
Here is the TODO in the code:
notebooks/workspaces/controller/internal/controller/workspace_controller.go
Lines 345 to 348 in bc4e445
VirtualService Definition
The structure of the HTTP paths exposed by each Workspace should be:
/workspace/<NAMESPACE_NAME>/<WORKSPACE_NAME>/<PORT_ID>/
Where
PORT_ID
is the id of a port defined in the currently selectedspec.podTemplate.options.imageConfig
, which is defined in the WorkspaceKind underspec.podTemplate.options.imageConfig.values[].spec.ports
Note, this path structure is already reflected in the
httpPathPrefix
function for thespec.podTemplate.extraEnv[0].value
go templates (which should probably be factored into a helper):notebooks/workspaces/controller/internal/controller/workspace_controller.go
Lines 594 to 604 in bc4e445
Example VirtualService
Here is a templated example of the VirtualService we should reconcile:
CRDs
Besides making the Pod available, the VirtualService will also implement the
spec.podTemplate.ports[].httpProxy
part of the WorkspaceKind spec:Changes from current CRDs
After designing and discussing this implementation, we figured that we need to make some small additions to the existing Notebooks 2.0 CRDs:
spec.podTemplate.httpProxy
map, and replace it withspec.podTemplate.ports
list.spec.podTemplate.ports
will be a map with the following keys:portId
: the map-index of this array and determines which port the configs are applied tohttpProxy
: the same as the old ones, but now scoped to a specific port.The text was updated successfully, but these errors were encountered: