Documentation ¶
Overview ¶
Package solver contains the implementation of the "devworkspace routing solver" which provides che-specific logic to the otherwise generic dev workspace routing controller. The devworkspace routing controller needs to be provided with a "solver getter" in its configuration prior to starting the reconciliation loop. See `CheRouterGetter`.
Copyright (c) 2019-2021 Red Hat, Inc. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
Red Hat, Inc. - initial API and implementation
Index ¶
- type CheRouterGetter
- func (g *CheRouterGetter) GetSolver(client client.Client, routingClass controllerv1alpha1.DevWorkspaceRoutingClass) (solver solvers.RoutingSolver, err error)
- func (g *CheRouterGetter) HasSolver(routingClass controllerv1alpha1.DevWorkspaceRoutingClass) bool
- func (g *CheRouterGetter) SetupControllerManager(mgr *builder.Builder) error
- type CheRoutingSolver
- func (c *CheRoutingSolver) Finalize(routing *controllerv1alpha1.DevWorkspaceRouting) error
- func (c *CheRoutingSolver) FinalizerRequired(routing *controllerv1alpha1.DevWorkspaceRouting) bool
- func (c *CheRoutingSolver) GetExposedEndpoints(endpoints map[string]controllerv1alpha1.EndpointList, ...) (exposedEndpoints map[string]controllerv1alpha1.ExposedEndpointList, ready bool, ...)
- func (c *CheRoutingSolver) GetSpecObjects(routing *controllerv1alpha1.DevWorkspaceRouting, ...) (solvers.RoutingObjects, error)
- type EndpointInfo
- type IngressExposer
- type RouteExposer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheRouterGetter ¶
type CheRouterGetter struct {
// contains filtered or unexported fields
}
CheRouterGetter negotiates the solver with the calling code
func Getter ¶
func Getter(scheme *runtime.Scheme) *CheRouterGetter
Getter creates a new CheRouterGetter
func (*CheRouterGetter) GetSolver ¶
func (g *CheRouterGetter) GetSolver(client client.Client, routingClass controllerv1alpha1.DevWorkspaceRoutingClass) (solver solvers.RoutingSolver, err error)
func (*CheRouterGetter) HasSolver ¶
func (g *CheRouterGetter) HasSolver(routingClass controllerv1alpha1.DevWorkspaceRoutingClass) bool
func (*CheRouterGetter) SetupControllerManager ¶
func (g *CheRouterGetter) SetupControllerManager(mgr *builder.Builder) error
type CheRoutingSolver ¶
type CheRoutingSolver struct {
// contains filtered or unexported fields
}
CheRoutingSolver is a struct representing the routing solver for Che specific routing of devworkspaces
func (*CheRoutingSolver) Finalize ¶
func (c *CheRoutingSolver) Finalize(routing *controllerv1alpha1.DevWorkspaceRouting) error
func (*CheRoutingSolver) FinalizerRequired ¶
func (c *CheRoutingSolver) FinalizerRequired(routing *controllerv1alpha1.DevWorkspaceRouting) bool
func (*CheRoutingSolver) GetExposedEndpoints ¶
func (c *CheRoutingSolver) GetExposedEndpoints(endpoints map[string]controllerv1alpha1.EndpointList, routingObj solvers.RoutingObjects) (exposedEndpoints map[string]controllerv1alpha1.ExposedEndpointList, ready bool, err error)
GetExposedEndpoints retreives the URL for each endpoint in a devfile spec from a set of RoutingObjects. Returns is a map from component ids (as defined in the devfile) to the list of endpoints for that component Return value "ready" specifies if all endpoints are resolved on the cluster; if false it is necessary to retry, as URLs will be undefined.
func (*CheRoutingSolver) GetSpecObjects ¶
func (c *CheRoutingSolver) GetSpecObjects(routing *controllerv1alpha1.DevWorkspaceRouting, workspaceMeta solvers.DevWorkspaceMetadata) (solvers.RoutingObjects, error)
GetSpecObjects constructs cluster routing objects which should be applied on the cluster
type EndpointInfo ¶
type EndpointInfo struct {
// contains filtered or unexported fields
}
type IngressExposer ¶
type IngressExposer struct {
// contains filtered or unexported fields
}
type RouteExposer ¶
type RouteExposer struct {
// contains filtered or unexported fields
}