v1alpha1

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 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 (
	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 is the Schema for the artifacts API.

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 is the Schema for the Hosts API.

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.
	// +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"`
	OSName            string `json:"osName"`
	OSArch            string `json:"osArch"`
	OSKernel          string `json:"osKernel"`
	SystemCPUUsage    string `json:"systemCPUUsage"`
	SystemMemoryTotal int64  `json:"systemMemoryTotal"`
	SystemMemoryFree  int64  `json:"systemMemoryFree"`
	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.
	//
	// 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"`
}

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 is the Schema for the artifacts API.

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"`
	// +kubebuilder:validation:Optional
	PoolSize int32 `json:"poolSize,omitempty"`
	// +kubebuilder:validation:Optional
	MaxInvocations int32 `json:"maxInvocations,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 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 is the Schema for the artifacts API.

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 is the Schema for the artifacts API.

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"`
}

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).
	// +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