Documentation ¶
Overview ¶
+groupName=core.sky.uk
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type CassEnvVar
- type CassEnvVarSource
- type Cassandra
- func (c *Cassandra) CustomConfigMapName() string
- func (in *Cassandra) DeepCopy() *Cassandra
- func (in *Cassandra) DeepCopyInto(out *Cassandra)
- func (in *Cassandra) DeepCopyObject() runtime.Object
- func (c *Cassandra) QualifiedName() string
- func (c *Cassandra) RackName(rack *Rack) string
- func (c *Cassandra) ServiceName() string
- func (c *Cassandra) SnapshotCleanupJobName() string
- func (c *Cassandra) SnapshotJobName() string
- func (c *Cassandra) StorageVolumeName() string
- type CassandraList
- type CassandraSpec
- type CassandraStatus
- type Pod
- type Probe
- type Rack
- type RetentionPolicy
- type Sidecar
- type Snapshot
- type Storage
- type StorageSource
Constants ¶
const ( NodeServiceAccountName = "cassandra-node" SnapshotServiceAccountName = "cassandra-snapshot" // DefaultDatacenterName is the default data center name which each Cassandra pod belongs to DefaultDatacenterName = "dc1" // DefaultCassandraImage is the name of the default Docker image used on Cassandra pods DefaultCassandraImage = "cassandra:3.11" // DefaultCassandraBootstrapperImageName is the name of the Docker image used to prepare the configuration for the Cassandra node before it can be started DefaultCassandraBootstrapperImageName = "cassandra-bootstrapper" // DefaultCassandraSnapshotImageName is the name of the Docker image used to make and cleanup snapshots DefaultCassandraSnapshotImageName = "cassandra-snapshot" // DefaultCassandraSidecarImageName is the name of the Docker image used to inform liveness/readiness probes DefaultCassandraSidecarImageName = "cassandra-sidecar" // DefaultSnapshotTimeoutSeconds is the default for Cassandra.Spec.Snapshot.TimeoutSeconds DefaultSnapshotTimeoutSeconds = 10 // DefaultRetentionPolicyRetentionPeriodDays is the default for Cassandra.Spec.Snapshot.RetentionPolicy.RetentionPeriodDays DefaultRetentionPolicyRetentionPeriodDays = 7 // DefaultRetentionPolicyCleanupTimeoutSeconds is the default for Cassandra.Spec.Snapshot.RetentionPolicy.CleanupTimeoutSeconds DefaultRetentionPolicyCleanupTimeoutSeconds = 10 // DefaultStorageVolumeMountPath is the default location for Cassandra data storage DefaultStorageVolumeMountPath = "/var/lib/cassandra" // ConfigurationVolumeMountPath is the location for Cassandra configuration ConfigurationVolumeMountPath = "/etc/cassandra" // ExtraLibVolumeMountPath is the location for extra libraries required by the operator to function ExtraLibVolumeMountPath = "/extra-lib" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: cassandra.GroupName, Version: "v1alpha1"} // AddToScheme is required in order to register with a clientset. AddToScheme = schemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type CassEnvVar ¶
type CassEnvVar struct { // Name of the environment variable. Must be a C_IDENTIFIER. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // Variable references $(VAR_NAME) are expanded // using the previous defined environment variables in the container and // any service environment variables. If a variable cannot be resolved, // the reference in the input string will be unchanged. The $(VAR_NAME) // syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped // references will never be expanded, regardless of whether the variable // exists or not. // Defaults to "". // +optional Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` // Source for the environment variable's value. Cannot be used if value is not empty. // +optional ValueFrom *CassEnvVarSource `json:"valueFrom,omitempty" protobuf:"bytes,3,opt,name=valueFrom"` }
EnvVar represents an environment variable the operator will add to the Cassandra Container This is almost identical to coreV1.EnvVar, but replaces the type of ValueFrom.
func (*CassEnvVar) DeepCopy ¶
func (in *CassEnvVar) DeepCopy() *CassEnvVar
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassEnvVar.
func (*CassEnvVar) DeepCopyInto ¶
func (in *CassEnvVar) DeepCopyInto(out *CassEnvVar)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (CassEnvVar) Equal ¶
func (cev CassEnvVar) Equal(other CassEnvVar) bool
Equal checks the equality of two CassEnvVar.
type CassEnvVarSource ¶
type CassEnvVarSource struct { // Selects a key of a secret in the pod's namespace SecretKeyRef coreV1.SecretKeySelector `json:"secretKeyRef" protobuf:"bytes,4,name=secretKeyRef"` }
CassEnvVarSource represents a source for the value of an CassEnvVar. This is almost identical to coreV1.EnvVarSource, but is restricted to a required SecretKeyRef
func (*CassEnvVarSource) DeepCopy ¶
func (in *CassEnvVarSource) DeepCopy() *CassEnvVarSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassEnvVarSource.
func (*CassEnvVarSource) DeepCopyInto ¶
func (in *CassEnvVarSource) DeepCopyInto(out *CassEnvVarSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (CassEnvVarSource) Equal ¶
func (cevs CassEnvVarSource) Equal(other CassEnvVarSource) bool
Equal checks the equality of two CassEnvVarSource.
type Cassandra ¶
type Cassandra struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CassandraSpec `json:"spec,omitempty"` Status CassandraStatus `json:"status,omitempty"` }
Cassandra defines a Cassandra cluster +kubebuilder:resource:scope=Namespaced
func (*Cassandra) CustomConfigMapName ¶
CustomConfigMapName returns the expected config map name for this cluster. This will return a value even if the config map does not exist.
func (*Cassandra) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cassandra.
func (*Cassandra) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cassandra) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Cassandra) QualifiedName ¶
QualifiedName is the cluster fully qualified name which follows the format <namespace>.<name>
func (*Cassandra) RackName ¶
RackName is the fully qualifier name of the supplied rack within the cluster
func (*Cassandra) ServiceName ¶
ServiceName is the cluster service name
func (*Cassandra) SnapshotCleanupJobName ¶
SnapshotCleanupJobName is the name of the snapshot cleanup job for the cluster
func (*Cassandra) SnapshotJobName ¶
SnapshotJobName is the name of the snapshot job for the cluster
func (*Cassandra) StorageVolumeName ¶
StorageVolumeName is the name of the volume used for storing Cassandra data
type CassandraList ¶
type CassandraList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Cassandra `json:"items"` }
CassandraList is a list of Cassandra resources
func (*CassandraList) DeepCopy ¶
func (in *CassandraList) DeepCopy() *CassandraList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraList.
func (*CassandraList) DeepCopyInto ¶
func (in *CassandraList) DeepCopyInto(out *CassandraList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CassandraList) DeepCopyObject ¶
func (in *CassandraList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CassandraSpec ¶
type CassandraSpec struct { // The assigned datacenter name for the Cassandra cluster. // +optional Datacenter *string `json:"datacenter,omitempty"` Racks []Rack `json:"racks"` Pod Pod `json:"pod"` // +optional Snapshot *Snapshot `json:"snapshot,omitempty"` }
CassandraSpec is the specification for the Cassandra resource
func (*CassandraSpec) DeepCopy ¶
func (in *CassandraSpec) DeepCopy() *CassandraSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraSpec.
func (*CassandraSpec) DeepCopyInto ¶
func (in *CassandraSpec) DeepCopyInto(out *CassandraSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (CassandraSpec) Equal ¶
func (cs CassandraSpec) Equal(other CassandraSpec) bool
Equal checks equality of two CassandraSpecs. This is useful for checking equality with cmp.Equal
type CassandraStatus ¶
type CassandraStatus struct { }
CassandraStatus is the status for the Cassandra resource
func (*CassandraStatus) DeepCopy ¶
func (in *CassandraStatus) DeepCopy() *CassandraStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraStatus.
func (*CassandraStatus) DeepCopyInto ¶
func (in *CassandraStatus) DeepCopyInto(out *CassandraStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Pod ¶
type Pod struct { // The name of the Docker image used to prepare the configuration for the Cassandra node before it can be started. // +optional BootstrapperImage *string `json:"bootstrapperImage,omitempty"` // The Docker image to run on each Cassandra node in the cluster. It is recommended to use one of the official Cassandra images, version 3 // +optional Image *string `json:"image,omitempty"` Resources coreV1.ResourceRequirements `json:"resources"` // Liveness probe for the cassandra container // +optional LivenessProbe *Probe `json:"livenessProbe,omitempty"` // Readiness probe for the cassandra container // +optional ReadinessProbe *Probe `json:"readinessProbe,omitempty"` // Env variables for the cassandra container // +optional Env *[]CassEnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"` // Sidecar container specification Sidecar *Sidecar `json:"sidecar"` }
Pod corresponds to a Cassandra node.
func (*Pod) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pod.
func (*Pod) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Probe ¶
type Probe struct { // Minimum consecutive failures for the probe to be considered failed after having succeeded. Minimum value is 1. // +optional FailureThreshold *int32 `json:"failureThreshold,omitempty"` // Number of seconds after the container has started before probes are initiated. // +optional InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` // How often (in seconds) to perform the probe. Minimum value is 1. // +optional PeriodSeconds *int32 `json:"periodSeconds,omitempty"` // Minimum consecutive successes for the probe to be considered successful after having failed. // +optional SuccessThreshold *int32 `json:"successThreshold,omitempty"` // Timeout for the probe. // +optional TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` }
Probe represents a scheme for monitoring cassandra nodes status.
func (*Probe) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Probe.
func (*Probe) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Rack ¶
type Rack struct { // Name of the rack. Name string `json:"name"` // Zone in which the rack resides. // This is set against the `failure-domain.beta.kubernetes.io/zone` value in the node affinity rule of the corresponding `StatefulSet`. Zone string `json:"zone"` // The desired number of replicas in the rack. Replicas int32 `json:"replicas"` // The rack storage options. Storage []Storage `json:"storage"` }
Rack defines the rack topology in the cluster, where a rack has a number of replicas located in the same physical grouping (e.g. zone). At least one rack must be supplied.
func (*Rack) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rack.
func (*Rack) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RetentionPolicy ¶
type RetentionPolicy struct { // The period of time for which snapshots will be retained. Snapshots older than this period will be deleted. // +optional RetentionPeriodDays *int32 `json:"retentionPeriodDays,omitempty"` // Crontab expression specifying when snapshot cleanup will run. // It follows the cron format, see https://en.wikipedia.org/wiki/Cron CleanupSchedule string `json:"cleanupSchedule"` // Time limit for the cleanup command to run. // +optional CleanupTimeoutSeconds *int32 `json:"cleanupTimeoutSeconds,omitempty"` // Resource requirements for the Snapshot Cleanup Job Resources coreV1.ResourceRequirements `json:"resources"` }
RetentionPolicy defines how long the snapshots should be kept for and how often the cleanup task should run
func (*RetentionPolicy) DeepCopy ¶
func (in *RetentionPolicy) DeepCopy() *RetentionPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetentionPolicy.
func (*RetentionPolicy) DeepCopyInto ¶
func (in *RetentionPolicy) DeepCopyInto(out *RetentionPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (RetentionPolicy) Equal ¶
func (rp RetentionPolicy) Equal(other RetentionPolicy) bool
Equal checks equality of two RetentionPolicy. This is useful for checking equality with cmp.Equal
type Sidecar ¶
type Sidecar struct { // The Docker image for the sidecar container running on each Cassandra node to expose node status. // +optional Image *string `json:"image,omitempty"` // Resource requirements for the sidecar container Resources coreV1.ResourceRequirements `json:"resources"` }
Sidecar is the specification of a sidecar attached to a Cassandra node
func (*Sidecar) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sidecar.
func (*Sidecar) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Snapshot ¶
type Snapshot struct { // The name of the Docker image used to create and cleanup snapshots. // +optional Image *string `json:"image,omitempty"` // Crontab expression specifying when snapshots will be taken. // It follows the cron format, see https://en.wikipedia.org/wiki/Cron Schedule string `json:"schedule"` // List of keyspaces to snapshot. Leave empty to snapshot all keyspaces. // +optional Keyspaces []string `json:"keyspaces,omitempty"` // Time limit for the snapshot command to run. // +optional TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` // +optional RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` // Resource requirements for the Snapshot job Resources coreV1.ResourceRequirements `json:"resources"` }
Snapshot defines the snapshot creation and deletion configuration
func (*Snapshot) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshot.
func (*Snapshot) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Storage ¶
type Storage struct { // The full path to the volume in the pod Path *string `json:"path,omitempty"` StorageSource `json:",inline"` }
Storage defines the storage properties shared by pods in the same rack. Multiple volume types are available such as `emptyDir` and `persistentVolumeClaim`. The volume types available are expected to be a subset of the volume types defined in `k8s.io/api/core/v1/VolumeSource`. Only one type of volume may be specified.
func (*Storage) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage.
func (*Storage) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageSource ¶
type StorageSource struct { // The volume as a persistent volume of type `k8s.io/api/core/v1/PersistentVolumeClaimSpec` // +optional PersistentVolumeClaim *coreV1.PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"` // The volume as an empty directory of type `k8s.io/api/core/v1/EmptyDirVolumeSource` // +optional EmptyDir *coreV1.EmptyDirVolumeSource `json:"emptyDir,omitempty"` }
StorageSource represents the volume type to use as storage The volume types available are expected to be a subset of the volume types defined in 1k8s.io/api/core/v1/VolumeSource1. Only one of its members may be specified.
func (*StorageSource) DeepCopy ¶
func (in *StorageSource) DeepCopy() *StorageSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSource.
func (*StorageSource) DeepCopyInto ¶
func (in *StorageSource) DeepCopyInto(out *StorageSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.