Skip to content

Latest commit

 

History

History
433 lines (389 loc) · 18.9 KB

desktopsv1.md

File metadata and controls

433 lines (389 loc) · 18.9 KB

kVDI CRD Reference

Packages:

Types

desktops.kvdi.io/v1

Package v1 contains API Schema definitions for the Desktops v1 API group

Resource Types:

DesktopConfig

(Appears on: TemplateSpec)

DesktopConfig represents configurations for the template and desktops booted from it.

Field Description
image string

The docker repository and tag to use for desktops booted from this template.

imagePullPolicy Kubernetes core/v1.PullPolicy

The pull policy to use when pulling the container image.

resources Kubernetes core/v1.ResourceRequirements

Resource requirements to apply to desktops booted from this template.

env []Kubernetes core/v1.EnvVar

Additional environment variables to pass to containers booted from this template.

envTemplates map[string]string

Optionally map additional information about the user (and potentially extended further in the future) into the environment of desktops booted from this template. The keys in the map are the environment variable to set inside the desktop, and the values are go templates or strings to set to the value. Currently the go templates are only passed a Session object containing the information in the claims for the user that created the desktop. For more information see the JWTCaims object and corresponding go types.

volumeMounts []Kubernetes core/v1.VolumeMount

Volume mounts for the desktop container.

volumeDevices []Kubernetes core/v1.VolumeDevice

Volume devices for the desktop container.

capabilities []Kubernetes core/v1.Capability

Extra system capabilities to add to desktops booted from this template.

dnsPolicy Kubernetes core/v1.DNSPolicy

Set the DNS policy for desktops booted from this template. Defaults to the Kubernetes default (ClusterFirst).

dnsConfig Kubernetes core/v1.PodDNSConfig

Specify the DNS parameters for desktops booted from this template. Parameters will be merged into the configuration based off the dnsPolicy.

allowRoot bool

AllowRoot will pass the ENABLE_ROOT envvar to the container. In the Dockerfiles in this repository, this will add the user to the sudo group and ability to sudo with no password.

init DesktopInit

The type of init system inside the image, currently only supervisord and systemd are supported. Defaults to systemd. systemd containers are run privileged and downgrading to the desktop user must be done within the image’s init process. supervisord containers are run with minimal capabilities and directly as the desktop user.

DesktopInit (string alias)

(Appears on: DesktopConfig)

DesktopInit represents the init system that the desktop container uses.

DockerInDockerConfig

(Appears on: TemplateSpec)

DockerInDockerConfig is a configuration for mounting a DinD sidecar with desktops booted from the template. This will provide ephemeral docker daemons and storage to sessions.

Field Description
image string

The image to use for the dind sidecar. Defaults to docker:dind.

imagePullPolicy Kubernetes core/v1.PullPolicy

The pull policy to use when pulling the container image.

resources Kubernetes core/v1.ResourceRequirements

Resource restraints to place on the dind sidecar.

volumeMounts []Kubernetes core/v1.VolumeMount

Volume mounts for the dind container.

volumeDevices []Kubernetes core/v1.VolumeDevice

Volume devices for the dind container.

ProxyConfig

(Appears on: TemplateSpec)

ProxyConfig represents configurations for the display/audio proxy.

Field Description
image string

The image to use for the sidecar that proxies mTLS connections to the local VNC server inside the Desktop. Defaults to the public kvdi-proxy image matching the version of the currrently running manager.

imagePullPolicy Kubernetes core/v1.PullPolicy

The pull policy to use when pulling the container image.

allowFileTransfer bool

AllowFileTransfer will mount the user’s home directory inside the kvdi-proxy image. This enables the API endpoint for exploring, downloading, and uploading files to desktop sessions booted from this template. When using a qemu configuration with SPICE, file upload is enabled by default.

socketAddr string

The address the display server listens on inside the image. This defaults to the UNIX socket /var/run/kvdi/display.sock. The kvdi-proxy sidecar will forward websockify requests validated by mTLS to this socket. Must be in the format of tcp://{host}:{port} or unix://{path}. This will usually be a VNC server unless using a qemu configuration with SPICE. If using custom init scripts inside your containers, this value is set to the DISPLAY_SOCK_ADDR environment variable.

pulseServer string

Override the address of the PulseAudio server that the proxy will try to connect to when serving audio. This defaults to what the ubuntu/arch desktop images are configured to do during init, which is to place a socket in the user’s run directory. The value is assumed to be a unix socket.

resources Kubernetes core/v1.ResourceRequirements

Resource restraints to place on the proxy sidecar.

QEMUConfig

(Appears on: TemplateSpec)

QEMUConfig represents configurations for running a qemu virtual machine for instances booted from this template.

Field Description
diskImage string

The container image bundling the disks for this template.

diskImagePullPolicy Kubernetes core/v1.PullPolicy

The pull policy to use when pulling the disk image.

useCSI bool

Set to true to use the image-populator CSI to mount the disk images to a qemu container. You must have the image-populator driver installed. Defaults to copying the contents out of the disk image via an init container. This is experimental and not really tested.

qemuImage string

The container image containing the QEMU utilities to use to launch the VM. Defaults to ghcr.io/kvdi/kvdi:qemu-latest.

qemuImagePullPolicy Kubernetes core/v1.PullPolicy

The pull policy to use when pulling the QEMU image.

qemuResources Kubernetes core/v1.ResourceRequirements

Resource requirements to place on the qemu runner instance.

diskPath string

The path to the boot volume inside the disk image. Defaults to /disk/boot.img.

cloudInitPath string

The path to a pre-built cloud init image to use when booting the VM inside the disk image. Defaults to an auto-generated one at runtime.

cpus int

The number of vCPUs to assign the virtual machine. Defaults to 1.

memory int

The amount of memory to assign the virtual machine (in MB). Defaults to 1024.

spice bool

Set to true to use the SPICE protocol when proxying the display. If using custom qemu runners, this sets the SPICE_DISPLAY environment variable to true. The runners provided by this repository will tell qemu to set up a SPICE server at proxy.socketAddr. The default is to use VNC. This value is also used by the UI to determine which protocol to expect from a display connection.

Session

Session is the Schema for the sessions API

Field Description
metadata Kubernetes meta/v1.ObjectMeta Refer to the Kubernetes API documentation for the fields of the metadata field.
spec SessionSpec

vdiCluster string

The VDICluster this Desktop belongs to. This helps to determine which app instance certificates need to be created for.

template string

The DesktopTemplate for booting this instance.

user string

The username to use inside the instance, defaults to anonymous.

serviceAccount string

A service account to tie to the pod for this instance.

status SessionStatus

SessionSpec

(Appears on: Session)

SessionSpec defines the desired state of Session

Field Description
vdiCluster string

The VDICluster this Desktop belongs to. This helps to determine which app instance certificates need to be created for.

template string

The DesktopTemplate for booting this instance.

user string

The username to use inside the instance, defaults to anonymous.

serviceAccount string

A service account to tie to the pod for this instance.

Template

Template is the Schema for the templates API

Field Description
metadata Kubernetes meta/v1.ObjectMeta Refer to the Kubernetes API documentation for the fields of the metadata field.
spec TemplateSpec

imagePullSecrets []Kubernetes core/v1.LocalObjectReference

Any pull secrets required for pulling the container image.

volumes []Kubernetes core/v1.Volume

Additional volumes to attach to pods booted from this template. To mount them there must be corresponding volumeMounts or volumeDevices specified.

desktop DesktopConfig

Configuration options for the instances. These are highly dependant on using the Dockerfiles (or close derivitives) provided in this repository.

proxy ProxyConfig

Configurations for the display proxy.

dind DockerInDockerConfig

Docker-in-docker configurations for running a dind sidecar along with desktop instances.

qemu QEMUConfig

QEMU configurations for this template. When defined, VMs are used instead of containers for desktop sessions. This object is mututally exclusive with desktop and will take precedence when defined.

tags map[string]string

Arbitrary tags for displaying in the app UI.

TemplateSpec

(Appears on: Template)

TemplateSpec defines the desired state of Template

Field Description
imagePullSecrets []Kubernetes core/v1.LocalObjectReference

Any pull secrets required for pulling the container image.

volumes []Kubernetes core/v1.Volume

Additional volumes to attach to pods booted from this template. To mount them there must be corresponding volumeMounts or volumeDevices specified.

desktop DesktopConfig

Configuration options for the instances. These are highly dependant on using the Dockerfiles (or close derivitives) provided in this repository.

proxy ProxyConfig

Configurations for the display proxy.

dind DockerInDockerConfig

Docker-in-docker configurations for running a dind sidecar along with desktop instances.

qemu QEMUConfig

QEMU configurations for this template. When defined, VMs are used instead of containers for desktop sessions. This object is mututally exclusive with desktop and will take precedence when defined.

tags map[string]string

Arbitrary tags for displaying in the app UI.


Generated with gen-crd-api-reference-docs on git commit c911719.