v1

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2026 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Overview

Package v1 contains API Schema definitions for the selenosis.io v1 API group. +kubebuilder:object:generate=true +groupName=selenosis.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{Group: "selenosis.io", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Types

type BrowserConfig

type BrowserConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   BrowserConfigSpec `json:"spec,omitempty"`
	Status ConfigStatus      `json:"status,omitempty"`
}

BrowserConfig is the root CRD type that defines browser configurations and associated pod templates. +kubebuilder:object:root=true +kubebuilder:subresource:status

func (*BrowserConfig) DeepCopy

func (in *BrowserConfig) DeepCopy() *BrowserConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrowserConfig.

func (*BrowserConfig) DeepCopyInto

func (in *BrowserConfig) DeepCopyInto(out *BrowserConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BrowserConfig) DeepCopyObject

func (in *BrowserConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BrowserConfigList

type BrowserConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BrowserConfig `json:"items"`
}

BrowserConfigList contains a list of BrowserConfig objects. +kubebuilder:object:root=true

func (*BrowserConfigList) DeepCopy

func (in *BrowserConfigList) DeepCopy() *BrowserConfigList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrowserConfigList.

func (*BrowserConfigList) DeepCopyInto

func (in *BrowserConfigList) DeepCopyInto(out *BrowserConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BrowserConfigList) DeepCopyObject

func (in *BrowserConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BrowserConfigSpec

type BrowserConfigSpec struct {
	// Template provides a base pod template for all browsers and versions.
	// +kubebuilder:validation:Optional
	Template *Template `json:"template,omitempty"`

	// Browsers maps browser names and versions to specific configurations.
	// If a field is nil, it falls back to the corresponding Template value.
	// Example: {"chrome": {"99.0": {...}, "100.0": {...}}, "firefox": {...}}
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinProperties=1
	Browsers map[string]map[string]*BrowserVersionConfigSpec `json:"browsers"`
}

BrowserConfigSpec defines the desired state of BrowserConfig.

func (*BrowserConfigSpec) DeepCopy

func (in *BrowserConfigSpec) DeepCopy() *BrowserConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrowserConfigSpec.

func (*BrowserConfigSpec) DeepCopyInto

func (in *BrowserConfigSpec) DeepCopyInto(out *BrowserConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BrowserConfigSpec) MergeWithTemplate

func (spec *BrowserConfigSpec) MergeWithTemplate()

MergeWithTemplate merges the BrowserConfigSpec template into all browsers and versions.

type BrowserVersionConfigSpec

type BrowserVersionConfigSpec struct {
	// Image is the browser container image.
	Image string `json:"image"`

	Labels           *map[string]string             `json:"labels,omitempty"`
	Annotations      *map[string]string             `json:"annotations,omitempty"`
	Env              *[]corev1.EnvVar               `json:"env,omitempty"`
	Resources        *corev1.ResourceRequirements   `json:"resources,omitempty"`
	Volumes          *[]corev1.Volume               `json:"volumes,omitempty"`
	VolumeMounts     *[]corev1.VolumeMount          `json:"volumeMounts,omitempty"`
	NodeSelector     *map[string]string             `json:"nodeSelector,omitempty"`
	Affinity         *corev1.Affinity               `json:"affinity,omitempty"`
	Tolerations      *[]corev1.Toleration           `json:"tolerations,omitempty"`
	HostAliases      *[]corev1.HostAlias            `json:"hostAliases,omitempty"`
	InitContainers   *[]Sidecar                     `json:"initContainers,omitempty"`
	Sidecars         *[]Sidecar                     `json:"sidecars,omitempty"`
	Privileged       *bool                          `json:"privileged,omitempty"`
	ImagePullSecrets *[]corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	DNSConfig        *corev1.PodDNSConfig           `json:"dnsConfig,omitempty"`
	SecurityContext  *corev1.PodSecurityContext     `json:"securityContext,omitempty"`
	WorkingDir       *string                        `json:"workingDir,omitempty"`
}

BrowserVersionConfigSpec defines per-browser-version overrides. Fields set to nil will inherit values from the Template.

func (*BrowserVersionConfigSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrowserVersionConfigSpec.

func (*BrowserVersionConfigSpec) DeepCopyInto

func (in *BrowserVersionConfigSpec) DeepCopyInto(out *BrowserVersionConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigStatus

type ConfigStatus struct {
	// Version is the current configuration version.
	Version string `json:"version,omitempty"`

	// LastUpdated is the timestamp of the last update.
	LastUpdated metav1.Time `json:"lastUpdated,omitempty"`
}

ConfigStatus defines the observed state of BrowserConfig.

func (*ConfigStatus) DeepCopy

func (in *ConfigStatus) DeepCopy() *ConfigStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigStatus.

func (*ConfigStatus) DeepCopyInto

func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Sidecar

type Sidecar struct {
	// Name is the container name.
	Name string `json:"name"`

	// Image is the container image.
	Image string `json:"image"`

	// Command overrides the container entrypoint.Template.
	Command *[]string `json:"command,omitempty"`

	// Container's working directory.
	WorkingDir *string `json:"workingDir,omitempty"`

	// Ports defines container ports.
	Ports *[]corev1.ContainerPort `json:"ports,omitempty"`

	// Env defines environment variables for the sidecar.
	Env *[]corev1.EnvVar `json:"env,omitempty"`

	// VolumeMounts defines mounts for pod volumes.
	VolumeMounts *[]corev1.VolumeMount `json:"volumeMounts,omitempty"`

	//ImagePullPolicy defines container image pull policy
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// Resources defines CPU/memory requests and limits for the sidecar container.
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
}

Sidecar defines a secondary container to be injected into the pod.

func (*Sidecar) DeepCopy

func (in *Sidecar) DeepCopy() *Sidecar

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sidecar.

func (*Sidecar) DeepCopyInto

func (in *Sidecar) DeepCopyInto(out *Sidecar)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Template

type Template struct {

	// Labels are additional pod labels.
	Labels *map[string]string `json:"labels,omitempty"`

	// Annotations are additional pod annotations.
	Annotations *map[string]string `json:"annotations,omitempty"`

	// Env defines environment variables for the main container.
	Env *[]corev1.EnvVar `json:"env,omitempty"`

	// Resources defines CPU/memory requests and limits for the main container.
	Resources *corev1.ResourceRequirements `json:"resources,omitempty"`

	// Volumes defines pod volumes.
	Volumes *[]corev1.Volume `json:"volumes,omitempty"`

	// VolumeMounts defines mounts for pod volumes.
	VolumeMounts *[]corev1.VolumeMount `json:"volumeMounts,omitempty"`

	// NodeSelector defines node selection constraints.
	NodeSelector *map[string]string `json:"nodeSelector,omitempty"`

	// Affinity defines pod affinity/anti-affinity rules.
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// Tolerations defines tolerations for node taints.
	Tolerations *[]corev1.Toleration `json:"tolerations,omitempty"`

	// HostAliases defines custom /etc/hosts entries.
	HostAliases *[]corev1.HostAlias `json:"hostAliases,omitempty"`

	// List of initialization containers belonging to the pod.
	InitContainers *[]Sidecar `json:"initContainers,omitempty"`

	// Sidecars defines additional containers in the pod (minimum 1).
	// +kubebuilder:validation:MinItems=1
	Sidecars *[]Sidecar `json:"sidecars,omitempty"`

	// Privileged indicates if the main container should run in privileged mode.
	// +kubebuilder:default=false
	Privileged *bool `json:"privileged,omitempty"`

	// ImagePullSecrets specifies secrets for pulling private images.
	ImagePullSecrets *[]corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	// DNSConfig defines pod-level DNS settings.
	DNSConfig *corev1.PodDNSConfig `json:"dnsConfig,omitempty"`

	// SecurityContext defines security context for the pod.
	SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"`

	// Container's working directory.
	// +optional
	WorkingDir *string `json:"workingDir,omitempty"`
}

Template defines a base pod specification that applies to all browsers/versions unless overridden.

func (*Template) DeepCopy

func (in *Template) DeepCopy() *Template

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template.

func (*Template) DeepCopyInto

func (in *Template) DeepCopyInto(out *Template)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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