Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the Desktops v1 API group +groupName=desktops.kvdi.io
Package v1 contains API Schema definitions for the desktops v1 API group +kubebuilder:object:generate=true +groupName=desktops.kvdi.io
Index ¶
- Constants
- Variables
- type DesktopConfig
- type DesktopInit
- type DockerInDockerConfig
- type ProxyConfig
- type QEMUConfig
- type Session
- func (in *Session) DeepCopy() *Session
- func (in *Session) DeepCopyInto(out *Session)
- func (in *Session) DeepCopyObject() runtime.Object
- func (d *Session) GetServiceAccount() string
- func (d *Session) GetTemplate(c client.Client) (*Template, error)
- func (d *Session) GetTemplateName() string
- func (d *Session) GetUser() string
- func (d *Session) GetVDICluster(c client.Client) (*appv1.VDICluster, error)
- func (d *Session) OwnerReferences() []metav1.OwnerReference
- type SessionList
- type SessionSpec
- type SessionStatus
- type Template
- func (in *Template) DeepCopy() *Template
- func (in *Template) DeepCopyInto(out *Template)
- func (in *Template) DeepCopyObject() runtime.Object
- func (t *Template) DindIsEnabled() bool
- func (t *Template) FileTransferEnabled() bool
- func (t *Template) GetContainers(cluster *appv1.VDICluster, instance *Session, envSecret string) []corev1.Container
- func (t *Template) GetDesktopContainer(cluster *appv1.VDICluster, instance *Session, envSecret string) corev1.Container
- func (t *Template) GetDesktopContainerSecurityContext() *corev1.SecurityContext
- func (t *Template) GetDesktopEnvVars(desktop *Session) []corev1.EnvVar
- func (t *Template) GetDesktopImage() string
- func (t *Template) GetDesktopLifecycle() *corev1.Lifecycle
- func (t *Template) GetDesktopProxyContainer() corev1.Container
- func (t *Template) GetDesktopPullPolicy() corev1.PullPolicy
- func (t *Template) GetDesktopResources() corev1.ResourceRequirements
- func (t *Template) GetDesktopVolumeDevices() []corev1.VolumeDevice
- func (t *Template) GetDesktopVolumeMounts(cluster *appv1.VDICluster, desktop *Session) []corev1.VolumeMount
- func (t *Template) GetDindContainer() corev1.Container
- func (t *Template) GetDindImage() string
- func (t *Template) GetDindPullPolicy() corev1.PullPolicy
- func (t *Template) GetDindResources() corev1.ResourceRequirements
- func (t *Template) GetDindVolumeDevices() []corev1.VolumeDevice
- func (t *Template) GetDindVolumeMounts() []corev1.VolumeMount
- func (t *Template) GetDisplaySocketAddress() string
- func (t *Template) GetDisplaySocketURI() string
- func (t *Template) GetEnvTemplates() map[string]string
- func (t *Template) GetInitContainers() []corev1.Container
- func (t *Template) GetInitSystem() DesktopInit
- func (t *Template) GetKVDIVNCProxyImage() string
- func (t *Template) GetPodSecurityContext() *corev1.PodSecurityContext
- func (t *Template) GetProxyPullPolicy() corev1.PullPolicy
- func (t *Template) GetProxyResources() corev1.ResourceRequirements
- func (t *Template) GetPullSecrets() []corev1.LocalObjectReference
- func (t *Template) GetPulseServer() string
- func (t *Template) GetQEMUCloudInitPath() string
- func (t *Template) GetQEMUContainer(cluster *appv1.VDICluster, instance *Session) corev1.Container
- func (t *Template) GetQEMUDiskImage() string
- func (t *Template) GetQEMUDiskImagePullPolicy() corev1.PullPolicy
- func (t *Template) GetQEMUDiskPath() string
- func (t *Template) GetQEMUImage() string
- func (t *Template) GetQEMUImagePullPolicy() corev1.PullPolicy
- func (t *Template) GetQEMUMemory() int
- func (t *Template) GetQEMUNumCPUs() int
- func (t *Template) GetQEMURunnerResources() corev1.ResourceRequirements
- func (t *Template) GetStaticEnvVars() []corev1.EnvVar
- func (t *Template) GetTmpVolume() string
- func (t *Template) GetVolumes(cluster *appv1.VDICluster, desktop *Session, userdataVol string) []corev1.Volume
- func (t *Template) HasManagedEnvSecret() bool
- func (t *Template) IsQEMUTemplate() bool
- func (t *Template) IsTCPDisplaySocket() bool
- func (t *Template) IsUNIXDisplaySocket() bool
- func (t *Template) NeedsDedicatedPulseVolume() bool
- func (t *Template) NeedsEmptyTmpVolume() bool
- func (t *Template) QEMUUseCSI() bool
- func (t *Template) QEMUUseSPICE() bool
- func (t *Template) RootEnabled() bool
- func (t *Template) ToPodSpec(cluster *appv1.VDICluster, instance *Session, envSecret, userdataVol string) corev1.PodSpec
- func (v *Template) Trim() *Template
- type TemplateList
- type TemplateSpec
Constants ¶
const ( // InitSupervisord signals that the image uses supervisord. InitSupervisord = "supervisord" // InitSystemd signals that the image uses systemd. InitSystemd = "systemd" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "desktops.kvdi.io", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type DesktopConfig ¶
type DesktopConfig struct { // The docker repository and tag to use for desktops booted from this template. Image string `json:"image,omitempty"` // The pull policy to use when pulling the container image. ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` // Resource requirements to apply to desktops booted from this template. Resources corev1.ResourceRequirements `json:"resources,omitempty"` // Additional environment variables to pass to containers booted from this template. Env []corev1.EnvVar `json:"env,omitempty"` // 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](https://github.com/kvdi/kvdi/blob/main/pkg/types/auth_types.go#L79) // and corresponding go types. EnvTemplates map[string]string `json:"envTemplates,omitempty"` // Volume mounts for the desktop container. VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` // Volume devices for the desktop container. VolumeDevices []corev1.VolumeDevice `json:"volumeDevices,omitempty"` // Extra system capabilities to add to desktops booted from this template. Capabilities []corev1.Capability `json:"capabilities,omitempty"` // Set the DNS policy for desktops booted from this template. Defaults to the Kubernetes default (ClusterFirst). DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"` // Specify the DNS parameters for desktops booted from this template. Parameters will be merged into the configuration // based off the `dnsPolicy`. DNSConfig *corev1.PodDNSConfig `json:"dnsConfig,omitempty"` // 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. AllowRoot bool `json:"allowRoot,omitempty"` // 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. Init DesktopInit `json:"init,omitempty"` }
DesktopConfig represents configurations for the template and desktops booted from it.
func (*DesktopConfig) DeepCopy ¶
func (in *DesktopConfig) DeepCopy() *DesktopConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DesktopConfig.
func (*DesktopConfig) DeepCopyInto ¶
func (in *DesktopConfig) DeepCopyInto(out *DesktopConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DesktopInit ¶
type DesktopInit string
DesktopInit represents the init system that the desktop container uses. +kubebuilder:validation:Enum=supervisord;systemd
type DockerInDockerConfig ¶
type DockerInDockerConfig struct { // The image to use for the dind sidecar. Defaults to `docker:dind`. Image string `json:"image,omitempty"` // The pull policy to use when pulling the container image. ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` // Resource restraints to place on the dind sidecar. Resources corev1.ResourceRequirements `json:"resources,omitempty"` // Volume mounts for the dind container. VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` // Volume devices for the dind container. VolumeDevices []corev1.VolumeDevice `json:"volumeDevices,omitempty"` }
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.
func (*DockerInDockerConfig) DeepCopy ¶
func (in *DockerInDockerConfig) DeepCopy() *DockerInDockerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerInDockerConfig.
func (*DockerInDockerConfig) DeepCopyInto ¶
func (in *DockerInDockerConfig) DeepCopyInto(out *DockerInDockerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProxyConfig ¶
type ProxyConfig struct { // 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. Image string `json:"image,omitempty"` // The pull policy to use when pulling the container image. ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` // 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. AllowFileTransfer bool `json:"allowFileTransfer,omitempty"` // 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. SocketAddr string `json:"socketAddr,omitempty"` // 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. PulseServer string `json:"pulseServer,omitempty"` // Resource restraints to place on the proxy sidecar. Resources corev1.ResourceRequirements `json:"resources,omitempty"` }
ProxyConfig represents configurations for the display/audio proxy.
func (*ProxyConfig) DeepCopy ¶
func (in *ProxyConfig) DeepCopy() *ProxyConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfig.
func (*ProxyConfig) DeepCopyInto ¶
func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QEMUConfig ¶
type QEMUConfig struct { // The container image bundling the disks for this template. DiskImage string `json:"diskImage,omitempty"` // The pull policy to use when pulling the disk image. DiskImagePullPolicy corev1.PullPolicy `json:"diskImagePullPolicy,omitempty"` // Set to true to use the image-populator CSI to mount the disk images to a qemu container. // You must have the [image-populator](https://github.com/kubernetes-csi/csi-driver-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. UseCSI bool `json:"useCSI,omitempty"` // The container image containing the QEMU utilities to use to launch the VM. // Defaults to `ghcr.io/kvdi/kvdi:qemu-latest`. QEMUImage string `json:"qemuImage,omitempty"` // The pull policy to use when pulling the QEMU image. QEMUImagePullPolicy corev1.PullPolicy `json:"qemuImagePullPolicy,omitempty"` // Resource requirements to place on the qemu runner instance. QEMUResources corev1.ResourceRequirements `json:"qemuResources,omitempty"` // The path to the boot volume inside the disk image. Defaults to `/disk/boot.img`. DiskPath string `json:"diskPath,omitempty"` // 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. CloudInitPath string `json:"cloudInitPath,omitempty"` // The number of vCPUs to assign the virtual machine. Defaults to 1. CPUs int `json:"cpus,omitempty"` // The amount of memory to assign the virtual machine (in MB). Defaults to 1024. Memory int `json:"memory,omitempty"` // 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. SPICE bool `json:"spice,omitempty"` }
QEMUConfig represents configurations for running a qemu virtual machine for instances booted from this template.
func (*QEMUConfig) DeepCopy ¶
func (in *QEMUConfig) DeepCopy() *QEMUConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QEMUConfig.
func (*QEMUConfig) DeepCopyInto ¶
func (in *QEMUConfig) DeepCopyInto(out *QEMUConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Session ¶
type Session struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec SessionSpec `json:"spec,omitempty"` Status SessionStatus `json:"status,omitempty"` }
Session is the Schema for the sessions API
func (*Session) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Session.
func (*Session) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Session) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Session) GetServiceAccount ¶
GetServiceAccount returns the service account for this instance.
func (*Session) GetTemplate ¶
GetTemplate retrieves the DesktopTemplate for this Desktop instance.
func (*Session) GetTemplateName ¶
GetTemplateName returns the name of the template backing this instance.
func (*Session) GetVDICluster ¶
GetVDICluster retrieves the VDICluster for this Desktop instance
func (*Session) OwnerReferences ¶
func (d *Session) OwnerReferences() []metav1.OwnerReference
OwnerReferences returns an owner reference slice with this Desktop instance as the owner.
type SessionList ¶
type SessionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Session `json:"items"` }
SessionList contains a list of Session
func (*SessionList) DeepCopy ¶
func (in *SessionList) DeepCopy() *SessionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionList.
func (*SessionList) DeepCopyInto ¶
func (in *SessionList) DeepCopyInto(out *SessionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SessionList) DeepCopyObject ¶
func (in *SessionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SessionSpec ¶
type SessionSpec struct { // The VDICluster this Desktop belongs to. This helps to determine which app // instance certificates need to be created for. VDICluster string `json:"vdiCluster"` // The DesktopTemplate for booting this instance. Template string `json:"template"` // The username to use inside the instance, defaults to `anonymous`. User string `json:"user,omitempty"` // A service account to tie to the pod for this instance. ServiceAccount string `json:"serviceAccount,omitempty"` }
SessionSpec defines the desired state of Session
func (*SessionSpec) DeepCopy ¶
func (in *SessionSpec) DeepCopy() *SessionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionSpec.
func (*SessionSpec) DeepCopyInto ¶
func (in *SessionSpec) DeepCopyInto(out *SessionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SessionStatus ¶
type SessionStatus struct { // Whether the instance is running and resolvable within the cluster. Running bool `json:"running,omitempty"` // The current phase of the pod backing this instance. PodPhase corev1.PodPhase `json:"podPhase,omitempty"` }
SessionStatus defines the observed state of Session
func (*SessionStatus) DeepCopy ¶
func (in *SessionStatus) DeepCopy() *SessionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionStatus.
func (*SessionStatus) DeepCopyInto ¶
func (in *SessionStatus) DeepCopyInto(out *SessionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Template ¶
type Template struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TemplateSpec `json:"spec,omitempty"` }
Template is the Schema for the templates API
func (*Template) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.
func (*Template) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Template) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Template) DindIsEnabled ¶
DindIsEnabled returns true if dind is enabled for instances from this template.
func (*Template) FileTransferEnabled ¶
FileTransferEnabled returns true if desktops booted from the template should allow file transfer.
func (*Template) GetContainers ¶
func (t *Template) GetContainers(cluster *appv1.VDICluster, instance *Session, envSecret string) []corev1.Container
GetContainers returns the containers for a given Session.
func (*Template) GetDesktopContainer ¶
func (t *Template) GetDesktopContainer(cluster *appv1.VDICluster, instance *Session, envSecret string) corev1.Container
GetDesktopContainer returns the container for the desktop.
func (*Template) GetDesktopContainerSecurityContext ¶
func (t *Template) GetDesktopContainerSecurityContext() *corev1.SecurityContext
GetDesktopContainerSecurityContext returns the container security context for pods booted from this template.
func (*Template) GetDesktopEnvVars ¶
GetDesktopEnvVars returns the environment variables for a desktop pod.
func (*Template) GetDesktopImage ¶
GetDesktopImage returns the docker image to use for instances booted from this template.
func (*Template) GetDesktopLifecycle ¶
GetDesktopLifecycle returns the lifecycle actions for a desktop container booted from this template.
func (*Template) GetDesktopProxyContainer ¶
GetDesktopProxyContainer returns the configuration for the kvdi-proxy sidecar.
func (*Template) GetDesktopPullPolicy ¶
func (t *Template) GetDesktopPullPolicy() corev1.PullPolicy
GetDesktopPullPolicy returns the image pull policy for this template.
func (*Template) GetDesktopResources ¶
func (t *Template) GetDesktopResources() corev1.ResourceRequirements
GetDesktopResources returns the resource requirements for this instance.
func (*Template) GetDesktopVolumeDevices ¶
func (t *Template) GetDesktopVolumeDevices() []corev1.VolumeDevice
GetDesktopVolumeDevices returns the additional volume devices to apply to the desktop container.
func (*Template) GetDesktopVolumeMounts ¶
func (t *Template) GetDesktopVolumeMounts(cluster *appv1.VDICluster, desktop *Session) []corev1.VolumeMount
GetDesktopVolumeMounts returns the volume mounts for the main desktop container.
func (*Template) GetDindContainer ¶
GetDindContainer returns a dind sidecar to run for an instance, or nil if not configured on the template.
func (*Template) GetDindImage ¶
GetDindImage returns the image to use for the dind sidecar.
func (*Template) GetDindPullPolicy ¶
func (t *Template) GetDindPullPolicy() corev1.PullPolicy
GetDindPullPolicy returns the pull policy for the proxy container.
func (*Template) GetDindResources ¶
func (t *Template) GetDindResources() corev1.ResourceRequirements
GetDindResources returns the resources for the dind container.
func (*Template) GetDindVolumeDevices ¶
func (t *Template) GetDindVolumeDevices() []corev1.VolumeDevice
GetDindVolumeDevices returns the volume devices for the dind container.
func (*Template) GetDindVolumeMounts ¶
func (t *Template) GetDindVolumeMounts() []corev1.VolumeMount
GetDindVolumeMounts returns the volume mounts for the dind container.
func (*Template) GetDisplaySocketAddress ¶
GetDisplaySocketAddress returns just the address portion of the display socket URI.
func (*Template) GetDisplaySocketURI ¶
GetDisplaySocketURI returns the display socket URI to pass to the nonvnc-proxy.
func (*Template) GetEnvTemplates ¶
GetEnvTemplates returns the environment variable templates.
func (*Template) GetInitContainers ¶
GetInitContainers returns any init containers required to run before the desktop launches.
func (*Template) GetInitSystem ¶
func (t *Template) GetInitSystem() DesktopInit
GetInitSystem returns the init system used by the docker image in this template.
func (*Template) GetKVDIVNCProxyImage ¶
GetKVDIVNCProxyImage returns the kvdi-proxy image for the desktop instance.
func (*Template) GetPodSecurityContext ¶
func (t *Template) GetPodSecurityContext() *corev1.PodSecurityContext
GetPodSecurityContext returns the security context for pods booted from this template.
func (*Template) GetProxyPullPolicy ¶
func (t *Template) GetProxyPullPolicy() corev1.PullPolicy
GetProxyPullPolicy returns the pull policy for the proxy container.
func (*Template) GetProxyResources ¶
func (t *Template) GetProxyResources() corev1.ResourceRequirements
GetProxyResources returns the resources for the proxy container.
func (*Template) GetPullSecrets ¶
func (t *Template) GetPullSecrets() []corev1.LocalObjectReference
GetPullSecrets returns the pull secrets for this instance.
func (*Template) GetPulseServer ¶
GetPulseServer returns the pulse server to give to the proxy for handling audio streams.
func (*Template) GetQEMUCloudInitPath ¶
GetQEMUCloudInitPath returns the path to the cloud image inside the disk image. An empty string means to generate one.
func (*Template) GetQEMUContainer ¶
GetQEMUContainer returns the container for launching the QEMU vm.
func (*Template) GetQEMUDiskImage ¶
GetQEMUDiskImage returns the qemu disk image to use.
func (*Template) GetQEMUDiskImagePullPolicy ¶
func (t *Template) GetQEMUDiskImagePullPolicy() corev1.PullPolicy
GetQEMUDiskImagePullPolicy returns the pull policy for the qemu disk image.
func (*Template) GetQEMUDiskPath ¶
GetQEMUDiskPath returns the path to the boot image inside the disk image.
func (*Template) GetQEMUImage ¶
GetQEMUImage returns the qemu utility image to use.
func (*Template) GetQEMUImagePullPolicy ¶
func (t *Template) GetQEMUImagePullPolicy() corev1.PullPolicy
GetQEMUImagePullPolicy returns the pull policy for the qemu utility image.
func (*Template) GetQEMUMemory ¶
GetQEMUMemory returns the amount of memory to use for the vm.
func (*Template) GetQEMUNumCPUs ¶
GetQEMUNumCPUs returns the number of CPUs to use for the vm.
func (*Template) GetQEMURunnerResources ¶
func (t *Template) GetQEMURunnerResources() corev1.ResourceRequirements
GetQEMURunnerResources returns the resources for the qemu runner.
func (*Template) GetStaticEnvVars ¶
GetStaticEnvVars returns the environment variables configured in the template.
func (*Template) GetTmpVolume ¶
GetTmpVolume returns the name of the volume providing the tmp directory.
func (*Template) GetVolumes ¶
func (t *Template) GetVolumes(cluster *appv1.VDICluster, desktop *Session, userdataVol string) []corev1.Volume
GetVolumes returns the volumes to mount to desktop pods.
func (*Template) HasManagedEnvSecret ¶
HasManagedEnvSecret returns true if the template should have a pre-created secret containing sensitive environment variables.
func (*Template) IsQEMUTemplate ¶
IsQEMUTemplate returns true if this template is for a QEMU vm.
func (*Template) IsTCPDisplaySocket ¶
IsTCPDisplaySocket returns true if the VNC server is listening on a TCP socket.
func (*Template) IsUNIXDisplaySocket ¶
IsUNIXDisplaySocket returns true if the VNC server is listening on a UNIX socket.
func (*Template) NeedsDedicatedPulseVolume ¶
NeedsDedicatedPulseVolume returns true if the location of the pulse socket is not covered by any of the existing mounts.
func (*Template) NeedsEmptyTmpVolume ¶
NeedsEmptyTmpVolume returns true if none of the user-provided volumes provide the /tmp directory.
func (*Template) QEMUUseCSI ¶
QEMUUseCSI returns if the CSI driver should be used for mounting disk images.
func (*Template) QEMUUseSPICE ¶
QEMUUseSPICE returns true if the template is configured to use the SPICE protocol.
func (*Template) RootEnabled ¶
RootEnabled returns true if desktops booted from the template should allow users to use sudo.
func (*Template) ToPodSpec ¶
func (t *Template) ToPodSpec(cluster *appv1.VDICluster, instance *Session, envSecret, userdataVol string) corev1.PodSpec
ToPodSpec computes a `corev1.PodSpec` from this template given a parent cluster, user session, and optional environment variable secret name.
type TemplateList ¶
type TemplateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Template `json:"items"` }
TemplateList contains a list of Template
func (*TemplateList) DeepCopy ¶
func (in *TemplateList) DeepCopy() *TemplateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateList.
func (*TemplateList) DeepCopyInto ¶
func (in *TemplateList) DeepCopyInto(out *TemplateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TemplateList) DeepCopyObject ¶
func (in *TemplateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*TemplateList) Trim ¶
func (v *TemplateList) Trim() []*Template
Trim will trim the managed fields and other metadata not used in processing. It has the benefit of producing less data when sending over the wire. Note that the objects returned by this method should NOT be used when sending later Update requests.
type TemplateSpec ¶
type TemplateSpec struct { // Any pull secrets required for pulling the container image. ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // Additional volumes to attach to pods booted from this template. To mount them there // must be corresponding `volumeMounts` or `volumeDevices` specified. Volumes []corev1.Volume `json:"volumes,omitempty"` // Configuration options for the instances. These are highly dependant on using // the Dockerfiles (or close derivitives) provided in this repository. DesktopConfig *DesktopConfig `json:"desktop,omitempty"` // Configurations for the display proxy. ProxyConfig *ProxyConfig `json:"proxy,omitempty"` // Docker-in-docker configurations for running a dind sidecar along with desktop instances. DindConfig *DockerInDockerConfig `json:"dind,omitempty"` // 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. QEMUConfig *QEMUConfig `json:"qemu,omitempty"` // Arbitrary tags for displaying in the app UI. Tags map[string]string `json:"tags,omitempty"` }
TemplateSpec defines the desired state of Template
func (*TemplateSpec) DeepCopy ¶
func (in *TemplateSpec) DeepCopy() *TemplateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateSpec.
func (*TemplateSpec) DeepCopyInto ¶
func (in *TemplateSpec) DeepCopyInto(out *TemplateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.