v1alpha1

package
v0.0.0-...-4e9bc17 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the trl v1alpha1 API group +kubebuilder:object:generate=true +groupName=trl.ibm.com

Index

Constants

This section is empty.

Variables

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

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

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

Functions

This section is empty.

Types

type FuseConfig

type FuseConfig struct {
	//+kubebuilder:default=false
	DisableLocalWriteBackCaching bool `json:"disableLocalWriteBackCaching,omitempty" yaml:"disableLocalWriteBackCaching"`
	//+kubebuilder:default=100
	MaxRetry int `json:"maxRetry,omitempty" yaml:"maxRetry"`
	//+kubebuilder:deafult="1Gi"
	CosPrefetchSize string `json:"cosPrefetchSize,omitempty" yaml:"cosPrefetchSize"`
	//+kubebuilder:deafult="256Mi"
	ClientReadAheadSize string `json:"clientReadAheadSize,omitempty" yaml:"clientReadAheadSize"`
	//+kubebuilder:deafult="48Gi"
	RemoteCacheSize string `json:"remoteCacheSize,omitempty" yaml:"remoteCacheSize"`
	//+kubebuilder:deafult="48Gi"
	ChunkCacheSize string `json:"chunkCacheSize,omitempty" yaml:"chunkCacheSize"`
	//+kubebuilder:default=16
	UploadParallel int `json:"uploadParallel,omitempty" yaml:"uploadParallel"`

	//+kubebuilder:default=false
	DebugFuse bool `json:"debugFuse,omitempty" yaml:"debugFuse,omitempty"`
	//+kubebuilder:default=false
	DebugS3 bool `json:"debugS3,omitempty" yaml:"debugS3,omitempty"`
	//+kubebuilder:default=0
	BlockProfileRate int `json:"blockProfileRate,omitempty" yaml:"blockProfileRate,omitempty"`
	//+kubebuilder:default=0
	MutexProfileRate int `json:"mutexProfileRate,omitempty" yaml:"mutexProfileRate,omitempty"`
}

func (*FuseConfig) DeepCopy

func (in *FuseConfig) DeepCopy() *FuseConfig

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

func (*FuseConfig) DeepCopyInto

func (in *FuseConfig) DeepCopyInto(out *FuseConfig)

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

type ObjcacheCluster

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

	Spec   ObjcacheClusterSpec   `json:"spec,omitempty"`
	Status ObjcacheClusterStatus `json:"status,omitempty"`
}

ObjcacheCluster is the Schema for the objcacheclusters API

func (*ObjcacheCluster) DeepCopy

func (in *ObjcacheCluster) DeepCopy() *ObjcacheCluster

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

func (*ObjcacheCluster) DeepCopyInto

func (in *ObjcacheCluster) DeepCopyInto(out *ObjcacheCluster)

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

func (*ObjcacheCluster) DeepCopyObject

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

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

type ObjcacheClusterList

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

ObjcacheClusterList contains a list of ObjcacheCluster

func (*ObjcacheClusterList) DeepCopy

func (in *ObjcacheClusterList) DeepCopy() *ObjcacheClusterList

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

func (*ObjcacheClusterList) DeepCopyInto

func (in *ObjcacheClusterList) DeepCopyInto(out *ObjcacheClusterList)

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

func (*ObjcacheClusterList) DeepCopyObject

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

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

type ObjcacheClusterSpec

type ObjcacheClusterSpec struct {
	//+kubebuilder:default=0
	// Seed is used to generate group ID (default: 0 == epoch time at the first deploy)
	Seed int64 `json:"seed,omitempty"`

	//+kubebuilder:default="1s"
	// UnstageDelayPeriod is the period after which CSI node begins terminating unstaged FUSE processes to reduce cold startups
	UnstageDelayPeriod string `json:"unstageDelayPeriod,omitempty"`

	//+kubebuilder:default=1
	// Shards is the maximum number of groups to be deployed (Shards * (1 + RaftFollowers) pods are deployed at random nodes within given constraints)
	Shards *int `json:"shards"`

	//+kubebuilder:default=0
	//+kubebuilder:validation:Minimum=0
	//+kubebuilder:validation:Maximum=4
	// RaftFollowers is the maximum number of followers consisting a single replication group
	RaftFollowers int `json:"raftFollowers,omitempty"`

	// GeneratedStorageClassName is the generated storage class name for this objcache cluster
	GeneratedStorageClassName string `json:"generatedStorageClassName"`

	//+kubebuilder:default="docker-na.artifactory.swg-devops.com/res-cpe-team-docker-local/objcache:dev"
	// ObjcacheImage is the image name for objcache
	ObjcacheImage string `json:"objcacheImage,omitempty"`

	// ServerConfig is detailed configurations (e.g., timeouts) for servers in this cluster
	ServerConfig ObjcacheConfig `json:"serverConfig"`

	//+kubebuilder:default=9638
	//+kubebuilder:validation:Minimum=0
	//+kubebuilder:validation:Maximum=65535
	// Port is the port for Raft log replication and RPC
	Port int `json:"port,omitempty"`

	//+kubebuilder:default=8638
	//+kubebuilder:validation:Minimum=0
	//+kubebuilder:validation:Maximum=65535
	// ApiPort is the port for controller APIs such as termination
	ApiPort int `json:"apiPort,omitempty"`

	//+kubebuilder:default=""
	// Secret is the name of secrets storing S3 credentials and mapped directory names
	Secret string `json:"secret,omitempty"`

	// GoDebugEnvVar sets pods GODEBUG
	//+kubebuilder:default=""
	GoDebugEnvVar *string `json:"goDebugEnvVar,omitempty"`

	// GoMemLimit sets pods GOMEMLIMIT
	//+kubebuilder:default=""
	GoMemLimit *string `json:"goMemLimit,omitempty"`

	// MultiNicName adds multi nic annotations to worker pods
	MultiNicName *string `json:"multiNicName,omitempty"`

	// Resources defines the resource requirement for servers
	Resources *ResourceRequirementsApplyConfiguration `json:"resources,omitempty"`

	// LocalVolume is the configuration for local volumes managed by each worker
	LocalVolume ObjcacheLocalVolume `json:"localVolume,omitempty"`

	// OverridePodSpec is the detailed configurations for worker pods
	OverridePodSpec *PodSpecApplyConfiguration `json:"overridePodSpec,omitempty"`
}

ObjcacheClusterSpec defines the desired state of ObjcacheCluster

func (*ObjcacheClusterSpec) DeepCopy

func (in *ObjcacheClusterSpec) DeepCopy() *ObjcacheClusterSpec

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

func (*ObjcacheClusterSpec) DeepCopyInto

func (in *ObjcacheClusterSpec) DeepCopyInto(out *ObjcacheClusterSpec)

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

type ObjcacheClusterStatus

type ObjcacheClusterStatus struct {
	StartedShards int   `json:"startedShards"`
	RaftFollowers int   `json:"raftFollowers"`
	Seed          int64 `json:"seed"`
}

ObjcacheClusterStatus defines the observed state of ObjcacheCluster

func (*ObjcacheClusterStatus) DeepCopy

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

func (*ObjcacheClusterStatus) DeepCopyInto

func (in *ObjcacheClusterStatus) DeepCopyInto(out *ObjcacheClusterStatus)

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

type ObjcacheConfig

type ObjcacheConfig struct {

	//+kubebuilder:default={"allow_other":""}
	MountOptions map[string]string `json:"mountOptions,omitempty" yaml:"mountOptions,omitempty"`
	//+kubebuilder:default=511
	DirMode uint32 `json:"dirMode,omitempty" yaml:"dirMode,omitempty"`
	//+kubebuilder:default=420
	FileMode uint32 `json:"fileMode,omitempty" yaml:"fileMode,omitempty"`
	//+kubebuilder:default=1000
	Uid uint32 `json:"uid,omitempty" yaml:"uid,omitempty"`
	//+kubebuilder:default=1000
	Gid uint32 `json:"gid,omitempty" yaml:"gid,omitempty"`

	//+kubebuilder:default=100
	MaxRetry int `json:"maxRetry,omitempty" yaml:"maxRetry,omitempty"`
	//+kubebuilder:default="16Mi"
	ChunkSize string `json:"chunkSize,omitempty" yaml:"chunkSize,omitempty"`
	//+kubebuilder:default="16Mi"
	RpcChunkSize string `json:"rpcChunkSize,omitempty" yaml:"rpcChunkSize,omitempty"`
	//+kubebuilder:default="1Gi"
	CosPrefetchSize string `json:"cosPrefetchSize,omitempty" yaml:"cosPrefetchSize,omitempty"`
	//+kubebuilder:default="256Mi"
	ClientReadAheadSize string `json:"clientReadAheadSize,omitempty" yaml:"clientReadAheadSize,omitempty"`
	//+kubebuilder:default="24Gi"
	RemoteCacheSize string `json:"remoteCacheSize,omitempty" yaml:"remoteCacheSize,omitempty"`
	//+kubebuilder:default="24Gi"
	ChunkCacheSize string `json:"chunkCacheSize,omitempty" yaml:"chunkCacheSize,omitempty"`
	//+kubebuilder:default=16
	UploadParallel int `json:"uploadParallel,omitempty" yaml:"uploadParallel,omitempty"`

	//+kubebuilder:default=""
	IfName string `json:"ifName,omitempty" yaml:"ifName,omitempty"`
	//+kubebuilder:default=false
	DebugFuse bool `json:"debugFuse,omitempty" yaml:"debugFuse,omitempty"`
	//+kubebuilder:default=false
	DebugS3 bool `json:"debugS3,omitempty" yaml:"debugS3,omitempty"`
	//+kubebuilder:default=0
	BlockProfileRate int `json:"blockProfileRate,omitempty" yaml:"blockProfileRate,omitempty"`
	//+kubebuilder:default=0
	MutexProfileRate int `json:"mutexProfileRate,omitempty" yaml:"mutexProfileRate,omitempty"`

	//+kubebuilder:default="100ms"
	HeartBeatInterval string `json:"heartBeatInterval,omitempty" yaml:"heartBeatInterval,omitempty"`
	//+kubebuilder:default="500ms"
	ElectTimeout string `json:"electTimeout,omitempty" yaml:"electTimeout,omitempty"`
	//+kubebuilder:default="1m"
	ShutdownTimeout string `json:"shutdownTimeout,omitempty" yaml:"shutdownTimeout,omitempty"`
	//+kubebuilder:default="1s"
	EvictionInterval string `json:"evictionInterval,omitempty" yaml:"evictionInterval,omitempty"`
	//+kubebuilder:default="24h"
	DirtyExpireInterval string `json:"dirtyExpireInterval,omitempty" yaml:"dirtyExpireInterval,omitempty"`
	//+kubebuilder:default="10s"
	DirtyFlusherInterval string `json:"dirtyFlusherInterval,omitempty" yaml:"dirtyFlusherInterval,omitempty"`
	//+kubebuilder:default="10s"
	RpcTimeout string `json:"rpcTimeout,omitempty" yaml:"rpcTimeout,omitempty"`
	//+kubebuilder:default="20s"
	ChunkRpcTimeout string `json:"chunkRpcTimeout,omitempty" yaml:"chunkRpcTimeout,omitempty"`
	//+kubebuilder:default="20s"
	CommitRpcTimeout string `json:"commitRpcTimeout,omitempty" yaml:"commitRpcTimeout,omitempty"`
	//+kubebuilder:default="20s"
	CoordinatorTimeout string `json:"coordinatorTimeout,omitempty" yaml:"coordinatorTimeout,omitempty"`
	//+kubebuilder:default="25s"
	MpuTimeout string `json:"mpuTimeout,omitempty" yaml:"mpuTimeout,omitempty"`
	//+kubebuilder:default="833s"
	PersistTimeout string `json:"persistTimeout,omitempty" yaml:"persistTimeout,omitempty"`
}

func (*ObjcacheConfig) DeepCopy

func (in *ObjcacheConfig) DeepCopy() *ObjcacheConfig

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

func (*ObjcacheConfig) DeepCopyInto

func (in *ObjcacheConfig) DeepCopyInto(out *ObjcacheConfig)

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

type ObjcacheCsiDriver

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

	Spec   ObjcacheCsiDriverSpec   `json:"spec,omitempty"`
	Status ObjcacheCsiDriverStatus `json:"status,omitempty"`
}

ObjcacheCsiDriver is the Schema for the objcachecsidrivers API

func (*ObjcacheCsiDriver) DeepCopy

func (in *ObjcacheCsiDriver) DeepCopy() *ObjcacheCsiDriver

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

func (*ObjcacheCsiDriver) DeepCopyInto

func (in *ObjcacheCsiDriver) DeepCopyInto(out *ObjcacheCsiDriver)

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

func (*ObjcacheCsiDriver) DeepCopyObject

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

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

type ObjcacheCsiDriverList

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

ObjcacheCsiDriverList contains a list of ObjcacheCsiDriver

func (*ObjcacheCsiDriverList) DeepCopy

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

func (*ObjcacheCsiDriverList) DeepCopyInto

func (in *ObjcacheCsiDriverList) DeepCopyInto(out *ObjcacheCsiDriverList)

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

func (*ObjcacheCsiDriverList) DeepCopyObject

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

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

type ObjcacheCsiDriverSpec

type ObjcacheCsiDriverSpec struct {
	// ServiceAccount is the name of service account with roles for CSI-related resources
	ServiceAccount string `json:"serviceAccount"`

	//+kubebuilder:default={objcacheCsiController: "docker-na.artifactory.swg-devops.com/res-cpe-team-docker-local/objcache-csi-controller:dev", objcacheCsiNode: "docker-na.artifactory.swg-devops.com/res-cpe-team-docker-local/objcache-csi-node:dev", driverRegistrar: "registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.7.0", provisioner: "registry.k8s.io/sig-storage/csi-provisioner:v3.4.0", attacher: "registry.k8s.io/sig-storage/csi-attacher:v4.2.0"}
	// Images defines used images for CSI pods
	Images ObjcacheImages `json:"images,omitempty"`

	//+kubebuilder:default="ocp-4.10.20"
	// EnvStr is the string to describe OCP versions ("ocp-4.10.20" or "roks-4.8")
	EnvStr string `json:"envStr,omitempty"`

	//+kubebuilder:default={capacity:"40Gi", cacheReplacementThreashold:80,mountPath:"/var/lib/objcache"}
	// LocalVolume is the local volume configuration for objcache FUSE
	LocalVolume ObjcacheLocalVolume `json:"localVolume,omitempty"`

	// MultiNicName adds multi nic annotations to node pods
	MultiNicName *string `json:"multiNicName,omitempty"`

	// FuseGoDebugEnvVar sets FUSE process GODEBUG
	//+kubebuilder:default=""
	FuseGoDebugEnvVar *string `json:"fuseGoDebugEnvVar,omitempty"`
	// FuseGoMemLimit sets FUSE process GOMEMLIMIT
	//+kubebuilder:default="64GiB"
	FuseGoMemLimit *string `json:"fuseGoMemLimit,omitempty"`

	// FuseConfig is configuration for objcache-fuse
	FuseConfig FuseConfig `json:"fuseConfig"`

	// OverridePodTemplateSpec is the detailed configurations for CSI pods
	OverridePodTemplateSpec *PodTemplateSpecApplyConfiguration `json:"overridePodTemplateSpec,omitempty"`

	//+kubebuilder:default=9638
	FusePortBegin int `json:"fusePortBegin,omitempty"`

	//+kubebuilder:default=19638
	FusePortEnd int `json:"fusePortEnd,omitempty"`
}

ObjcacheCsiDriverSpec defines the desired state of ObjcacheCsiDriver

func (*ObjcacheCsiDriverSpec) DeepCopy

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

func (*ObjcacheCsiDriverSpec) DeepCopyInto

func (in *ObjcacheCsiDriverSpec) DeepCopyInto(out *ObjcacheCsiDriverSpec)

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

type ObjcacheCsiDriverStatus

type ObjcacheCsiDriverStatus struct {
}

ObjcacheCsiDriverStatus defines the observed state of ObjcacheCsiDriver

func (*ObjcacheCsiDriverStatus) DeepCopy

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

func (*ObjcacheCsiDriverStatus) DeepCopyInto

func (in *ObjcacheCsiDriverStatus) DeepCopyInto(out *ObjcacheCsiDriverStatus)

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

type ObjcacheImages

type ObjcacheImages struct {
	//+kubebuilder:default="docker-na.artifactory.swg-devops.com/res-cpe-team-docker-local/objcache-csi-controller:dev"
	// ObjcacheCsiController is the image name for objcache-csi-controller
	ObjcacheCsiController string `json:"objcacheCsiController,omitempty"`

	//+kubebuilder:default="docker-na.artifactory.swg-devops.com/res-cpe-team-docker-local/objcache-csi-node:dev"
	// ObjcacheCsiNode is the image name for objcache-csi-node
	ObjcacheCsiNode string `json:"objcacheCsiNode,omitempty"`

	//+kubebuilder:default="registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.7.0"
	// DriverRegistar is the image name of the CSI driver-registrar
	DriverRegistar string `json:"driverRegistrar,omitempty"`

	//+kubebuilder:default="registry.k8s.io/sig-storage/csi-provisioner:v3.4.0"
	// Provisioner is the image name of the CSI provisioner
	Provisioner string `json:"provisioner,omitempty"`

	//+kubebuilder:default="registry.k8s.io/sig-storage/csi-attacher:v4.2.0"
	// Attacher is the image name of the CSI attacher
	Attacher string `json:"attacher,omitempty"`
}

func (*ObjcacheImages) DeepCopy

func (in *ObjcacheImages) DeepCopy() *ObjcacheImages

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

func (*ObjcacheImages) DeepCopyInto

func (in *ObjcacheImages) DeepCopyInto(out *ObjcacheImages)

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

type ObjcacheLocalVolume

type ObjcacheLocalVolume struct {
	//+kubebuilder:default=""
	// StorageClass is the name of storage class for allocating an ephemeral volume
	StorageClass string `json:"storageClass,omitempty"`

	//+kubebuilder:default="40Gi"
	// Capacity is the size of the local volume that is requested to StorageClass
	Capacity resource.Quantity `json:"capacity,omitempty"`

	//+kubebuilder:default=80
	//+kubebuilder:validation:Minimum=20
	//+kubebuilder:validation:Maximum=100
	// CacheReplacementThreashold is the percentage to start cache replacement
	CacheReplacementThreashold int `json:"cacheReplacementThreashold,omitempty"`

	//+kubebuilder:default="/var/lib/objcache"
	// MountPath is the directory path for an epemeral volume
	MountPath string `json:"mountPath,omitempty"`

	// DebugLogPvc is the name of persistent volume claims for objcache logs
	DebugLogPvc *string `json:"debugLogPvc,omitempty"`
}

func (*ObjcacheLocalVolume) DeepCopy

func (in *ObjcacheLocalVolume) DeepCopy() *ObjcacheLocalVolume

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

func (*ObjcacheLocalVolume) DeepCopyInto

func (in *ObjcacheLocalVolume) DeepCopyInto(out *ObjcacheLocalVolume)

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

type PodSpecApplyConfiguration

type PodSpecApplyConfiguration corev1apply.PodSpecApplyConfiguration

func (*PodSpecApplyConfiguration) DeepCopy

func (*PodSpecApplyConfiguration) DeepCopyInto

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

type PodTemplateSpecApplyConfiguration

type PodTemplateSpecApplyConfiguration corev1apply.PodTemplateSpecApplyConfiguration

func (*PodTemplateSpecApplyConfiguration) DeepCopy

func (*PodTemplateSpecApplyConfiguration) DeepCopyInto

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

type ResourceRequirementsApplyConfiguration

type ResourceRequirementsApplyConfiguration corev1apply.ResourceRequirementsApplyConfiguration

func (*ResourceRequirementsApplyConfiguration) DeepCopy

func (*ResourceRequirementsApplyConfiguration) DeepCopyInto

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