Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the db v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=db.orange.com
Package v1alpha1 contains API Schema definitions for the db v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=db.orange.com
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- type CPUAndMem
- type CassandraCluster
- func (cc *CassandraCluster) CheckDefaults()
- func (cc *CassandraCluster) ComputeLastAppliedConfiguration() ([]byte, error)
- func (in *CassandraCluster) DeepCopy() *CassandraCluster
- func (in *CassandraCluster) DeepCopyInto(out *CassandraCluster)
- func (in *CassandraCluster) DeepCopyObject() runtime.Object
- func (cc *CassandraCluster) FindDCWithNodesTo0() (bool, string, int)
- func (cc *CassandraCluster) FixCassandraRackList(status *CassandraClusterStatus) []string
- func (cc *CassandraCluster) GetDCAndRackFromDCRackName(dcRackName string) (string, string)
- func (cc *CassandraCluster) GetDCFromDCRackName(dcRackName string) string
- func (cc *CassandraCluster) GetDCIndexFromDCName(dcName string) int
- func (cc *CassandraCluster) GetDCName(dc int) string
- func (cc *CassandraCluster) GetDCNodesPerRacksFromDCRackName(dcRackName string) int32
- func (cc *CassandraCluster) GetDCNodesPerRacksFromName(dctarget string) (bool, int32)
- func (cc *CassandraCluster) GetDCRackName(dcName string, rackName string) string
- func (cc *CassandraCluster) GetDCRackNames() []string
- func (cc *CassandraCluster) GetDCRackSize() int
- func (cc *CassandraCluster) GetDCSize() int
- func (cc *CassandraCluster) GetDataCapacityForDC(dcName string) string
- func (cc *CassandraCluster) GetDataCapacityFromDCName(dcName string) string
- func (cc *CassandraCluster) GetDataStorageClassForDC(dcName string) string
- func (cc *CassandraCluster) GetDataStorageClassFromDCName(dcName string) string
- func (cc *CassandraCluster) GetNodesPerRacks(dcRackName string) int32
- func (cc *CassandraCluster) GetRackName(dc int, rack int) string
- func (cc *CassandraCluster) GetRackSize(dc int) int
- func (cc *CassandraCluster) GetRemovedDCName(oldCRD *CassandraCluster) string
- func (cc *CassandraCluster) GetRollingPartitionPerRacks(dcRackName string) int32
- func (cc *CassandraCluster) GetStatusDCRackSize() int
- func (cc *CassandraCluster) InitCassandraRackList() int
- func (cc *CassandraCluster) InitCassandraRackinStatus(status *CassandraClusterStatus, dcName string, rackName string)
- func (cc *CassandraCluster) InitSeedList() []string
- func (cc *CassandraCluster) IsPodInSeedList(podName string) bool
- func (cc *CassandraCluster) IsValidDC(dcName string) bool
- func (cc *CassandraCluster) NumTokensPerRacks(dcRackName string) int32
- func (cc *CassandraCluster) SeedList(seedListTab *[]string) string
- func (cc *CassandraCluster) SetDefaults() bool
- type CassandraClusterList
- type CassandraClusterSpec
- type CassandraClusterStatus
- type CassandraLastAction
- type CassandraNodeStatus
- type CassandraRackStatus
- type CassandraResources
- type ClusterStateInfo
- type DC
- type DCSlice
- type PodLastOperation
- type PodPolicy
- type Rack
- type RackSlice
- type ServicePolicy
- type StorageConfig
- type Topology
Constants ¶
const ( DefaultLivenessInitialDelaySeconds int32 = 120 DefaultLivenessHealthCheckTimeout int32 = 20 DefaultLivenessHealthCheckPeriod int32 = 10 DefaultReadinessInitialDelaySeconds int32 = 60 DefaultReadinessHealthCheckTimeout int32 = 10 DefaultReadinessHealthCheckPeriod int32 = 10 InitContainerCmd string = "cp -vr /etc/cassandra/* /bootstrap" DefaultCassandraDC string = "dc1" DefaultCassandraRack string = "rack1" DefaultTerminationGracePeriodSeconds = 1800 //DefaultDelayWait: wait 20 seconds (2x resyncPeriod) prior to follow status of an operation DefaultResyncPeriod = 10 DefaultDelayWait = 2 * DefaultResyncPeriod //DefaultDelayWaitForDecommission is the time to wait for the decommission to happen on the Pod //The operator will start again if it is not the case DefaultDelayWaitForDecommission = 120 //DefaultUserID is the default ID to use in cassandra image (RunAsUser) DefaultUserID int64 = 999 )
const ( AnnotationLastApplied string = "cassandraclusters.db.orange.com/last-applied-configuration" StatusOngoing string = "Ongoing" // The Action is Ongoing StatusDone string = "Done" // The Action id Done StatusToDo string = "ToDo" // The Action is marked as To-Do StatusFinalizing string = "Finalizing" // The Action is between Ongoing and Done StatusContinue string = "Continue" StatusConfiguring string = "Configuring" StatusManual string = "Manual" StatusError string = "Error" //List of Pods Operations OperationUpgradeSSTables string = "upgradesstables" OperationCleanup string = "cleanup" OperationDecommission string = "decommission" OperationRebuild string = "rebuild" OperationRemove string = "remove" BreakResyncLoop = true ContinueResyncLoop = false )
Variables ¶
var ( //Cluster phases ClusterPhaseInitial = ClusterStateInfo{1, "Initializing"} ClusterPhaseRunning = ClusterStateInfo{2, "Running"} ClusterPhasePending = ClusterStateInfo{3, "Pending"} //Available actions ActionUpdateConfigMap = ClusterStateInfo{1, "UpdateConfigMap"} ActionUpdateDockerImage = ClusterStateInfo{2, "UpdateDockerImage"} ActionUpdateSeedList = ClusterStateInfo{3, "UpdateSeedList"} ActionRollingRestart = ClusterStateInfo{4, "RollingRestart"} ActionUpdateResources = ClusterStateInfo{5, "UpdateResources"} ActionUpdateStatefulSet = ClusterStateInfo{6, "UpdateStatefulSet"} ActionScaleUp = ClusterStateInfo{7, "ScaleUp"} ActionScaleDown = ClusterStateInfo{8, "ScaleDown"} ActionDeleteDC = ClusterStateInfo{9, "ActionDeleteDC"} ActionDeleteRack = ClusterStateInfo{10, "ActionDeleteRack"} ActionCorrectCRDConfig = ClusterStateInfo{11, "CorrectCRDConfig"} //The Operator has correct a bad CRD configuration )
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "db.orange.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
Types ¶
type CPUAndMem ¶
type CPUAndMem struct { // +kubebuilder:validation:Pattern=^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$ CPU string `json:"cpu"` // +kubebuilder:validation:Pattern=^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$ Memory string `json:"memory"` }
CPUAndMem defines how many cpu and ram the container will request/limit
func (*CPUAndMem) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUAndMem.
func (*CPUAndMem) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CassandraCluster ¶
type CassandraCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CassandraClusterSpec `json:"spec,omitempty"` Status CassandraClusterStatus `json:"status,omitempty"` }
CassandraCluster is the Schema for the cassandraclusters API +k8s:openapi-gen=true +kubebuilder:storageversion
func (*CassandraCluster) CheckDefaults ¶
func (cc *CassandraCluster) CheckDefaults()
CheckDefaults checks that required fields haven't good values
func (*CassandraCluster) ComputeLastAppliedConfiguration ¶
func (cc *CassandraCluster) ComputeLastAppliedConfiguration() ([]byte, error)
func (*CassandraCluster) DeepCopy ¶
func (in *CassandraCluster) DeepCopy() *CassandraCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraCluster.
func (*CassandraCluster) DeepCopyInto ¶
func (in *CassandraCluster) DeepCopyInto(out *CassandraCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CassandraCluster) DeepCopyObject ¶
func (in *CassandraCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CassandraCluster) FindDCWithNodesTo0 ¶
func (cc *CassandraCluster) FindDCWithNodesTo0() (bool, string, int)
FindDCWithNodesTo0
func (*CassandraCluster) FixCassandraRackList ¶
func (cc *CassandraCluster) FixCassandraRackList(status *CassandraClusterStatus) []string
FixCassandraRackList will remove additional rack-list that don't exists anymore in Topology we recalculate new dcrackStatus from actual topology and we apply diff to original
func (*CassandraCluster) GetDCAndRackFromDCRackName ¶
func (cc *CassandraCluster) GetDCAndRackFromDCRackName(dcRackName string) (string, string)
GetDCAndRackFromDCRackName send dc and rack from dcRackName (dc-rack)
func (*CassandraCluster) GetDCFromDCRackName ¶
func (cc *CassandraCluster) GetDCFromDCRackName(dcRackName string) string
GetDCFromDCRackName send dc name from dcRackName (dc-rack)
func (*CassandraCluster) GetDCIndexFromDCName ¶
func (cc *CassandraCluster) GetDCIndexFromDCName(dcName string) int
func (*CassandraCluster) GetDCName ¶
func (cc *CassandraCluster) GetDCName(dc int) string
GetDCName return the name of the DC a indice dc or defaultName
func (*CassandraCluster) GetDCNodesPerRacksFromDCRackName ¶
func (cc *CassandraCluster) GetDCNodesPerRacksFromDCRackName(dcRackName string) int32
GetDCNodesPerRacksFromDCRackName send NodesPerRack used for the given dcRackName
func (*CassandraCluster) GetDCNodesPerRacksFromName ¶
func (cc *CassandraCluster) GetDCNodesPerRacksFromName(dctarget string) (bool, int32)
GetDCNodesPerRacksFromName send NodesPerRack which is applied for the specified dc name return true if we found, and false if not
func (*CassandraCluster) GetDCRackName ¶
func (cc *CassandraCluster) GetDCRackName(dcName string, rackName string) string
GetDCRackName compute dcName + RackName to be used in statefulsets, services.. it return empty if the name don't match with kubernetes domain name validation regexp
func (*CassandraCluster) GetDCRackNames ¶
func (cc *CassandraCluster) GetDCRackNames() []string
GetDCNodesPerRacksFromDCRackName send NodesPerRack used for the given dcRackName
func (*CassandraCluster) GetDCRackSize ¶
func (cc *CassandraCluster) GetDCRackSize() int
func (*CassandraCluster) GetDCSize ¶
func (cc *CassandraCluster) GetDCSize() int
GetDCSize Return the Numbers of declared DC
func (*CassandraCluster) GetDataCapacityForDC ¶
func (cc *CassandraCluster) GetDataCapacityForDC(dcName string) string
GetDataCapacityForDC sends back the data capacity of cassandra nodes to uses for this dc
func (*CassandraCluster) GetDataCapacityFromDCName ¶
func (cc *CassandraCluster) GetDataCapacityFromDCName(dcName string) string
GetDataCapacityFromDCName send DataCapacity used for the given dcName
func (*CassandraCluster) GetDataStorageClassForDC ¶
func (cc *CassandraCluster) GetDataStorageClassForDC(dcName string) string
GetDataCapacityForDC sends back the data storage class of cassandra nodes to uses for this dc
func (*CassandraCluster) GetDataStorageClassFromDCName ¶
func (cc *CassandraCluster) GetDataStorageClassFromDCName(dcName string) string
GetDataCapacityFromDCName send DataStorageClass used for the given dcName
func (*CassandraCluster) GetNodesPerRacks ¶
func (cc *CassandraCluster) GetNodesPerRacks(dcRackName string) int32
GetNodesPerRacks sends back the number of cassandra nodes to uses for this dc-rack
func (*CassandraCluster) GetRackName ¶
func (cc *CassandraCluster) GetRackName(dc int, rack int) string
GetRackName return the Name of the rack for DC at index dc and Rack at index rack
func (*CassandraCluster) GetRackSize ¶
func (cc *CassandraCluster) GetRackSize(dc int) int
GetRackSize return the numbers of the Rack in the DC at indice dc
func (*CassandraCluster) GetRemovedDCName ¶
func (cc *CassandraCluster) GetRemovedDCName(oldCRD *CassandraCluster) string
func (*CassandraCluster) GetRollingPartitionPerRacks ¶
func (cc *CassandraCluster) GetRollingPartitionPerRacks(dcRackName string) int32
GetRollingPartitionPerRacks return rollingPartition defined in spec.topology.dc[].rack[].rollingPartition
func (*CassandraCluster) GetStatusDCRackSize ¶
func (cc *CassandraCluster) GetStatusDCRackSize() int
func (*CassandraCluster) InitCassandraRackList ¶
func (cc *CassandraCluster) InitCassandraRackList() int
InitCassandraRackList initiate the Status structure for CassandraRack
func (*CassandraCluster) InitCassandraRackinStatus ¶
func (cc *CassandraCluster) InitCassandraRackinStatus(status *CassandraClusterStatus, dcName string, rackName string)
InitCassandraRack Initialisation of a CassandraRack Structure which is appended to the CRD status In this method we create it in status var instead of directly in cc object This is because except for init the cc, ca always work with a separate status which updates the cc in a defer statement in Reconcile method
func (*CassandraCluster) InitSeedList ¶
func (cc *CassandraCluster) InitSeedList() []string
Initialisation of the Cassandra SeedList We want 3 seed nodes for each DC
func (*CassandraCluster) IsPodInSeedList ¶
func (cc *CassandraCluster) IsPodInSeedList(podName string) bool
func (*CassandraCluster) IsValidDC ¶
func (cc *CassandraCluster) IsValidDC(dcName string) bool
IsValidDC returns true if dcName is known
func (*CassandraCluster) NumTokensPerRacks ¶
func (cc *CassandraCluster) NumTokensPerRacks(dcRackName string) int32
GetNodesPerRacks sends back the number of cassandra nodes to uses for this dc-rack
func (*CassandraCluster) SeedList ¶
func (cc *CassandraCluster) SeedList(seedListTab *[]string) string
func (*CassandraCluster) SetDefaults ¶
func (cc *CassandraCluster) SetDefaults() bool
SetDefaults sets the default values for the cassandra spec and returns true if the spec was changed SetDefault mus be done only once at startup
type CassandraClusterList ¶
type CassandraClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []CassandraCluster `json:"items"` }
CassandraClusterList contains a list of CassandraCluster
func (*CassandraClusterList) DeepCopy ¶
func (in *CassandraClusterList) DeepCopy() *CassandraClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraClusterList.
func (*CassandraClusterList) DeepCopyInto ¶
func (in *CassandraClusterList) DeepCopyInto(out *CassandraClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CassandraClusterList) DeepCopyObject ¶
func (in *CassandraClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CassandraClusterSpec ¶
type CassandraClusterSpec struct { // Number of nodes to deploy for a Cassandra deployment in each Racks. // Default: 1. // If NodesPerRacks = 2 and there is 3 racks, the cluster will have 6 Cassandra Nodes NodesPerRacks int32 `json:"nodesPerRacks,omitempty"` // Image + version to use for Cassandra CassandraImage string `json:"cassandraImage,omitempty"` //ImagePullPolicy define the pull policy for C* docker image ImagePullPolicy v1.PullPolicy `json:"imagepullpolicy,omitempty"` // Image used for bootstrapping cluster (use the form : base:version) BootstrapImage string `json:"bootstrapImage,omitempty"` // Image used in the initContainer (use the form : base:version) InitContainerImage string `json:"initContainerImage,omitempty"` // Command to execute in the initContainer in the targeted image InitContainerCmd string `json:"initContainerCmd,omitempty"` // RunAsUser define the id of the user to run in the Cassandra image // +kubebuilder:validation:Minimum=1 RunAsUser *int64 `json:"runAsUser,omitempty"` // Make the pod as Readonly ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"` // Pod defines the policy for pods owned by cassandra operator. // This field cannot be updated once the CR is created. //Pod *PodPolicy `json:"pod,omitempty"` Resources CassandraResources `json:"resources,omitempty"` // HardAntiAffinity defines if the PodAntiAffinity of the // statefulset has to be hard (it's soft by default) HardAntiAffinity bool `json:"hardAntiAffinity,omitempty"` Pod *PodPolicy `json:"pod,omitempty"` Service *ServicePolicy `json:"service,omitempty"` //DeletePVC defines if the PVC must be deleted when the cluster is deleted //it is false by default DeletePVC bool `json:"deletePVC,omitempty"` //Debug is used to surcharge Cassandra pod command to not directly start cassandra but //starts an infinite wait to allow user to connect a bash into the pod to make some diagnoses. Debug bool `json:"debug,omitempty"` //AutoPilot defines if the Operator can fly alone or if we need human action to trigger //Actions on specific Cassandra nodes //If autoPilot=true, the operator will set labels pod-operation-status=To-Do on Pods which allows him to // automatically triggers Action //If autoPilot=false, the operator will set labels pod-operation-status=Manual on Pods which won't automatically triggers Action AutoPilot bool `json:"autoPilot,omitempty"` NoCheckStsAreEqual bool `json:"noCheckStsAreEqual,omitempty"` //GCStdout set the parameter CASSANDRA_GC_STDOUT which configure the JVM -Xloggc: true by default GCStdout bool `json:"gcStdout,omitempty" default:"true"` //AutoUpdateSeedList defines if the Operator automatically update the SeedList according to new cluster CRD topology //by default a boolean is false AutoUpdateSeedList bool `json:"autoUpdateSeedList,omitempty"` // RestartCountBeforePodDeletion defines the number of restart allowed for a cassandra container allowed before // deleting the pod to force its restart from scratch. if set to 0 or omit, // no action will be performed based on restart count. RestartCountBeforePodDeletion int32 `json:"restartCountBeforePodDeletion,omitempty"` // Very special Flag to hack CassKop reconcile loop - use with really good Care UnlockNextOperation bool `json:"unlockNextOperation,omitempty"` // Define the Capacity for Persistent Volume Claims in the local storage // +kubebuilder:validation:Pattern=^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$ DataCapacity string `json:"dataCapacity,omitempty"` //Define StorageClass for Persistent Volume Claims in the local storage. DataStorageClass string `json:"dataStorageClass,omitempty"` // StorageConfig defines additional storage configurations StorageConfigs []StorageConfig `json:"storageConfigs,omitempty"` // SidecarsConfig defines additional sidecar configurations SidecarConfigs []v1.Container `json:"sidecarConfigs,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=containers"` // Name of the ConfigMap for Cassandra configuration (cassandra.yaml) // If this is empty, operator will uses default cassandra.yaml from the baseImage // If this is not empty, operator will uses the cassandra.yaml from the Configmap instead ConfigMapName string `json:"configMapName,omitempty"` // Name of the secret to uses to authenticate on Docker registries // If this is empty, operator do nothing // If this is not empty, propagate the imagePullSecrets to the statefulsets ImagePullSecret v1.LocalObjectReference `json:"imagePullSecret,omitempty"` // JMX Secret if Set is used to set JMX_USER and JMX_PASSWORD ImageJolokiaSecret v1.LocalObjectReference `json:"imageJolokiaSecret,omitempty"` //Topology to create Cassandra DC and Racks and to target appropriate Kubernetes Nodes Topology Topology `json:"topology,omitempty"` // LivenessInitialDelaySeconds defines initial delay for the liveness probe of the main // cassandra container : https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes LivenessInitialDelaySeconds *int32 `json:"livenessInitialDelaySeconds,omitempty"` // LivenessHealthCheckTimeout defines health check timeout for the liveness probe of the main // cassandra container : https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes LivenessHealthCheckTimeout *int32 `json:"livenessHealthCheckTimeout,omitempty"` // LivenessHealthCheckPeriod defines health check period for the liveness probe of the main // cassandra container : https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes LivenessHealthCheckPeriod *int32 `json:"livenessHealthCheckPeriod,omitempty"` // LivenessFailureThreshold defines failure threshold for the liveness probe of the main // cassandra container : https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes LivenessFailureThreshold *int32 `json:"livenessFailureThreshold,omitempty"` //LivenessSuccessThreshold defines success threshold for the liveness probe of the main // cassandra container : https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes LivenessSuccessThreshold *int32 `json:"livenessSuccessThreshold,omitempty"` // ReadinessInitialDelaySeconds defines initial delay for the readiness probe of the main // cassandra container : https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes ReadinessInitialDelaySeconds *int32 `json:"readinessInitialDelaySeconds,omitempty"` // ReadinessHealthCheckTimeout defines health check timeout for the readiness probe of the main // cassandra container : https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes ReadinessHealthCheckTimeout *int32 `json:"readinessHealthCheckTimeout,omitempty"` // ReadinessHealthCheckPeriod defines health check period for the readiness probe of the main // cassandra container : https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes ReadinessHealthCheckPeriod *int32 `json:"readinessHealthCheckPeriod,omitempty"` // ReadinessFailureThreshold defines failure threshold for the readiness probe of the main // cassandra container : https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes ReadinessFailureThreshold *int32 `json:"readinessFailureThreshold,omitempty"` // ReadinessSuccessThreshold defines success threshold for the readiness probe of the main // cassandra container : https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes ReadinessSuccessThreshold *int32 `json:"readinessSuccessThreshold,omitempty"` // https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ // Optional: Default to false. // +k8s:conversion-gen=false // +optional ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty" protobuf:"varint,27,opt,name=shareProcessNamespace"` }
func (*CassandraClusterSpec) DeepCopy ¶
func (in *CassandraClusterSpec) DeepCopy() *CassandraClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraClusterSpec.
func (*CassandraClusterSpec) DeepCopyInto ¶
func (in *CassandraClusterSpec) DeepCopyInto(out *CassandraClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CassandraClusterStatus ¶
type CassandraClusterStatus struct { // Phase indicates the state this Cassandra cluster jumps in. // Phase goes as one way as below: // Initial -> Running <-> updating Phase string `json:"phase,omitempty"` // Store last action at cluster level LastClusterAction string `json:"lastClusterAction,omitempty"` LastClusterActionStatus string `json:"lastClusterActionStatus,omitempty"` //seeList to be used in Cassandra's Pods (computed by the Operator) SeedList []string `json:"seedlist,omitempty"` // CassandraNodesStatus map[string]CassandraNodeStatus `json:"cassandraNodeStatus,omitempty"` //CassandraRackStatusList list status for each Rack CassandraRackStatus map[string]*CassandraRackStatus `json:"cassandraRackStatus,omitempty"` }
CassandraClusterStatus defines Global state of CassandraCluster
func (*CassandraClusterStatus) DeepCopy ¶
func (in *CassandraClusterStatus) DeepCopy() *CassandraClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraClusterStatus.
func (*CassandraClusterStatus) DeepCopyInto ¶
func (in *CassandraClusterStatus) DeepCopyInto(out *CassandraClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CassandraLastAction ¶
type CassandraLastAction struct { // Action is the specific actions that can be done on a Cassandra Cluster // such as cleanup, upgradesstables.. Status string `json:"status,omitempty"` // Type of action to perform : UpdateVersion, UpdateBaseImage, UpdateConfigMap.. Name string `json:"name,omitempty"` StartTime *metav1.Time `json:"startTime,omitempty"` EndTime *metav1.Time `json:"endTime,omitempty"` // PodNames of updated Cassandra nodes. Updated means the Cassandra container image version // matches the spec's version. UpdatedNodes []string `json:"updatedNodes,omitempty"` }
CassandraLastAction defines status of the CassandraStatefulset
func (*CassandraLastAction) DeepCopy ¶
func (in *CassandraLastAction) DeepCopy() *CassandraLastAction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraLastAction.
func (*CassandraLastAction) DeepCopyInto ¶
func (in *CassandraLastAction) DeepCopyInto(out *CassandraLastAction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CassandraNodeStatus ¶
type CassandraNodeStatus struct { HostId string `json:"hostId,omitempty"` NodeIp string `json:"nodeIp,omitempty"` }
func (*CassandraNodeStatus) DeepCopy ¶
func (in *CassandraNodeStatus) DeepCopy() *CassandraNodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraNodeStatus.
func (*CassandraNodeStatus) DeepCopyInto ¶
func (in *CassandraNodeStatus) DeepCopyInto(out *CassandraNodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CassandraRackStatus ¶
type CassandraRackStatus struct { // Phase indicates the state this Cassandra cluster jumps in. // Phase goes as one way as below: // Initial -> Running <-> updating Phase string `json:"phase,omitempty"` // CassandraLastAction is the set of Cassandra State & Actions: Active, Standby.. CassandraLastAction CassandraLastAction `json:"cassandraLastAction,omitempty"` // PodLastOperation manage status for Pod Operation (nodetool cleanup, upgradesstables..) PodLastOperation PodLastOperation `json:"podLastOperation,omitempty"` }
CassandraRackStatus defines states of Cassandra for 1 rack (1 statefulset)
func (*CassandraRackStatus) DeepCopy ¶
func (in *CassandraRackStatus) DeepCopy() *CassandraRackStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraRackStatus.
func (*CassandraRackStatus) DeepCopyInto ¶
func (in *CassandraRackStatus) DeepCopyInto(out *CassandraRackStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CassandraResources ¶
type CassandraResources struct { Requests CPUAndMem `json:"requests,omitempty"` Limits CPUAndMem `json:"limits,omitempty"` }
CassandraClusterResources sets the limits and requests for a container
func (*CassandraResources) DeepCopy ¶
func (in *CassandraResources) DeepCopy() *CassandraResources
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraResources.
func (*CassandraResources) DeepCopyInto ¶
func (in *CassandraResources) DeepCopyInto(out *CassandraResources)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterStateInfo ¶
func (*ClusterStateInfo) DeepCopy ¶
func (in *ClusterStateInfo) DeepCopy() *ClusterStateInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStateInfo.
func (*ClusterStateInfo) DeepCopyInto ¶
func (in *ClusterStateInfo) DeepCopyInto(out *ClusterStateInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DC ¶
type DC struct { //Name of the DC // +kubebuilder:validation:Pattern=^[^-]+$ Name string `json:"name,omitempty"` //Labels used to target Kubernetes nodes Labels map[string]string `json:"labels,omitempty"` //List of Racks defined in the Cassandra DC Rack RackSlice `json:"rack,omitempty"` // Number of nodes to deploy for a Cassandra deployment in each Racks. // Default: 1. // Optional, if not filled, used value define in CassandraClusterSpec NodesPerRacks *int32 `json:"nodesPerRacks,omitempty"` //NumTokens : configure the CASSANDRA_NUM_TOKENS parameter which can be different for each DD NumTokens *int32 `json:"numTokens,omitempty"` // Define the Capacity for Persistent Volume Claims in the local storage // +kubebuilder:validation:Pattern=^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$ DataCapacity string `json:"dataCapacity,omitempty"` //Define StorageClass for Persistent Volume Claims in the local storage. DataStorageClass string `json:"dataStorageClass,omitempty"` }
DC allow to configure Cassandra RC according to kubernetes nodeselector labels
func (*DC) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DC.
func (*DC) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DCSlice ¶
type DCSlice []DC
func (DCSlice) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DCSlice.
func (DCSlice) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodLastOperation ¶
type PodLastOperation struct { Name string `json:"name,omitempty"` Status string `json:"status,omitempty"` StartTime *metav1.Time `json:"startTime,omitempty"` EndTime *metav1.Time `json:"endTime,omitempty"` //List of pods running an operation Pods []string `json:"pods,omitempty"` //List of pods that run an operation successfully PodsOK []string `json:"podsOK,omitempty"` //List of pods that fail to run an operation PodsKO []string `json:"podsKO,omitempty"` // Name of operator OperatorName string `json:"operatorName,omitempty"` }
PodLastOperation is managed via labels on Pods set by an administrator
func (*PodLastOperation) DeepCopy ¶
func (in *PodLastOperation) DeepCopy() *PodLastOperation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodLastOperation.
func (*PodLastOperation) DeepCopyInto ¶
func (in *PodLastOperation) DeepCopyInto(out *PodLastOperation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodPolicy ¶
type PodPolicy struct { // Annotations specifies the annotations to attach to headless service the CassKop operator creates Annotations map[string]string `json:"annotations,omitempty"` // Tolerations specifies the tolerations to attach to the pods the CassKop operator creates Tolerations []v1.Toleration `json:"tolerations,omitempty"` }
PodPolicy defines the policy for pods owned by CassKop operator.
func (*PodPolicy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodPolicy.
func (*PodPolicy) 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 // +kubebuilder:validation:Pattern=^[^-]+$ Name string `json:"name,omitempty"` // Flag to tell the operator to trigger a rolling restart of the Rack RollingRestart bool `json:"rollingRestart,omitempty"` //The Partition to control the Statefulset Upgrade RollingPartition int32 `json:"rollingPartition,omitempty"` //Labels used to target Kubernetes nodes Labels map[string]string `json:"labels,omitempty"` }
Rack allow to configure Cassandra Rack according to kubernetes nodeselector labels
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 RackSlice ¶
type RackSlice []Rack
func (RackSlice) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RackSlice.
func (RackSlice) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServicePolicy ¶
type ServicePolicy struct { // Annotations specifies the annotations to attach to headless service the CassKop operator creates Annotations map[string]string `json:"annotations,omitempty"` }
PodPolicy defines the policy for headless service owned by CassKop operator.
func (*ServicePolicy) DeepCopy ¶
func (in *ServicePolicy) DeepCopy() *ServicePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServicePolicy.
func (*ServicePolicy) DeepCopyInto ¶
func (in *ServicePolicy) DeepCopyInto(out *ServicePolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageConfig ¶
type StorageConfig struct { // Mount path into cassandra container MountPath string `json:"mountPath"` // Name of the pvc // +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"` // Persistent volume claim spec PVCSpec *v1.PersistentVolumeClaimSpec `json:"pvcSpec"` }
StorageConfig defines additional storage configurations
func (*StorageConfig) DeepCopy ¶
func (in *StorageConfig) DeepCopy() *StorageConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageConfig.
func (*StorageConfig) DeepCopyInto ¶
func (in *StorageConfig) DeepCopyInto(out *StorageConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Topology ¶
type Topology struct { //List of DC defined in the CassandraCluster DC DCSlice `json:"dc,omitempty"` }
Topology allow to configure the Cassandra Topology according to kubernetes Nodes labels
func (*Topology) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Topology.
func (*Topology) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.