v1alpha1

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

View Source
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
)

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 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

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

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

func (*Cluster) DeepCopyObject

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

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

func (*Cluster) SetupWebhookWithManager

func (r *Cluster) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Cluster) ValidateCreate

func (r *Cluster) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Cluster) ValidateDelete

func (r *Cluster) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Cluster) ValidateUpdate

func (r *Cluster) ValidateUpdate(old runtime.Object) error

ValidateUpdate 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"`
	// Networking config
	Network Network `json:"network,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"`
}

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

func (in *ImageSpec) DeepCopy() *ImageSpec

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

func (*ImageSpec) DeepCopyInto

func (in *ImageSpec) DeepCopyInto(out *ImageSpec)

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) GetDNSPolicy added in v0.2.3

func (s Network) GetDNSPolicy() corev1.DNSPolicy

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

func (in *RackSpec) DeepCopy() *RackSpec

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

func (*RackSpec) DeepCopyInto

func (in *RackSpec) DeepCopyInto(out *RackSpec)

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 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.

Jump to

Keyboard shortcuts

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