v1alpha1

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true +groupName=racer.unbounded-cloud.io

Index

Constants

View Source
const GroupName = "racer.unbounded-cloud.io"

Variables

View Source
var (
	GroupVersion  = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
	SchemeBuilder = runtime.NewSchemeBuilder(func(s *runtime.Scheme) error {
		s.AddKnownTypes(GroupVersion, &ClusterCache{}, &ClusterCacheList{})
		metav1.AddToGroupVersion(s, GroupVersion)

		return nil
	})
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type AzureCredential added in v0.17.0

type AzureCredential struct {
	// Default uses DefaultAzureCredential, such as a managed identity or
	// service principal environment variables from a Secret.
	// +optional
	Default *AzureDefaultCredential `json:"default,omitempty"`

	// WorkloadIdentity uses Microsoft Entra Workload ID. The cluster must run
	// the Azure Workload Identity webhook, and the identity must trust the
	// origin's ServiceAccount.
	// +optional
	WorkloadIdentity *AzureWorkloadIdentityCredential `json:"workloadIdentity,omitempty"`
}

AzureCredential selects one Azure authentication method. +kubebuilder:validation:XValidation:rule="[has(self.default), has(self.workloadIdentity)].filter(x, x).size() == 1",message="exactly one of default or workloadIdentity is required"

func (*AzureCredential) DeepCopy added in v0.17.0

func (in *AzureCredential) DeepCopy() *AzureCredential

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

func (*AzureCredential) DeepCopyInto added in v0.17.0

func (in *AzureCredential) DeepCopyInto(out *AzureCredential)

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

type AzureDefaultCredential added in v0.17.0

type AzureDefaultCredential struct {
	// ClientID selects a user-assigned managed identity.
	// +kubebuilder:validation:Pattern=`^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
	// +optional
	ClientID string `json:"clientID,omitempty"`

	// SecretRef names a Secret in the operator namespace whose keys are
	// injected as environment variables, for example AZURE_CLIENT_ID,
	// AZURE_TENANT_ID, and AZURE_CLIENT_SECRET.
	// +optional
	SecretRef *SecretReference `json:"secretRef,omitempty"`
}

AzureDefaultCredential configures DefaultAzureCredential. +kubebuilder:validation:XValidation:rule="!(has(self.clientID) && has(self.secretRef))",message="clientID and secretRef are mutually exclusive"

func (*AzureDefaultCredential) DeepCopy added in v0.17.0

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

func (*AzureDefaultCredential) DeepCopyInto added in v0.17.0

func (in *AzureDefaultCredential) DeepCopyInto(out *AzureDefaultCredential)

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

type AzureOrigin added in v0.17.0

type AzureOrigin struct {
	// ContainerURL is the blob container URL, for example
	// https://account.blob.core.windows.net/models. The last path segment is
	// the container name. Azurite-style URLs may carry one account path
	// segment before it, for example http://127.0.0.1:10000/account/models.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=320
	// +kubebuilder:validation:XValidation:rule="isURL(self) && url(self).getScheme() in ['http', 'https']",message="containerURL must be an http or https URL"
	// +kubebuilder:validation:XValidation:rule="!self.contains('?') && !self.contains('#') && !self.contains('@')",message="containerURL must not contain credentials, a query, or a fragment"
	// +kubebuilder:validation:XValidation:rule="self.matches('^https?://[]A-Za-z0-9.:[-]+(/[A-Za-z0-9_-]+)?/[a-z0-9]+(-[a-z0-9]+)*$') && self.substring(self.lastIndexOf('/') + 1).size() >= 3 && self.substring(self.lastIndexOf('/') + 1).size() <= 63",message="containerURL must be an account URL followed by one valid container name, such as https://account.blob.core.windows.net/models"
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="containerURL is immutable; create a new ClusterCache for a different container"
	ContainerURL string `json:"containerURL"`

	// Credential selects how the origin authenticates. When omitted, requests are anonymous.
	// +optional
	Credential *AzureCredential `json:"credential,omitempty"`
}

AzureOrigin reads one Azure Blob Storage container. Every pod attached to the cache sees the container's whole keyspace. Cache entries do not record the account or container, so the container URL is immutable: a different source needs a new ClusterCache, which has a new UID and therefore an empty cache. +kubebuilder:validation:XValidation:rule="!has(self.credential) || self.containerURL.startsWith('https://')",message="containerURL must use https when a credential is configured"

func (*AzureOrigin) DeepCopy added in v0.17.0

func (in *AzureOrigin) DeepCopy() *AzureOrigin

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

func (*AzureOrigin) DeepCopyInto added in v0.17.0

func (in *AzureOrigin) DeepCopyInto(out *AzureOrigin)

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

type AzureWorkloadIdentityCredential added in v0.17.0

type AzureWorkloadIdentityCredential struct {
	// ClientID is the client ID of the federated identity.
	// +kubebuilder:validation:Pattern=`^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
	ClientID string `json:"clientID"`

	// TenantID overrides the tenant configured by the webhook.
	// +kubebuilder:validation:Pattern=`^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`
	// +optional
	TenantID string `json:"tenantID,omitempty"`
}

AzureWorkloadIdentityCredential configures Microsoft Entra Workload ID.

func (*AzureWorkloadIdentityCredential) DeepCopy added in v0.17.0

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

func (*AzureWorkloadIdentityCredential) DeepCopyInto added in v0.17.0

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

type ClusterCache

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

	// Spec configures optional cache features.
	// +optional
	Spec ClusterCacheSpec `json:"spec,omitempty,omitzero"`
}

ClusterCache names a cache. Its Kubernetes UID is its wire identity. Socket paths are derived from metadata.name. Client access is controlled by pod volume mounts. The name limit keeps /run/racer/<name>/origin/socket within Linux sockaddr_un. Each DNS label is limited to 63 characters to match the wire contract; Kubernetes metadata validation enforces DNS subdomain spelling. The bounded regex checks label lengths without a costly CEL split/all loop. Whether spec.origin is set is fixed at creation. Cache entries are keyed by the ClusterCache UID, not by their source, so removing and re-adding origin, or switching between a managed origin and a self-deployed one, would serve entries fetched from a different source. +kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster,shortName=ccache +kubebuilder:validation:XValidation:rule="size(self.metadata.name) <= 82",message="name must fit the canonical Unix socket path" +kubebuilder:validation:XValidation:rule="self.metadata.name.matches('^[^.]{1,63}([.][^.]{1,63})*$')",message="each name label must be at most 63 characters" +kubebuilder:validation:XValidation:rule="(has(self.spec) && has(self.spec.origin)) == (has(oldSelf.spec) && has(oldSelf.spec.origin))",message="spec.origin cannot be added or removed; create a new ClusterCache to change the origin"

func (*ClusterCache) DeepCopy

func (in *ClusterCache) DeepCopy() *ClusterCache

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

func (*ClusterCache) DeepCopyInto

func (in *ClusterCache) DeepCopyInto(out *ClusterCache)

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

func (*ClusterCache) DeepCopyObject

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

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

type ClusterCacheList

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

+kubebuilder:object:root=true

func (*ClusterCacheList) DeepCopy

func (in *ClusterCacheList) DeepCopy() *ClusterCacheList

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

func (*ClusterCacheList) DeepCopyInto

func (in *ClusterCacheList) DeepCopyInto(out *ClusterCacheList)

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

func (*ClusterCacheList) DeepCopyObject

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

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

type ClusterCacheSpec added in v0.17.0

type ClusterCacheSpec struct {
	// Origin deploys a managed racer-object origin for this cache. The operator runs
	// one origin pod per dataplane node. Origin can be set only at creation and
	// cannot be removed later; leave it unset to deploy your own origin.
	// +optional
	Origin *ObjectOrigin `json:"origin,omitempty"`
}

ClusterCacheSpec configures optional cache features.

func (*ClusterCacheSpec) DeepCopy added in v0.17.0

func (in *ClusterCacheSpec) DeepCopy() *ClusterCacheSpec

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

func (*ClusterCacheSpec) DeepCopyInto added in v0.17.0

func (in *ClusterCacheSpec) DeepCopyInto(out *ClusterCacheSpec)

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

type ObjectOrigin added in v0.17.0

type ObjectOrigin struct {
	// MetadataTTL bounds how long object metadata is reused before it is revalidated.
	// It must not be negative. When unset, the racer-object default applies.
	// +kubebuilder:validation:XValidation:rule="duration(self) >= duration('0s')",message="metadataTTL must not be negative"
	// +optional
	MetadataTTL *metav1.Duration `json:"metadataTTL,omitempty"`

	// RequestTimeout bounds each upstream request. It must be positive.
	// When unset, the racer-object default applies.
	// +kubebuilder:validation:XValidation:rule="duration(self) > duration('0s')",message="requestTimeout must be positive"
	// +optional
	RequestTimeout *metav1.Duration `json:"requestTimeout,omitempty"`

	// MaxConcurrentRequests bounds concurrent upstream requests per origin pod.
	// When unset, the racer-object default applies.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65536
	// +optional
	MaxConcurrentRequests *int32 `json:"maxConcurrentRequests,omitempty"`

	// Azure reads one Azure Blob Storage container.
	// +optional
	Azure *AzureOrigin `json:"azure,omitempty"`
}

ObjectOrigin configures a managed object storage origin. Exactly one provider must be set. Only azure is supported today. +kubebuilder:validation:XValidation:rule="has(self.azure)",message="azure is required"

func (*ObjectOrigin) DeepCopy added in v0.17.0

func (in *ObjectOrigin) DeepCopy() *ObjectOrigin

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

func (*ObjectOrigin) DeepCopyInto added in v0.17.0

func (in *ObjectOrigin) DeepCopyInto(out *ObjectOrigin)

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

type SecretReference added in v0.17.0

type SecretReference struct {
	// Name of the Secret. It must be a DNS-1123 subdomain.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
	Name string `json:"name"`
}

SecretReference names a Secret in the operator namespace.

func (*SecretReference) DeepCopy added in v0.17.0

func (in *SecretReference) DeepCopy() *SecretReference

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

func (*SecretReference) DeepCopyInto added in v0.17.0

func (in *SecretReference) DeepCopyInto(out *SecretReference)

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

Directories

Path Synopsis
Package crd embeds the generated Racer API definitions for operator bootstrap.
Package crd embeds the generated Racer API definitions for operator bootstrap.

Jump to

Keyboard shortcuts

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