Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the scylla v1alpha1 API group +kubebuilder:object:generate=true +groupName=scylla.scylladb.com
Index ¶
- Variables
- func IsRackConditionTrue(rackStatus *RackStatus, conditionType RackConditionType) bool
- func SetRackCondition(rackStatus *RackStatus, newCondition RackConditionType)
- type AlternatorSpec
- type BackupTaskSpec
- type BackupTaskStatus
- type Cluster
- func (in *Cluster) DeepCopy() *Cluster
- func (in *Cluster) DeepCopyInto(out *Cluster)
- func (in *Cluster) DeepCopyObject() runtime.Object
- func (c *Cluster) Default()
- func (r *Cluster) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *Cluster) ValidateCreate() error
- func (r *Cluster) ValidateDelete() error
- func (r *Cluster) ValidateUpdate(old runtime.Object) error
- type ClusterList
- type ClusterSpec
- type ClusterStatus
- type DatacenterSpec
- type ImageSpec
- type Network
- type PlacementSpec
- type RackCondition
- type RackConditionType
- type RackSpec
- type RackStatus
- type RepairTaskSpec
- type RepairTaskStatus
- type SchedulerTaskSpec
- type StorageSpec
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "scylla.scylladb.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 )
var ScyllaVersionThatSupportsArgs semver.Version
var ScyllaVersionThatSupportsArgsText = "4.2.0"
Version of scylla docker starting from which passing arguments via entry-point is supported
Functions ¶
func IsRackConditionTrue ¶
func IsRackConditionTrue(rackStatus *RackStatus, conditionType RackConditionType) bool
FindCRDCondition returns the condition you're looking for or nil
func SetRackCondition ¶
func SetRackCondition(rackStatus *RackStatus, newCondition RackConditionType)
Types ¶
type AlternatorSpec ¶
type AlternatorSpec struct { // Port on which to bind the Alternator API Port int32 `json:"port,omitempty"` }
func (*AlternatorSpec) DeepCopy ¶
func (in *AlternatorSpec) DeepCopy() *AlternatorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlternatorSpec.
func (*AlternatorSpec) DeepCopyInto ¶
func (in *AlternatorSpec) DeepCopyInto(out *AlternatorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AlternatorSpec) Enabled ¶
func (a *AlternatorSpec) Enabled() bool
type BackupTaskSpec ¶ added in v0.3.0
type BackupTaskSpec struct { SchedulerTaskSpec `json:",inline"` // DC a list of datacenter glob patterns, e.g. 'dc1,!otherdc*' used to specify the DCs // to include or exclude from backup. DC []string `json:"dc,omitempty" mapstructure:"dc,omitempty"` // Keyspace a list of keyspace/tables glob patterns, // e.g. 'keyspace,!keyspace.table_prefix_*' used to include or exclude keyspaces from repair. Keyspace []string `json:"keyspace,omitempty" mapstructure:"keyspace,omitempty"` // Location a list of backup locations in the format [<dc>:]<provider>:<name> ex. s3:my-bucket. // The <dc>: part is optional and is only needed when different datacenters are being used to upload data // to different locations. <name> must be an alphanumeric string and may contain a dash and or a dot, // but other characters are forbidden. // The only supported storage <provider> at the moment are s3 and gcs. Location []string `json:"location" mapstructure:"location,omitempty"` // RateLimit a list of megabytes (MiB) per second rate limits expressed in the format [<dc>:]<limit>. // The <dc>: part is optional and only needed when different datacenters need different upload limits. // Set to 0 for no limit (default 100). RateLimit []string `json:"rateLimit,omitempty" mapstructure:"rate_limit,omitempty"` // Retention The number of backups which are to be stored (default 3). Retention *int64 `json:"retention,omitempty" mapstructure:"retention,omitempty"` // SnapshotParallel a list of snapshot parallelism limits in the format [<dc>:]<limit>. // The <dc>: part is optional and allows for specifying different limits in selected datacenters. // If The <dc>: part is not set, the limit is global (e.g. 'dc1:2,5') the runs are parallel in n nodes (2 in dc1) // and n nodes in all the other datacenters. SnapshotParallel []string `json:"snapshotParallel,omitempty" mapstructure:"snapshot_parallel,omitempty"` // UploadParallel a list of upload parallelism limits in the format [<dc>:]<limit>. // The <dc>: part is optional and allows for specifying different limits in selected datacenters. // If The <dc>: part is not set the limit is global (e.g. 'dc1:2,5') the runs are parallel in n nodes (2 in dc1) // and n nodes in all the other datacenters. UploadParallel []string `json:"uploadParallel,omitempty" mapstructure:"upload_parallel,omitempty"` }
func (*BackupTaskSpec) DeepCopy ¶ added in v0.3.0
func (in *BackupTaskSpec) DeepCopy() *BackupTaskSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupTaskSpec.
func (*BackupTaskSpec) DeepCopyInto ¶ added in v0.3.0
func (in *BackupTaskSpec) DeepCopyInto(out *BackupTaskSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupTaskStatus ¶ added in v0.3.0
type BackupTaskStatus struct { BackupTaskSpec `json:",inline"` ID string `json:"id"` Error string `json:"error"` }
func (*BackupTaskStatus) DeepCopy ¶ added in v0.3.0
func (in *BackupTaskStatus) DeepCopy() *BackupTaskStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupTaskStatus.
func (*BackupTaskStatus) DeepCopyInto ¶ added in v0.3.0
func (in *BackupTaskStatus) DeepCopyInto(out *BackupTaskStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Cluster ¶
type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSpec `json:"spec,omitempty"` Status ClusterStatus `json:"status,omitempty"` }
Cluster is the Schema for the clusters API
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Cluster) SetupWebhookWithManager ¶
func (*Cluster) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Cluster) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
type ClusterList ¶
type ClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Cluster `json:"items"` }
ClusterList contains a list of Cluster
func (*ClusterList) DeepCopy ¶
func (in *ClusterList) DeepCopy() *ClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (*ClusterList) DeepCopyInto ¶
func (in *ClusterList) DeepCopyInto(out *ClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterList) DeepCopyObject ¶
func (in *ClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterSpec ¶
type ClusterSpec struct { // Version of Scylla to use. Version string `json:"version"` // Repository to pull the image from. Repository *string `json:"repository,omitempty"` // Alternator designates this cluster an Alternator cluster Alternator *AlternatorSpec `json:"alternator,omitempty"` // Version of Scylla Manager Agent to use. Defaults to "latest". AgentVersion *string `json:"agentVersion"` // Repository to pull the agent image from. Defaults to "scylladb/scylla-manager-agent". AgentRepository *string `json:"agentRepository,omitempty"` // DeveloperMode determines if the cluster runs in developer-mode. DeveloperMode bool `json:"developerMode,omitempty"` // CpuSet determines if the cluster will use cpu-pinning for max performance. CpuSet bool `json:"cpuset,omitempty"` // Datacenter that will make up this cluster. Datacenter DatacenterSpec `json:"datacenter"` // User-provided image for the sidecar that replaces default. SidecarImage *ImageSpec `json:"sidecarImage,omitempty"` // Sysctl properties to be applied during initialization // given as a list of key=value pairs. // Example: fs.aio-max-nr=232323 Sysctls []string `json:"sysctls,omitempty"` ScyllaArgs string `json:"scyllaArgs,omitempty"` // Networking config Network Network `json:"network,omitempty"` // Repairs specifies repair task in Scylla Manager. // When Scylla Manager is not installed, these will be ignored. Repairs []RepairTaskSpec `json:"repairs,omitempty"` // Backups specifies backup task in Scylla Manager. // When Scylla Manager is not installed, these will be ignored. Backups []BackupTaskSpec `json:"backups,omitempty"` }
ClusterSpec defines the desired state of Cluster
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterStatus ¶
type ClusterStatus struct { Racks map[string]RackStatus `json:"racks,omitempty"` ManagerID *string `json:"managerId,omitempty"` Repairs []RepairTaskStatus `json:"repairs,omitempty"` Backups []BackupTaskStatus `json:"backups,omitempty"` }
ClusterStatus defines the observed state of Cluster
func (*ClusterStatus) DeepCopy ¶
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatacenterSpec ¶
type DatacenterSpec struct { // Name of the Scylla Datacenter. Used in the cassandra-rackdc.properties file. Name string `json:"name"` // Racks of the specific Datacenter. Racks []RackSpec `json:"racks"` }
DatacenterSpec is the desired state for a Scylla Datacenter.
func (*DatacenterSpec) DeepCopy ¶
func (in *DatacenterSpec) DeepCopy() *DatacenterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatacenterSpec.
func (*DatacenterSpec) DeepCopyInto ¶
func (in *DatacenterSpec) DeepCopyInto(out *DatacenterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageSpec ¶
type ImageSpec struct { // Version of the image. Version string `json:"version"` // Repository to pull the image from. Repository string `json:"repository"` }
ImageSpec is the desired state for a container image.
func (*ImageSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.
func (*ImageSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Network ¶ added in v0.2.3
type Network struct { HostNetworking bool `json:"hostNetworking,omitempty"` DNSPolicy corev1.DNSPolicy `json:"dnsPolicy,omitempty"` }
func (*Network) DeepCopy ¶ added in v0.3.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (*Network) DeepCopyInto ¶ added in v0.3.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Network) GetDNSPolicy ¶ added in v0.2.3
type PlacementSpec ¶
type PlacementSpec struct { NodeAffinity *corev1.NodeAffinity `json:"nodeAffinity,omitempty"` PodAffinity *corev1.PodAffinity `json:"podAffinity,omitempty"` PodAntiAffinity *corev1.PodAntiAffinity `json:"podAntiAffinity,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,omitempty"` }
func (*PlacementSpec) DeepCopy ¶
func (in *PlacementSpec) DeepCopy() *PlacementSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementSpec.
func (*PlacementSpec) DeepCopyInto ¶
func (in *PlacementSpec) DeepCopyInto(out *PlacementSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RackCondition ¶
type RackCondition struct { Type RackConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` }
RackCondition is an observation about the state of a rack.
func (*RackCondition) DeepCopy ¶
func (in *RackCondition) DeepCopy() *RackCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RackCondition.
func (*RackCondition) DeepCopyInto ¶
func (in *RackCondition) DeepCopyInto(out *RackCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RackConditionType ¶
type RackConditionType string
const ( RackConditionTypeMemberLeaving RackConditionType = "MemberLeaving" RackConditionTypeUpgrading RackConditionType = "RackUpgrading" )
type RackSpec ¶
type RackSpec struct { // Name of the Scylla Rack. Used in the cassandra-rackdc.properties file. Name string `json:"name"` // Members is the number of Scylla instances in this rack. Members int32 `json:"members"` // Storage describes the underlying storage that Scylla will consume. Storage StorageSpec `json:"storage"` // Placement describes restrictions for the nodes Scylla is scheduled on. Placement *PlacementSpec `json:"placement,omitempty"` // Resources the Scylla Pods will use. Resources corev1.ResourceRequirements `json:"resources"` Volumes []corev1.Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"` // Volume mounts to be added to scylla nodes VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath" protobuf:"bytes,9,rep,name=volumeMounts"` // Scylla config map name to customize scylla.yaml ScyllaConfig string `json:"scyllaConfig"` // Scylla config map name to customize scylla manager agent ScyllaAgentConfig string `json:"scyllaAgentConfig"` }
RackSpec is the desired state for a Scylla Rack.
func (*RackSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RackSpec.
func (*RackSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RackStatus ¶
type RackStatus struct { // Version is the current version of Scylla in use. Version string `json:"version"` // Members is the current number of members requested in the specific Rack Members int32 `json:"members"` // ReadyMembers is the number of ready members in the specific Rack ReadyMembers int32 `json:"readyMembers"` // Conditions are the latest available observations of a rack's state. Conditions []RackCondition `json:"conditions,omitempty"` }
RackStatus is the status of a Scylla Rack
func (*RackStatus) DeepCopy ¶
func (in *RackStatus) DeepCopy() *RackStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RackStatus.
func (*RackStatus) DeepCopyInto ¶
func (in *RackStatus) DeepCopyInto(out *RackStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RepairTaskSpec ¶ added in v0.3.0
type RepairTaskSpec struct { SchedulerTaskSpec `json:",inline"` // DC list of datacenter glob patterns, e.g. 'dc1', '!otherdc*' used to specify the DCs // to include or exclude from backup. DC []string `json:"dc,omitempty" mapstructure:"dc,omitempty"` // FailFast stop repair on first error. FailFast *bool `json:"failFast,omitempty" mapstructure:"fail_fast,omitempty"` // Intensity integer >= 1 or a decimal between (0,1), higher values may result in higher speed and cluster load. // 0 value means repair at maximum intensity. Intensity *int64 `json:"intensity,omitempty" mapstructure:"intensity,omitempty"` // Parallel The maximum number of repair jobs to run in parallel, each node can participate in at most one repair // at any given time. Default is means system will repair at maximum parallelism. Parallel *int64 `json:"parallel,omitempty" mapstructure:"parallel,omitempty"` // Keyspace a list of keyspace/tables glob patterns, e.g. 'keyspace,!keyspace.table_prefix_*' // used to include or exclude keyspaces from repair. Keyspace []string `json:"keyspace,omitempty" mapstructure:"keyspace,omitempty"` // SmallTableThreshold enable small table optimization for tables of size lower than given threshold. // Supported units [B, MiB, GiB, TiB] (default "1GiB"). SmallTableThreshold *string `json:"smallTableThreshold,omitempty" mapstructure:"small_table_threshold,omitempty"` }
func (*RepairTaskSpec) DeepCopy ¶ added in v0.3.0
func (in *RepairTaskSpec) DeepCopy() *RepairTaskSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepairTaskSpec.
func (*RepairTaskSpec) DeepCopyInto ¶ added in v0.3.0
func (in *RepairTaskSpec) DeepCopyInto(out *RepairTaskSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RepairTaskStatus ¶ added in v0.3.0
type RepairTaskStatus struct { RepairTaskSpec `json:",inline" mapstructure:",squash"` ID string `json:"id"` Error string `json:"error"` }
func (*RepairTaskStatus) DeepCopy ¶ added in v0.3.0
func (in *RepairTaskStatus) DeepCopy() *RepairTaskStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepairTaskStatus.
func (*RepairTaskStatus) DeepCopyInto ¶ added in v0.3.0
func (in *RepairTaskStatus) DeepCopyInto(out *RepairTaskStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SchedulerTaskSpec ¶ added in v0.3.0
type SchedulerTaskSpec struct { // Name of a task, it must be unique across all tasks. Name string `json:"name"` // StartDate specifies the task start date expressed in the RFC3339 format or now[+duration], // e.g. now+3d2h10m, valid units are d, h, m, s (default "now"). StartDate *string `json:"startDate,omitempty"` // Interval task schedule interval e.g. 3d2h10m, valid units are d, h, m, s (default "0"). Interval *string `json:"interval,omitempty"` // NumRetries the number of times a scheduled task will retry to run before failing (default 3). NumRetries *int64 `json:"numRetries,omitempty"` }
func (*SchedulerTaskSpec) DeepCopy ¶ added in v0.3.0
func (in *SchedulerTaskSpec) DeepCopy() *SchedulerTaskSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulerTaskSpec.
func (*SchedulerTaskSpec) DeepCopyInto ¶ added in v0.3.0
func (in *SchedulerTaskSpec) DeepCopyInto(out *SchedulerTaskSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageSpec ¶
type StorageSpec struct { // Capacity of each member's volume Capacity string `json:"capacity"` // Name of storageClass to request StorageClassName *string `json:"storageClassName,omitempty"` }
func (*StorageSpec) DeepCopy ¶
func (in *StorageSpec) DeepCopy() *StorageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec.
func (*StorageSpec) DeepCopyInto ¶
func (in *StorageSpec) DeepCopyInto(out *StorageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.