Documentation
¶
Overview ¶
Package kubeworkspaces implements the kube-workspaces REST API service layer. It provides HTTP endpoints for managing workspaces, volumes, images, and namespaces within a Kubernetes cluster. The API is designed using the Goa framework and supports both authenticated and unauthenticated operation modes.
Index ¶
- func NewAgent(wsClient *k8s.WorkspaceClient, sessions *agent.Store, ...) genagent.Service
- func NewAgentUpgrades(svc *upgrades.Service, plat *platform.ConfigProvider, ...) genagentupgrades.Service
- func NewDisplay(wsClient *k8s.WorkspaceClient, sessions *display.Sessions, enabled bool) gendisplay.Service
- func NewExecutions(execSvc *execution.Service, plat *platform.ConfigProvider, ...) executions.Service
- func NewHealth() health.Service
- func NewImages(imageClient *k8s.ImageClient) images.Service
- func NewNamespaces(authProvider *auth.ConfigProvider) namespaces.Service
- func NewSSHKeys(authProvider *auth.ConfigProvider) sshkeys.Service
- func NewVolumes(authProvider *auth.ConfigProvider) volumes.Service
- func NewWorkspaces(client *k8s.WorkspaceClient, imageClient *k8s.ImageClient, ...) workspaces.Service
- func SharedDisplayEnabledFromEnv() bool
- type ExecutionsOption
- type UpgradeEligibility
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAgent ¶ added in v0.8.0
func NewAgent(wsClient *k8s.WorkspaceClient, sessions *agent.Store, keys func(ctx context.Context) ([][]byte, error)) genagent.Service
NewAgent returns the agent service implementation.
func NewAgentUpgrades ¶ added in v0.10.0
func NewAgentUpgrades(svc *upgrades.Service, plat *platform.ConfigProvider, resolver UpgradeEligibility) genagentupgrades.Service
NewAgentUpgrades returns the agent-upgrades service implementation. A nil coordinator, policy provider or resolver leaves every method unavailable; the surface never degrades to in-memory best-effort behavior.
func NewDisplay ¶ added in v0.6.0
func NewDisplay(wsClient *k8s.WorkspaceClient, sessions *display.Sessions, enabled bool) gendisplay.Service
NewDisplay returns the display service implementation.
func NewExecutions ¶ added in v0.10.0
func NewExecutions(execSvc *execution.Service, plat *platform.ConfigProvider, options ...ExecutionsOption) executions.Service
NewExecutions returns the executions service implementation.
func NewImages ¶
func NewImages(imageClient *k8s.ImageClient) images.Service
NewImages returns the images service implementation.
func NewNamespaces ¶
func NewNamespaces(authProvider *auth.ConfigProvider) namespaces.Service
NewNamespaces returns the namespaces service implementation.
func NewSSHKeys ¶ added in v0.4.0
func NewSSHKeys(authProvider *auth.ConfigProvider) sshkeys.Service
NewSSHKeys returns the sshkeys service implementation.
func NewVolumes ¶
func NewVolumes(authProvider *auth.ConfigProvider) volumes.Service
NewVolumes returns the volumes service implementation.
func NewWorkspaces ¶
func NewWorkspaces(client *k8s.WorkspaceClient, imageClient *k8s.ImageClient, coreClient *k8s.CoreClient, authProvider *auth.ConfigProvider, podDefaultClient *k8s.PodDefaultClient) workspaces.Service
NewWorkspaces returns the workspaces service implementation.
func SharedDisplayEnabledFromEnv ¶ added in v0.6.0
func SharedDisplayEnabledFromEnv() bool
SharedDisplayEnabledFromEnv reads the pilot gate: the shared display ships opt-in until the platform plan's acceptance package passes, so it must be explicitly switched on with KW_DISPLAY_SHARED=on. Rolling back is the inverse: unset it and restart — generations end with the process, claims are released, and clients fall back to the legacy exclusive /vnc path.
Types ¶
type ExecutionsOption ¶ added in v0.10.0
type ExecutionsOption func(*executionssrvc)
ExecutionsOption configures optional executions-service dependencies.
func WithIssuerReadiness ¶ added in v0.10.0
func WithIssuerReadiness(probe func(context.Context) error) ExecutionsOption
WithIssuerReadiness supplies the management issuer readiness probe reported by the status endpoint.
func WithLifecycleContext ¶ added in v0.10.0
func WithLifecycleContext(lifecycle context.Context) ExecutionsOption
WithLifecycleContext fences a dispatched guest run against process shutdown. The caller's request context deliberately does not do that: a disconnected client would otherwise fabricate a transport-loss unknown and a recording gap for a command that is still running.
func WithQGA ¶ added in v0.10.0
func WithQGA(executor qgaExecutor) ExecutionsOption
WithQGA installs the opt-in QGA pilot transport behind the start method. A nil executor leaves start unavailable; the transport is never a fallback.
type UpgradeEligibility ¶ added in v0.10.0
type UpgradeEligibility interface {
Resolve(ctx context.Context, namespace, name string) (qga.Target, error)
}
UpgradeEligibility resolves the current controller-owned identity of a workspace: the same fail-closed QGA resolver the execution pilot uses, which internally requires the platform execution policy to admit SYSTEM elevation for the workspace.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
kube_workspaces
command
|
|
|
kube_workspaces-cli
command
|
|
|
gen
|
|
|
internal
|
|
|
auth
Package auth provides authentication and authorization middleware for the kube-workspaces API.
|
Package auth provides authentication and authorization middleware for the kube-workspaces API. |
|
broker
Package broker implements the read-only RFB multi-viewer feasibility spike.
|
Package broker implements the read-only RFB multi-viewer feasibility spike. |
|
display
Package display coordinates the single interactive VM display across API replicas.
|
Package display coordinates the single interactive VM display across API replicas. |
|
exec
Package exec provides WebSocket-based remote command execution in workspace pods.
|
Package exec provides WebSocket-based remote command execution in workspace pods. |
|
execution
Package execution owns agent-backed machine management, independently of the desktop/display grant and the existing serial/SSH/container exec bridges.
|
Package execution owns agent-backed machine management, independently of the desktop/display grant and the existing serial/SSH/container exec bridges. |
|
execution/enrollment
Package enrollment implements one-use, CSR-bound management bootstrap issuance.
|
Package enrollment implements one-use, CSR-bound management bootstrap issuance. |
|
execution/grants
Package grants defines the independently verifiable management-v1 grant envelope.
|
Package grants defines the independently verifiable management-v1 grant envelope. |
|
execution/management
Package management wires the opt-in management issuer and trusted bootstrap importer.
|
Package management wires the opt-in management issuer and trusted bootstrap importer. |
|
execution/pki
Package pki defines management-only certificate identities and mutual TLS.
|
Package pki defines management-only certificate identities and mutual TLS. |
|
execution/qga
Package qga implements the server side of the approved QGA pod-exec pilot transport (`qga-pod-exec/v1`): a Kubernetes-authenticated pod exec into the current KubeVirt virt-launcher, driving the fixed installed runner through the QEMU guest agent.
|
Package qga implements the server side of the approved QGA pod-exec pilot transport (`qga-pod-exec/v1`): a Kubernetes-authenticated pod exec into the current KubeVirt virt-launcher, driving the fixed installed runner through the QEMU guest agent. |
|
execution/storage
Package storage implements the durable-and-ephemeral execution store: a searchable metadata/audit layer (PostgreSQL in persistent modes, bounded in-memory in ephemeral mode) plus an encrypted, hash-chained recording chunk store (S3-compatible in persistent modes, bounded encrypted temp files in ephemeral mode).
|
Package storage implements the durable-and-ephemeral execution store: a searchable metadata/audit layer (PostgreSQL in persistent modes, bounded in-memory in ephemeral mode) plus an encrypted, hash-chained recording chunk store (S3-compatible in persistent modes, bounded encrypted temp files in ephemeral mode). |
|
execution/updates
Package updates verifies publisher-authenticated agent-update manifests, authenticated machine inventory reports and the write-ahead upgrade journal, plus bounded payload streams.
|
Package updates verifies publisher-authenticated agent-update manifests, authenticated machine inventory reports and the write-ahead upgrade journal, plus bounded payload streams. |
|
execution/upgrades
Package upgrades implements durable off-guest agent-upgrade admission: an exclusive per-VM reservation, idempotent start, safe cancellation, explicit rollback admission and the recording/audit evidence trail.
|
Package upgrades implements durable off-guest agent-upgrade admission: an exclusive per-VM reservation, idempotent start, safe cancellation, explicit rollback admission and the recording/audit evidence trail. |
|
k8s
Package k8s provides Kubernetes client wrappers for the kube-workspaces API server.
|
Package k8s provides Kubernetes client wrappers for the kube-workspaces API server. |
|
monitoring
Package monitoring owns process-local, client-facing bridge telemetry.
|
Package monitoring owns process-local, client-facing bridge telemetry. |
|
proxy
Package proxy implements HTTP reverse proxying to workspace pods.
|
Package proxy implements HTTP reverse proxying to workspace pods. |
|
rfb
Package rfb contains protocol primitives for the shared-display broker.
|
Package rfb contains protocol primitives for the shared-display broker. |