v1alpha1

package
v2.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the runtime v1alpha1 API group. +kubebuilder:object:generate=true +groupName=runtime.wasmcloud.dev

Index

Constants

View Source
const (
	WorkloadDaemonSetConditionArtifact condition.ConditionType = "Artifact"
	WorkloadDaemonSetConditionSchedule condition.ConditionType = "Schedule"
)
View Source
const (
	WorkloadDeploymentConditionArtifact condition.ConditionType = "Artifact"
	WorkloadDeploymentConditionSync     condition.ConditionType = "Sync"
	WorkloadDeploymentConditionDeploy   condition.ConditionType = "Deploy"
	WorkloadDeploymentConditionScale    condition.ConditionType = "Scale"
)
View Source
const (
	WorkloadReplicaSetConditionScaleUp   condition.ConditionType = "ScaleUp"
	WorkloadReplicaSetConditionScaleDown condition.ConditionType = "ScaleDown"
)
View Source
const (
	WorkloadConditionHostSelection condition.ConditionType = "HostSelection"
	WorkloadConditionPlacement     condition.ConditionType = "Placement"
	WorkloadConditionConfig        condition.ConditionType = "Config"
	WorkloadConditionSync          condition.ConditionType = "Sync"
)
View Source
const ArtifactConditionPublished condition.ConditionType = "Published"
View Source
const ArtifactConditionSync condition.ConditionType = "Sync"
View Source
const (
	HostConditionReporting condition.ConditionType = "Reporting"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "runtime.wasmcloud.dev", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &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 Artifact

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

	Spec   ArtifactSpec   `json:"spec,omitempty"`
	Status ArtifactStatus `json:"status,omitempty"`
}

Artifact represents a WebAssembly component image that can be fetched and cached for use by workloads.

func (*Artifact) ConditionedStatus

func (a *Artifact) ConditionedStatus() *condition.ConditionedStatus

fulfill the ConditionedStatus interface

func (*Artifact) DeepCopy

func (in *Artifact) DeepCopy() *Artifact

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

func (*Artifact) DeepCopyInto

func (in *Artifact) DeepCopyInto(out *Artifact)

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

func (*Artifact) DeepCopyObject

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

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

func (*Artifact) InitializeConditionedStatus

func (a *Artifact) InitializeConditionedStatus()

type ArtifactList

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

ArtifactList contains a list of Artifact.

func (*ArtifactList) DeepCopy

func (in *ArtifactList) DeepCopy() *ArtifactList

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

func (*ArtifactList) DeepCopyInto

func (in *ArtifactList) DeepCopyInto(out *ArtifactList)

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

func (*ArtifactList) DeepCopyObject

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

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

type ArtifactSpec

type ArtifactSpec struct {
	// +kubebuilder:validation:Required
	Image string `json:"image"`
	// +kubebuilder:validation:Optional
	ImagePullSecret *corev1.LocalObjectReference `json:"imagePullSecret,omitempty"`
}

ArtifactSpec defines the desired state of Artifact.

func (*ArtifactSpec) DeepCopy

func (in *ArtifactSpec) DeepCopy() *ArtifactSpec

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

func (*ArtifactSpec) DeepCopyInto

func (in *ArtifactSpec) DeepCopyInto(out *ArtifactSpec)

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

type ArtifactStatus

type ArtifactStatus struct {
	condition.ConditionedStatus `json:",inline"`
	// +kubebuilder:validation:Optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// +kubebuilder:validation:Optional
	ArtifactURL string `json:"artifactUrl,omitempty"`
}

ArtifactStatus defines the observed state of Artifact.

func (*ArtifactStatus) DeepCopy

func (in *ArtifactStatus) DeepCopy() *ArtifactStatus

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

func (*ArtifactStatus) DeepCopyInto

func (in *ArtifactStatus) DeepCopyInto(out *ArtifactStatus)

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

type Builder added in v2.0.6

type Builder struct {
	GroupVersion schema.GroupVersion
	runtime.SchemeBuilder
}

Builder is a local replacement for sigs.k8s.io/controller-runtime/pkg/scheme.Builder, kept here so this api package depends only on k8s.io/apimachinery. +kubebuilder:object:generate=false

func (*Builder) AddToScheme added in v2.0.6

func (b *Builder) AddToScheme(s *runtime.Scheme) error

AddToScheme adds the registered types to the given scheme.

func (*Builder) Register added in v2.0.6

func (b *Builder) Register(objects ...runtime.Object) *Builder

Register adds objects to the GroupVersionKind scheme.

type ConfigLayer

type ConfigLayer struct {
	// +kubebuilder:validation:Optional
	// ConfigFrom is a list of references to ConfigMaps that will be provided to the workload.
	// The keys and values of all referenced ConfigMaps will be merged. In case of key conflicts,
	// the last ConfigMap in the list wins.
	// +kubebuilder:validation:Optional
	ConfigFrom []corev1.LocalObjectReference `json:"configFrom,omitempty"`
	// The keys and values of all referenced Secrets will be merged. In case of key conflicts,
	// the last Secret in the list wins.
	// The values of the Secrets will be base64-decoded, utf-8 decoded before being provided to the workload.
	// +kubebuilder:validation:Optional
	SecretFrom []corev1.LocalObjectReference `json:"secretFrom,omitempty"`
	// +kubebuilder:validation:Optional
	Config map[string]string `json:"config,omitempty"`
}

func (*ConfigLayer) DeepCopy

func (in *ConfigLayer) DeepCopy() *ConfigLayer

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

func (*ConfigLayer) DeepCopyInto

func (in *ConfigLayer) DeepCopyInto(out *ConfigLayer)

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

type EphemeralVolume

type EphemeralVolume struct{}

EphemeralVolume represents a temporary directory that shares a workload's lifetime.

func (*EphemeralVolume) DeepCopy

func (in *EphemeralVolume) DeepCopy() *EphemeralVolume

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

func (*EphemeralVolume) DeepCopyInto

func (in *EphemeralVolume) DeepCopyInto(out *EphemeralVolume)

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

type Host

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

	// +kubebuilder:validation:Required
	HostID string `json:"hostId"`
	// +kubebuilder:validation:Optional
	Hostname string `json:"hostname"`
	// +kubebuilder:validation:Optional
	HTTPPort uint32 `json:"httpPort"`
	// Environment records where the host is running. For Kubernetes host
	// pods this is the pod's namespace; for out-of-cluster hosts it can be
	// any operator-defined identifier (e.g. a region or data center).
	// +kubebuilder:validation:Optional
	Environment string `json:"environment,omitempty"`

	Status HostStatus `json:"status,omitempty"`
}

Host represents a running wasmCloud host that workloads can be scheduled onto.

func (*Host) ConditionedStatus

func (a *Host) ConditionedStatus() *condition.ConditionedStatus

fulfill the ConditionedStatus interface

func (*Host) DeepCopy

func (in *Host) DeepCopy() *Host

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

func (*Host) DeepCopyInto

func (in *Host) DeepCopyInto(out *Host)

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

func (*Host) DeepCopyObject

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

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

func (*Host) InitializeConditionedStatus

func (a *Host) InitializeConditionedStatus()

type HostInterface

type HostInterface struct {
	// Provides the config / configmap / secret references for this host interface
	ConfigLayer `json:",inline"`

	// Name uniquely identifies this interface instance when multiple entries
	// share the same namespace+package. It is the `(implements <name>)` id the
	// host uses to route a component's named import to this interface's backend,
	// so two imports of the same namespace:package can resolve to different
	// backends.
	// Required when multiple entries of the same namespace:package exist.
	// A name declared here takes precedence over a component of the same
	// name in the same Workload: the host serves the label, and the
	// component's export is not linked for it.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Pattern=`^[a-z0-9][a-z0-9-]*$`
	// +kubebuilder:validation:MaxLength=64
	Name string `json:"name,omitempty"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxLength=128
	Namespace string `json:"namespace"`
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxLength=128
	Package string `json:"package"`
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinItems=1
	Interfaces []string `json:"interfaces,omitempty"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:MaxLength=64
	Version string `json:"version,omitempty"`
}

func (*HostInterface) DeepCopy

func (in *HostInterface) DeepCopy() *HostInterface

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

func (*HostInterface) DeepCopyInto

func (in *HostInterface) DeepCopyInto(out *HostInterface)

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

func (*HostInterface) EnsureInterfaces

func (h *HostInterface) EnsureInterfaces(ifaces ...string)

func (*HostInterface) HasInterface

func (h *HostInterface) HasInterface(iface string) bool

type HostList

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

HostList contains a list of Host.

func (*HostList) DeepCopy

func (in *HostList) DeepCopy() *HostList

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

func (*HostList) DeepCopyInto

func (in *HostList) DeepCopyInto(out *HostList)

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

func (*HostList) DeepCopyObject

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

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

type HostPathVolume

type HostPathVolume struct {
	// Path of the file or directory on the host.
	// +kubebuilder:validation:Required
	Path string `json:"path"`
}

HostPathVolume represents a pre-existing file or directory on the host machine.

func (*HostPathVolume) DeepCopy

func (in *HostPathVolume) DeepCopy() *HostPathVolume

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

func (*HostPathVolume) DeepCopyInto

func (in *HostPathVolume) DeepCopyInto(out *HostPathVolume)

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

type HostStatus

type HostStatus struct {
	condition.ConditionedStatus `json:",inline"`

	Version           string `json:"version,omitempty"`
	OSName            string `json:"osName,omitempty"`
	OSArch            string `json:"osArch,omitempty"`
	OSKernel          string `json:"osKernel,omitempty"`
	SystemCPUUsage    string `json:"systemCPUUsage,omitempty"`
	SystemMemoryTotal int64  `json:"systemMemoryTotal,omitempty"`
	SystemMemoryFree  int64  `json:"systemMemoryFree,omitempty"`
	ComponentCount    int    `json:"componentCount,omitempty"`
	WorkloadCount     int    `json:"workloadCount,omitempty"`

	LastSeen metav1.Time `json:"lastSeen,omitempty"`
}

HostStatus defines the observed state of Host.

func (*HostStatus) DeepCopy

func (in *HostStatus) DeepCopy() *HostStatus

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

func (*HostStatus) DeepCopyInto

func (in *HostStatus) DeepCopyInto(out *HostStatus)

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

type KubernetesServiceRef added in v2.0.3

type KubernetesServiceRef struct {
	// Name is the name of the Kubernetes Service in the same namespace.
	// +kubebuilder:validation:Required
	Name string `json:"name"`
}

KubernetesServiceRef references an existing Kubernetes Service that the operator will manage an EndpointSlice for, pointing to the host pods that are running this workload.

func (*KubernetesServiceRef) DeepCopy added in v2.0.3

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

func (*KubernetesServiceRef) DeepCopyInto added in v2.0.3

func (in *KubernetesServiceRef) DeepCopyInto(out *KubernetesServiceRef)

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

type KubernetesSpec added in v2.0.3

type KubernetesSpec struct {
	// Service references an existing Kubernetes Service that the operator will
	// maintain an EndpointSlice for, pointing to the host pods running this
	// workload. When set, the operator also registers DNS aliases for the
	// service (e.g. service-name, service-name.namespace.svc.cluster.local)
	// with the host so cluster-internal callers can reach the workload via
	// Service DNS without going through an external gateway.
	// +kubebuilder:validation:Optional
	Service *KubernetesServiceRef `json:"service,omitempty"`
}

KubernetesSpec groups Kubernetes-specific configuration for a workload.

func (*KubernetesSpec) DeepCopy added in v2.0.3

func (in *KubernetesSpec) DeepCopy() *KubernetesSpec

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

func (*KubernetesSpec) DeepCopyInto added in v2.0.3

func (in *KubernetesSpec) DeepCopyInto(out *KubernetesSpec)

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

type LocalResources

type LocalResources struct {
	// VolumeMounts is a list of volume mounts that will be mounted into the workload component.
	// The volumes must be defined in the WorkloadSpec.Volumes field.
	// +kubebuilder:validation:Optional
	VolumeMounts []VolumeMount `json:"volumeMounts,omitempty"`
	// +kubebuilder:validation:Optional
	Environment *ConfigLayer `json:"environment,omitempty"`
	// +kubebuilder:validation:Optional
	Config map[string]string `json:"config,omitempty"`
	// AllowedHosts is the outbound egress allowlist for this component.
	//
	// Each entry must match one of:
	//   - "*"                       (allow all)
	//   - "host[:port]"             e.g. "example.com" or "example.com:8443"
	//   - "scheme://host[:port][/]" e.g. "https://api.example.com" or "https://api.example.com/"
	//   - "*.suffix[:port]"         e.g. "*.example.com" or "*.example.com:8443"
	//   - "scheme://*.suffix[:port][/]" e.g. "https://*.example.com"
	//
	// This is a hosts policy, not a URL policy: entries must not include a
	// path (beyond bare `/`), query string, or fragment. The wildcard must
	// be `*.<rest>` (leading dot required); a bare `*foo` is rejected.
	//
	// A raw socket carries no name, so an entry naming a host permits a
	// wasi:sockets connection only to an address the component resolved
	// that name into, on the entry's port, for a short time after the
	// lookup. The entry also permits the lookup itself. An entry with a
	// scheme and no port permits that scheme's default port.
	//
	// Empty or absent allowedHosts denies all outgoing requests
	// (fail-closed). To opt into unrestricted egress, set `allowedHosts:
	// ["*"]` explicitly. Final validation runs in the runtime. This regex
	// is an admission-time guard, not the source of truth.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:items:Pattern=`^\*$|^([A-Za-z][A-Za-z0-9+.-]*://)(\*\.)?[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(:[0-9]{1,5})?/?$|^(\*\.)?[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*(:[0-9]{1,5})?$`
	AllowedHosts []string `json:"allowedHosts,omitempty"`
	// AllowedIPNameLookups is the set of names this component may resolve
	// through wasi:sockets/ip-name-lookup (resolve-addresses).
	//
	// Each entry must match one of:
	//   - "*"                (resolve any name)
	//   - "*.suffix"         e.g. "*.wasmcloud.io"
	//   - "host"             e.g. "api.wasmcloud.io"
	//   - a literal IP address, e.g. "10.0.0.1" or "::1"
	//
	// A name is not a URL: entries must not carry a scheme, port, path,
	// query string, or fragment. The wildcard must be "*.<rest>" with a
	// leading dot; a bare "*foo" is rejected.
	//
	// A host named in allowedHosts may be resolved without being listed
	// here: this list is for names beyond those. With neither naming it, a
	// lookup is denied and reported to the component as
	// permanent-resolver-failure. To resolve any name, set
	// allowedIpNameLookups: ["*"] explicitly; `*` in allowedHosts permits
	// connections but opens no lookup. Final validation runs in the runtime.
	// This regex is an admission-time guard, not the source of truth.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:items:Pattern=`^\*$|^(\*\.)?[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$|^[0-9A-Fa-f:.]+$`
	AllowedIPNameLookups []string `json:"allowedIpNameLookups,omitempty"`
	// AllowedHostLoopbackPorts lists ports on the machine's own loopback this
	// component may reach through the reserved name
	// `host.wasmcloud.internal`.
	//
	// Each entry is a port with an optional protocol:
	//   - "5432"      TCP port 5432 (the default)
	//   - "5432/tcp"  TCP port 5432
	//   - "53/udp"    UDP port 53
	//
	// Deliberately narrow: no ranges, no wildcards, no names. Reaching the
	// host's own loopback is the most privileged grant here, and the set of
	// local ports a component legitimately needs is small and knowable.
	//
	// An empty or absent list denies every host-loopback connection. A
	// non-empty list is still inert unless the host itself runs with
	// --allow-host-loopback, so neither the workload author nor the operator
	// can open this door alone. Note that "127.0.0.1" keeps meaning the
	// workload's own virtual loopback; only the reserved name reaches the
	// machine. Final validation runs in the runtime. This regex is an
	// admission-time guard, not the source of truth.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:items:Pattern=`^[0-9]{1,5}(/(tcp|udp|TCP|UDP))?$`
	AllowedHostLoopbackPorts []string `json:"allowedHostLoopbackPorts,omitempty"`
}

LocalResources describes resources that will be made available to a workload component.

func (*LocalResources) DeepCopy

func (in *LocalResources) DeepCopy() *LocalResources

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

func (*LocalResources) DeepCopyInto

func (in *LocalResources) DeepCopyInto(out *LocalResources)

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

type ReplicaSetStatus

type ReplicaSetStatus struct {
	// +kubebuilder:validation:Optional
	Expected int32 `json:"expected,omitempty"`
	// +kubebuilder:validation:Optional
	Current int32 `json:"current,omitempty"`
	// +kubebuilder:validation:Optional
	Ready int32 `json:"ready,omitempty"`
	// +kubebuilder:validation:Optional
	Unavailable int32 `json:"unavailable,omitempty"`
}

func (*ReplicaSetStatus) DeepCopy

func (in *ReplicaSetStatus) DeepCopy() *ReplicaSetStatus

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

func (*ReplicaSetStatus) DeepCopyInto

func (in *ReplicaSetStatus) DeepCopyInto(out *ReplicaSetStatus)

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

type Volume

type Volume struct {
	// Name of the volume. Must be a DNS_LABEL and unique within the Workload.
	// +kubebuilder:validation:Required
	Name string `json:"name"`
	// EphemeralVolume represents a temporary directory that shares a workload's lifetime.
	// +kubebuilder:validation:Optional
	EphemeralVolume *EphemeralVolume `json:"ephemeral,omitempty"`
	// HostPathVolume represents a pre-existing file or directory on the host machine.
	// +kubebuilder:validation:Optional
	HostPathVolume *HostPathVolume `json:"hostPath,omitempty"`
}

Volume represents a named volume that can be mounted by components.

func (*Volume) DeepCopy

func (in *Volume) DeepCopy() *Volume

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

func (*Volume) DeepCopyInto

func (in *Volume) DeepCopyInto(out *Volume)

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

type VolumeMount

type VolumeMount struct {
	// Name must match the Name of a Volume defined in the WorkloadSpec.Volumes field.
	// +kubebuilder:validation:Required
	Name string `json:"name"`
	// MountPath is the path within the component where the volume should be mounted.
	// +kubebuilder:validation:Required
	MountPath string `json:"mountPath"`
	// ReadOnly indicates whether the volume should be mounted as read-only.
	// +kubebuilder:validation:Optional
	ReadOnly bool `json:"readOnly,omitempty"`
}

VolumeMount describes a mounting of a Volume within a component.

func (*VolumeMount) DeepCopy

func (in *VolumeMount) DeepCopy() *VolumeMount

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

func (*VolumeMount) DeepCopyInto

func (in *VolumeMount) DeepCopyInto(out *VolumeMount)

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

type Workload

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

	Spec   WorkloadSpec   `json:"spec,omitempty"`
	Status WorkloadStatus `json:"status,omitempty"`
}

Workload defines a set of WebAssembly components and services to run on wasmCloud hosts, with the configuration, volumes, and host interfaces they use.

func (*Workload) ConditionedStatus

func (a *Workload) ConditionedStatus() *condition.ConditionedStatus

fulfill the ConditionedStatus interface

func (*Workload) DeepCopy

func (in *Workload) DeepCopy() *Workload

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

func (*Workload) DeepCopyInto

func (in *Workload) DeepCopyInto(out *Workload)

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

func (*Workload) DeepCopyObject

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

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

func (*Workload) InitializeConditionedStatus

func (a *Workload) InitializeConditionedStatus()

type WorkloadComponent

type WorkloadComponent struct {
	// +kubebuilder:validation:Required
	Name string `json:"name"`
	// +kubebuilder:validation:Required
	Image string `json:"image"`
	// +kubebuilder:validation:Optional
	ImagePullSecret *corev1.LocalObjectReference `json:"imagePullSecret,omitempty"`
	// +kubebuilder:validation:Optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// PoolSize is how many instances of this component are kept warm between
	// calls. Unset means none are: every call gets a fresh instance, and the
	// component's state stays ephemeral.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Minimum=0
	PoolSize int32 `json:"poolSize,omitempty"`
	// MaxInvocations retires a warm instance once it has served this many
	// calls, and a fresh one takes its place. Unset means an instance serves
	// calls indefinitely. Only meaningful alongside PoolSize.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Minimum=0
	MaxInvocations int32 `json:"maxInvocations,omitempty"`
	// MaxConcurrency is how many calls one warm instance may serve at the same
	// time. Unset means one, which is what a component gets without asking.
	// Raising it lets an instance overlap calls while it awaits I/O, and is
	// only safe for a guest that yields rather than blocks. Only meaningful
	// alongside PoolSize.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Minimum=0
	MaxConcurrency int32 `json:"maxConcurrency,omitempty"`
	// ReclaimWindowSeconds is how long the pool watches its own peak
	// concurrency before retiring the warm instances that peak did not need.
	// A pool grows to PoolSize under load and, unset, stays there, so a
	// spike's high-water mark outlives the spike. Set this and the pool
	// sweeps every window, keeps the instances its measured peak actually
	// needed and drains the rest. Unset means warm instances are never
	// reclaimed for idleness. Only meaningful alongside PoolSize.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Minimum=0
	ReclaimWindowSeconds int32 `json:"reclaimWindowSeconds,omitempty"`
	// ReclaimMinInstances is how many warm instances an idle sweep never
	// retires below. Unset lets a fully idle pool empty out, so the next call
	// after a quiet spell starts cold. A value at or above PoolSize disables
	// reclaim entirely, since a sweep could never find a surplus to retire.
	// This is a floor on reclaim, not a target to grow to: instances are
	// still only built when a call needs one. Only meaningful alongside
	// ReclaimWindowSeconds.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Minimum=0
	ReclaimMinInstances int32 `json:"reclaimMinInstances,omitempty"`
	// +kubebuilder:validation:Optional
	LocalResources *LocalResources `json:"localResources,omitempty"`
}

WorkloadComponent represents a component of a workload. Components are stateless, invocation-driven units of computation. Components are isolated from each other and can be scaled independently. Each Component has a Root WIT World, representing the Components imports/exports. The combined list of all Components' Root WIT Worlds within a workload must be compatible with the Host's WIT World. All components within a workload are guaranteed to be placed on the same Wasm Host.

func (*WorkloadComponent) DeepCopy

func (in *WorkloadComponent) DeepCopy() *WorkloadComponent

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

func (*WorkloadComponent) DeepCopyInto

func (in *WorkloadComponent) DeepCopyInto(out *WorkloadComponent)

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

type WorkloadDaemonSet added in v2.12.0

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

	Spec   WorkloadDaemonSetSpec   `json:"spec,omitempty"`
	Status WorkloadDaemonSetStatus `json:"status,omitempty"`
}

WorkloadDaemonSet runs a Workload on every Host that matches its host selector, spec.replicasPerHost instances per Host, and follows the Host set as it changes.

func (*WorkloadDaemonSet) ConditionedStatus added in v2.12.0

func (a *WorkloadDaemonSet) ConditionedStatus() *condition.ConditionedStatus

fulfill the ConditionedStatus interface

func (*WorkloadDaemonSet) DeepCopy added in v2.12.0

func (in *WorkloadDaemonSet) DeepCopy() *WorkloadDaemonSet

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

func (*WorkloadDaemonSet) DeepCopyInto added in v2.12.0

func (in *WorkloadDaemonSet) DeepCopyInto(out *WorkloadDaemonSet)

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

func (*WorkloadDaemonSet) DeepCopyObject added in v2.12.0

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

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

func (*WorkloadDaemonSet) InitializeConditionedStatus added in v2.12.0

func (a *WorkloadDaemonSet) InitializeConditionedStatus()

type WorkloadDaemonSetHostStatus added in v2.12.0

type WorkloadDaemonSetHostStatus struct {
	// +kubebuilder:validation:Required
	HostID string `json:"hostId"`
	// Current is the number of instances of the current template on the host.
	// +kubebuilder:validation:Optional
	Current int32 `json:"current,omitempty"`
	// Ready is the number of available instances of the current template.
	// +kubebuilder:validation:Optional
	Ready int32 `json:"ready,omitempty"`
	// Outdated is the number of instances of a previous template still on the host.
	// +kubebuilder:validation:Optional
	Outdated int32 `json:"outdated,omitempty"`
}

WorkloadDaemonSetHostStatus is the observed state of one Host's instances.

func (*WorkloadDaemonSetHostStatus) DeepCopy added in v2.12.0

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

func (*WorkloadDaemonSetHostStatus) DeepCopyInto added in v2.12.0

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

type WorkloadDaemonSetList added in v2.12.0

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

WorkloadDaemonSetList contains a list of WorkloadDaemonSet.

func (*WorkloadDaemonSetList) DeepCopy added in v2.12.0

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

func (*WorkloadDaemonSetList) DeepCopyInto added in v2.12.0

func (in *WorkloadDaemonSetList) DeepCopyInto(out *WorkloadDaemonSetList)

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

func (*WorkloadDaemonSetList) DeepCopyObject added in v2.12.0

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

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

type WorkloadDaemonSetSpec added in v2.12.0

type WorkloadDaemonSetSpec struct {
	// ReplicasPerHost is the number of Workload instances to run on each Host
	// that matches template.spec.hostSelector. Unlike WorkloadDeployment's
	// replicas, it is not a total.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:default=1
	ReplicasPerHost *int32 `json:"replicasPerHost,omitempty"`

	// +kubebuilder:validation:Required
	Template WorkloadReplicaTemplate `json:"template,omitempty"`

	// DeployPolicy is how a template change reaches the hosts. RollingUpdate
	// starts the new instances on a host before stopping the old ones there,
	// MaxConcurrentHosts hosts at a time. Recreate stops every old instance at once.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Enum=RollingUpdate;Recreate
	// +kubebuilder:default=RollingUpdate
	DeployPolicy WorkloadDeployPolicy `json:"deployPolicy,omitempty"`

	// MaxConcurrentHosts is how many hosts a RollingUpdate updates at once.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:default=1
	MaxConcurrentHosts *int32 `json:"maxConcurrentHosts,omitempty"`

	// +kubebuilder:validation:Optional
	Artifacts []WorkloadDeploymentArtifact `json:"artifacts,omitempty"`

	// Kubernetes groups Kubernetes-specific configuration such as Service
	// references and endpoint management.
	// +kubebuilder:validation:Optional
	Kubernetes *KubernetesSpec `json:"kubernetes,omitempty"`
}

WorkloadDaemonSetSpec defines the desired state of WorkloadDaemonSet.

func (*WorkloadDaemonSetSpec) DeepCopy added in v2.12.0

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

func (*WorkloadDaemonSetSpec) DeepCopyInto added in v2.12.0

func (in *WorkloadDaemonSetSpec) DeepCopyInto(out *WorkloadDaemonSetSpec)

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

type WorkloadDaemonSetStatus added in v2.12.0

type WorkloadDaemonSetStatus struct {
	condition.ConditionedStatus `json:",inline"`

	// DesiredHosts is the number of schedulable Hosts that match the selector.
	// +kubebuilder:validation:Optional
	DesiredHosts int32 `json:"desiredHosts,omitempty"`
	// ReadyHosts is the number of desired Hosts running every instance of the
	// current template.
	// +kubebuilder:validation:Optional
	ReadyHosts int32 `json:"readyHosts,omitempty"`
	// UpdatedHosts is the number of desired Hosts with no instance of a
	// previous template left.
	// +kubebuilder:validation:Optional
	UpdatedHosts int32 `json:"updatedHosts,omitempty"`

	// Replicas totals the instances across Hosts; Expected is DesiredHosts × spec.replicasPerHost.
	// +kubebuilder:validation:Optional
	Replicas *ReplicaSetStatus `json:"replicas,omitempty"`

	// Hosts reports the desired Hosts that are not ready or still run an
	// outdated instance, sorted by HostID. Hosts that are up to date and
	// ready are left out, so it stays small on a large host group.
	// +kubebuilder:validation:Optional
	Hosts []WorkloadDaemonSetHostStatus `json:"hosts,omitempty"`
}

WorkloadDaemonSetStatus defines the observed state of WorkloadDaemonSet.

func (*WorkloadDaemonSetStatus) DeepCopy added in v2.12.0

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

func (*WorkloadDaemonSetStatus) DeepCopyInto added in v2.12.0

func (in *WorkloadDaemonSetStatus) DeepCopyInto(out *WorkloadDaemonSetStatus)

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

type WorkloadDeployPolicy

type WorkloadDeployPolicy string
const (
	WorkloadDeployPolicyRollingUpdate WorkloadDeployPolicy = "RollingUpdate"
	WorkloadDeployPolicyRecreate      WorkloadDeployPolicy = "Recreate"
)

type WorkloadDeployment

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

	Spec   WorkloadDeploymentSpec   `json:"spec,omitempty"`
	Status WorkloadDeploymentStatus `json:"status,omitempty"`
}

WorkloadDeployment manages the deployment and scaling of a Workload across hosts, creating WorkloadReplicaSets to maintain the desired number of replicas.

func (*WorkloadDeployment) ConditionedStatus

func (a *WorkloadDeployment) ConditionedStatus() *condition.ConditionedStatus

fulfill the ConditionedStatus interface

func (*WorkloadDeployment) DeepCopy

func (in *WorkloadDeployment) DeepCopy() *WorkloadDeployment

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

func (*WorkloadDeployment) DeepCopyInto

func (in *WorkloadDeployment) DeepCopyInto(out *WorkloadDeployment)

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

func (*WorkloadDeployment) DeepCopyObject

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

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

func (*WorkloadDeployment) InitializeConditionedStatus

func (a *WorkloadDeployment) InitializeConditionedStatus()

type WorkloadDeploymentArtifact

type WorkloadDeploymentArtifact struct {
	// +kubebuilder:validation:Required
	Name string `json:"name"`
	// +kubebuilder:validation:Required
	ArtifactFrom corev1.LocalObjectReference `json:"artifactFrom"`
}

func (*WorkloadDeploymentArtifact) DeepCopy

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

func (*WorkloadDeploymentArtifact) DeepCopyInto

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

type WorkloadDeploymentList

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

WorkloadDeploymentList contains a list of HttpTrigger.

func (*WorkloadDeploymentList) DeepCopy

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

func (*WorkloadDeploymentList) DeepCopyInto

func (in *WorkloadDeploymentList) DeepCopyInto(out *WorkloadDeploymentList)

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

func (*WorkloadDeploymentList) DeepCopyObject

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

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

type WorkloadDeploymentSpec

type WorkloadDeploymentSpec struct {
	WorkloadReplicaSetSpec `json:",inline"`

	// +kubebuilder:validation:Optional
	// +kubebuilder:default=RollingUpdate
	DeployPolicy WorkloadDeployPolicy `json:"deployPolicy,omitempty"`

	// +kubebuilder:validation:Optional
	Artifacts []WorkloadDeploymentArtifact `json:"artifacts,omitempty"`

	// Kubernetes groups Kubernetes-specific configuration such as Service
	// references and endpoint management.
	// +kubebuilder:validation:Optional
	Kubernetes *KubernetesSpec `json:"kubernetes,omitempty"`
}

WorkloadDeploymentSpec defines the desired state of WorkloadDeployment.

func (*WorkloadDeploymentSpec) DeepCopy

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

func (*WorkloadDeploymentSpec) DeepCopyInto

func (in *WorkloadDeploymentSpec) DeepCopyInto(out *WorkloadDeploymentSpec)

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

type WorkloadDeploymentStatus

type WorkloadDeploymentStatus struct {
	condition.ConditionedStatus `json:",inline"`
	// +kubebuilder:validation:Optional
	CurrentReplicaSet *corev1.LocalObjectReference `json:"currentReplicaSet,omitempty"`
	// +kubebuilder:validation:Optional
	PreviousReplicaSet *corev1.LocalObjectReference `json:"previousReplicaSet,omitempty"`
	// +kubebuilder:validation:Optional
	Replicas *ReplicaSetStatus `json:"replicas,omitempty"`

	// CurrentReplicas is the number of workload instances currently running.
	// Exposed as the /scale subresource statusReplicasPath so HPA can read the
	// current replica count. Mirrors .status.replicas.current as a flat int.
	// +kubebuilder:validation:Optional
	CurrentReplicas int32 `json:"currentReplicas,omitempty"`

	// Selector is the serialized label selector exposed by the /scale subresource
	// (scale.status.selector). HPA requires a non-empty selector to compute
	// metrics; without it scaling fails with "selector is required".
	// +kubebuilder:validation:Optional
	Selector string `json:"selector,omitempty"`
}

WorkloadDeploymentStatus defines the observed state of WorkloadDeployment.

func (*WorkloadDeploymentStatus) DeepCopy

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

func (*WorkloadDeploymentStatus) DeepCopyInto

func (in *WorkloadDeploymentStatus) DeepCopyInto(out *WorkloadDeploymentStatus)

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

type WorkloadList

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

WorkloadList contains a list of Workload.

func (*WorkloadList) DeepCopy

func (in *WorkloadList) DeepCopy() *WorkloadList

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

func (*WorkloadList) DeepCopyInto

func (in *WorkloadList) DeepCopyInto(out *WorkloadList)

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

func (*WorkloadList) DeepCopyObject

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

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

type WorkloadReplicaSet

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

	Spec   WorkloadReplicaSetSpec   `json:"spec,omitempty"`
	Status WorkloadReplicaSetStatus `json:"status,omitempty"`
}

WorkloadReplicaSet maintains a specified number of running Workload replicas; it is normally created and managed by a WorkloadDeployment.

func (*WorkloadReplicaSet) ConditionedStatus

func (a *WorkloadReplicaSet) ConditionedStatus() *condition.ConditionedStatus

fulfill the ConditionedStatus interface

func (*WorkloadReplicaSet) DeepCopy

func (in *WorkloadReplicaSet) DeepCopy() *WorkloadReplicaSet

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

func (*WorkloadReplicaSet) DeepCopyInto

func (in *WorkloadReplicaSet) DeepCopyInto(out *WorkloadReplicaSet)

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

func (*WorkloadReplicaSet) DeepCopyObject

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

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

func (*WorkloadReplicaSet) InitializeConditionedStatus

func (a *WorkloadReplicaSet) InitializeConditionedStatus()

type WorkloadReplicaSetList

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

WorkloadReplicaSetList contains a list of WorkloadReplicaSet.

func (*WorkloadReplicaSetList) DeepCopy

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

func (*WorkloadReplicaSetList) DeepCopyInto

func (in *WorkloadReplicaSetList) DeepCopyInto(out *WorkloadReplicaSetList)

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

func (*WorkloadReplicaSetList) DeepCopyObject

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

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

type WorkloadReplicaSetSpec

type WorkloadReplicaSetSpec struct {
	// +kubebuilder:validation:Optional
	// +kubebuilder:default=1
	Replicas *int32 `json:"replicas,omitempty"`
	// +kubebuilder:validation:Required
	Template WorkloadReplicaTemplate `json:"template,omitempty"`
}

WorkloadReplicaSetSpec defines the desired state of WorkloadReplicaSet.

func (*WorkloadReplicaSetSpec) DeepCopy

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

func (*WorkloadReplicaSetSpec) DeepCopyInto

func (in *WorkloadReplicaSetSpec) DeepCopyInto(out *WorkloadReplicaSetSpec)

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

type WorkloadReplicaSetStatus

type WorkloadReplicaSetStatus struct {
	condition.ConditionedStatus `json:",inline"`
	// +kubebuilder:validation:Optional
	Replicas *ReplicaSetStatus `json:"replicas,omitempty"`

	// CurrentReplicas is the number of Workloads of the current template.
	// Exposed as the /scale subresource statusReplicasPath; mirrors
	// .status.replicas.current as a flat int.
	// +kubebuilder:validation:Optional
	CurrentReplicas int32 `json:"currentReplicas,omitempty"`

	// Selector is the serialized label selector exposed by the /scale
	// subresource (scale.status.selector).
	// +kubebuilder:validation:Optional
	Selector string `json:"selector,omitempty"`
}

WorkloadReplicaSetStatus defines the observed state of WorkloadReplicaSet.

func (*WorkloadReplicaSetStatus) DeepCopy

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

func (*WorkloadReplicaSetStatus) DeepCopyInto

func (in *WorkloadReplicaSetStatus) DeepCopyInto(out *WorkloadReplicaSetStatus)

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

type WorkloadReplicaTemplate

type WorkloadReplicaTemplate struct {
	// +kubebuilder:validation:Optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// +kubebuilder:validation:Optional
	Labels map[string]string `json:"labels,omitempty"`
	// +kubebuilder:validation:Required
	Spec WorkloadSpec `json:"spec,omitempty"`
}

func (*WorkloadReplicaTemplate) DeepCopy

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

func (*WorkloadReplicaTemplate) DeepCopyInto

func (in *WorkloadReplicaTemplate) DeepCopyInto(out *WorkloadReplicaTemplate)

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

func (*WorkloadReplicaTemplate) Hash

func (w *WorkloadReplicaTemplate) Hash() string

type WorkloadService

type WorkloadService struct {
	// +kubebuilder:validation:Required
	Image string `json:"image"`
	// +kubebuilder:validation:Optional
	ImagePullSecret *corev1.LocalObjectReference `json:"imagePullSecret,omitempty"`
	// +kubebuilder:validation:Optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
	// +kubebuilder:validation:Optional
	MaxRestarts int32 `json:"maxRestarts"`
	// +kubebuilder:validation:Optional
	LocalResources *LocalResources `json:"localResources,omitempty"`
}

WorkloadService represents a long-running service that is part of the workload. It is also sometimes referred to as a "sidecar" and is optional. A Service differs from a Component in that it is long-running and represents the Workload's "localhost". Services can bind to TCP & UDP ports, which are accessible by Components within the same workload via "localhost" or "127.0.0.1". Services export a single WIT interface, shaped as wasi:cli/run. Services can import interfaces from any Component within the same workload, or from the Host.

func (*WorkloadService) DeepCopy

func (in *WorkloadService) DeepCopy() *WorkloadService

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

func (*WorkloadService) DeepCopyInto

func (in *WorkloadService) DeepCopyInto(out *WorkloadService)

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

type WorkloadSpec

type WorkloadSpec struct {
	// +kubebuilder:validation:Optional
	HostSelector map[string]string `json:"hostSelector,omitempty"`
	// +kubebuilder:validation:Optional
	HostID string `json:"hostId,omitempty"`

	// Environment, if set, scopes scheduling to Hosts whose Environment
	// matches this value, regardless of the Workload's own namespace.
	// The value is matched against Host.Environment — typically a
	// Kubernetes namespace for in-cluster host pods, or any
	// operator-defined identifier for out-of-cluster hosts (e.g. a
	// region or data center). Only honored when the operator is started
	// with allowSharedHosts=true, or when Environment equals the
	// Workload's namespace.
	// +kubebuilder:validation:Optional
	Environment string `json:"environment,omitempty"`

	// +kubebuilder:validation:Optional
	Components []WorkloadComponent `json:"components,omitempty"`

	// HostInterfaces declares the host-provided interfaces this workload needs.
	// Two routing invariants are enforced at admission, complementing the
	// host-side checks:
	//   1. No two entries may be exact duplicates (same namespace, package,
	//      name, and version).
	//   2. At most one entry of a given namespace:package may be unnamed — the
	//      unnamed entry is the default route and cannot be shared. Declare
	//      distinct `name`s to route multiple imports of the same package to
	//      different backends. Semver-incompatible versions of the same package
	//      may coexist (they are distinct interfaces).
	//
	// Declaring an interface here does not by itself guarantee the host serves
	// it. A Workload serves itself first: where exactly one component in the
	// Workload exports a declared interface, that component answers its
	// siblings' unlabelled imports of it, and the host binds only the
	// exporting component (an export is how the host reaches into a Workload).
	// Two or more exporters are ambiguous and fall back to the host.
	//
	// Both routes can be stated explicitly, and an explicit route always wins.
	// Give the entry a `name` and import under that `(implements <name>)`
	// label to reach the host; import under a label naming a component to
	// reach that component.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:MaxItems=64
	// +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, y.__namespace__ == x.__namespace__ && y.__package__ == x.__package__ && (has(y.name) ? y.name : ”) == (has(x.name) ? x.name : ”) && (has(y.version) ? y.version : ”) == (has(x.version) ? x.version : ”)))",message="hostInterfaces must not contain duplicate entries with the same namespace, package, name, and version"
	// +kubebuilder:validation:XValidation:rule="self.all(x, (has(x.name) && x.name != ”) || self.filter(y, y.__namespace__ == x.__namespace__ && y.__package__ == x.__package__ && !(has(y.name) && y.name != ”)).size() == 1)",message="at most one unnamed hostInterface is allowed per namespace:package; set a unique name to disambiguate multiple imports of the same package"
	HostInterfaces []HostInterface `json:"hostInterfaces,omitempty"`
	// +kubebuilder:validation:Optional
	Service *WorkloadService `json:"service,omitempty"`
	// +kubebuilder:validation:Optional
	Volumes []Volume `json:"volumes,omitempty"`

	// Kubernetes groups Kubernetes-specific configuration such as Service
	// references and endpoint management.
	// +kubebuilder:validation:Optional
	Kubernetes *KubernetesSpec `json:"kubernetes,omitempty"`
}

WorkloadSpec defines the desired state of Workload.

func (*WorkloadSpec) DeepCopy

func (in *WorkloadSpec) DeepCopy() *WorkloadSpec

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

func (*WorkloadSpec) DeepCopyInto

func (in *WorkloadSpec) DeepCopyInto(out *WorkloadSpec)

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

func (*WorkloadSpec) EnsureHostInterface

func (s *WorkloadSpec) EnsureHostInterface(iface HostInterface)

type WorkloadStatus

type WorkloadStatus struct {
	condition.ConditionedStatus `json:",inline"`
	// +kubebuilder:validation:Optional
	HostID string `json:"hostId,omitempty"`
	// Environment records the Environment of the Host this Workload was
	// scheduled onto (Host.Environment). Populated by the scheduler at
	// host-selection time; reflects where the workload is actually
	// running, regardless of whether Spec.Environment was explicitly set.
	// +kubebuilder:validation:Optional
	Environment string `json:"environment,omitempty"`
	// +kubebuilder:validation:Optional
	WorkloadID string `json:"workloadId,omitempty"`
}

WorkloadStatus defines the observed state of Workload.

func (*WorkloadStatus) DeepCopy

func (in *WorkloadStatus) DeepCopy() *WorkloadStatus

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

func (*WorkloadStatus) DeepCopyInto

func (in *WorkloadStatus) DeepCopyInto(out *WorkloadStatus)

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