workspacemounts

package
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

README

Workspace mounts controller

Controller to manage workspace mounts for workspace. Workspace mounts are external implementations of workspace mounts and are currently configured using annotations on the workspace.

TODO

  1. Add an ability to change workspace status to not ready when a mount is not ready.

Logic Overview

Controller has 2 queues, one for workspace mounts (gvk) and one for workspaces. So it has 2 reconcilers loops running in parallel for each queue.

Overall controllers do not update any other resources, except for the workspace itself, annotation for now. In the future, it will be updating status once we promote the status to be status and spec fields.

When the generic informer receives an event, checks if it's a mount and extracts the workspace that owns it from annotation. Then controller enqueues the workspace object for reconciliation.

The Workspace reconciler checks if the workspace mount is already present in the system, and updates the the status of the workspace annotations with the mount status.

Documentation

Index

Constants

View Source
const (
	// ControllerName is the name of this controller.
	ControllerName = "kcp-workspace-mounts"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller watches Workspaces and dynamically discovered mount resources and reconciles them so workspace has right annotations.

func NewController

func NewController(
	kcpClusterClient kcpclientset.ClusterInterface,
	dynamicClusterClient kcpdynamic.ClusterInterface,
	workspaceInformer tenancyv1alpha1informers.WorkspaceClusterInformer,
	discoveringDynamicSharedInformerFactory *informer.DiscoveringDynamicSharedInformerFactory,
) (*Controller, error)

NewController creates a new controller for generic mounts.

func (*Controller) Start

func (c *Controller) Start(ctx context.Context, numThreads int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL