Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the cassandra.datastax.com v1beta1 API group +kubebuilder:object:generate=true +groupName=cassandra.datastax.com
Index ¶
- Constants
- Variables
- func CleanLabelValue(value string) string
- func CleanupForKubernetes(input string) string
- func CleanupSubdomain(input string) string
- func SplitRacks(nodeCount, rackCount int) []int
- func ValidateAdditionalVolumes(dc CassandraDatacenter) error
- func ValidateDatacenterFieldChanges(oldDc CassandraDatacenter, newDc CassandraDatacenter) error
- func ValidateDeprecatedFieldUsage(dc CassandraDatacenter) error
- func ValidateFQLConfig(dc CassandraDatacenter) error
- func ValidateServiceLabelsAndAnnotations(dc CassandraDatacenter) error
- func ValidateSingleDatacenter(dc CassandraDatacenter) error
- type AdditionalVolumes
- type AdditionalVolumesSlice
- type CDCConfiguration
- type CassandraDatacenter
- func (dc *CassandraDatacenter) DatacenterName() string
- func (in *CassandraDatacenter) DeepCopy() *CassandraDatacenter
- func (in *CassandraDatacenter) DeepCopyInto(out *CassandraDatacenter)
- func (in *CassandraDatacenter) DeepCopyObject() runtime.Object
- func (dc *CassandraDatacenter) Default()
- func (dc *CassandraDatacenter) DeploymentSupportsFQL() bool
- func (dc *CassandraDatacenter) FullQueryEnabled() (bool, error)
- func (dc *CassandraDatacenter) GetAdditionalSeedsServiceName() string
- func (dc *CassandraDatacenter) GetAllPodsServiceName() string
- func (dc *CassandraDatacenter) GetClusterLabels() map[string]string
- func (dc *CassandraDatacenter) GetCondition(conditionType DatacenterConditionType) (DatacenterCondition, bool)
- func (dc *CassandraDatacenter) GetConditionStatus(conditionType DatacenterConditionType) corev1.ConditionStatus
- func (dc *CassandraDatacenter) GetConfigAsJSON(config []byte) (string, error)
- func (dc *CassandraDatacenter) GetConfigBuilderImage() string
- func (dc *CassandraDatacenter) GetContainerPorts() ([]corev1.ContainerPort, error)
- func (dc *CassandraDatacenter) GetDatacenterLabels() map[string]string
- func (dc *CassandraDatacenter) GetDatacenterServiceName() string
- func (dc *CassandraDatacenter) GetNodePortInternodePort() int
- func (dc *CassandraDatacenter) GetNodePortNativePort() int
- func (dc *CassandraDatacenter) GetNodePortServiceName() string
- func (dc *CassandraDatacenter) GetRack(rackName string) Rack
- func (dc *CassandraDatacenter) GetRackLabels(rackName string) map[string]string
- func (dc *CassandraDatacenter) GetRacks() []Rack
- func (dc *CassandraDatacenter) GetSeedServiceName() string
- func (dc *CassandraDatacenter) GetServerImage() string
- func (dc *CassandraDatacenter) GetSuperuserSecretNamespacedName() types.NamespacedName
- func (dc *CassandraDatacenter) IsHostNetworkEnabled() bool
- func (dc *CassandraDatacenter) IsNodePortEnabled() bool
- func (dc *CassandraDatacenter) LegacyInternodeEnabled() bool
- func (dc *CassandraDatacenter) SanitizedName() string
- func (dc *CassandraDatacenter) SetCondition(condition DatacenterCondition)
- func (dc *CassandraDatacenter) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (dc *CassandraDatacenter) ShouldGenerateSuperuserSecret() bool
- func (dc *CassandraDatacenter) ValidateCreate() error
- func (dc *CassandraDatacenter) ValidateDelete() error
- func (dc *CassandraDatacenter) ValidateUpdate(old runtime.Object) error
- type CassandraDatacenterList
- type CassandraDatacenterSpec
- type CassandraDatacenterStatus
- func (status *CassandraDatacenterStatus) AddTaskToTrack(objectMeta metav1.ObjectMeta)
- func (in *CassandraDatacenterStatus) DeepCopy() *CassandraDatacenterStatus
- func (in *CassandraDatacenterStatus) DeepCopyInto(out *CassandraDatacenterStatus)
- func (status *CassandraDatacenterStatus) GetConditionStatus(conditionType DatacenterConditionType) corev1.ConditionStatus
- func (status *CassandraDatacenterStatus) RemoveTrackedTask(objectMeta metav1.ObjectMeta)
- func (status *CassandraDatacenterStatus) SetCondition(condition DatacenterCondition)
- type CassandraNodeStatus
- type CassandraStatusMap
- type CassandraUser
- type DatacenterCondition
- type DatacenterConditionType
- type DseWorkloads
- type ManagementApiAuthConfig
- type ManagementApiAuthInsecureConfig
- type ManagementApiAuthManualConfig
- type NetworkingConfig
- type NodePortConfig
- type ProgressState
- type Rack
- type ServiceConfig
- type ServiceConfigAdditions
- type StorageConfig
Constants ¶
const ( // ClusterLabel is the operator's label for the cluster name ClusterLabel = "cassandra.datastax.com/cluster" // DatacenterLabel is the operator's label for the datacenter name DatacenterLabel = "cassandra.datastax.com/datacenter" // SeedNodeLabel is the operator's label for the seed node state SeedNodeLabel = "cassandra.datastax.com/seed-node" // RackLabel is the operator's label for the rack name RackLabel = "cassandra.datastax.com/rack" CassOperatorProgressLabel = "cassandra.datastax.com/operator-progress" // PromMetricsLabel is a service label that can be selected for prometheus metrics scraping PromMetricsLabel = "cassandra.datastax.com/prom-metrics" // DatacenterAnnotation is the operator's annotation for the datacenter name DatacenterAnnotation = DatacenterLabel // ConfigHashAnnotation is the operator's annotation for the hash of the ConfigSecret ConfigHashAnnotation = "cassandra.datastax.com/config-hash" // SkipUserCreationAnnotation tells the operator to skip creating any Cassandra users // including the default superuser. This is for multi-dc deployments when adding a // DC to an existing cluster where the superuser has already been created. SkipUserCreationAnnotation = "cassandra.datastax.com/skip-user-creation" // DecommissionOnDeleteAnnotation allows to decommissioning of the Datacenter in a multi-DC cluster when the // CassandraDatacenter is deleted. DecommissionOnDeleteAnnotation = "cassandra.datastax.com/decommission-on-delete" // NoFinalizerAnnotation prevents cass-operator from re-adding the finalizer to managed objects if finalizer is // removed. Removing finalizer means deletion is not processed as usual. NoFinalizerAnnotation = "cassandra.datastax.com/no-finalizer" // Finalizer is the finalizer set by cass-operator to the resources it wants to prevent from being deleted. // If no finalizer is set, the cass-operator ProcessDeletion() is not run Finalizer = "finalizer.cassandra.datastax.com" // NoAutomatedCleanUpAnnotation prevents the cass-operator from creating a CassandraTask to do cleanup after the // cluster has gone through scale up operation. NoAutomatedCleanupAnnotation = "cassandra.datastax.com/no-cleanup" CassNodeState = "cassandra.datastax.com/node-state" ProgressUpdating ProgressState = "Updating" ProgressReady ProgressState = "Ready" DefaultNativePort = 9042 DefaultInternodePort = 7000 )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "cassandra.datastax.com", Version: "v1beta1"} // 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 (
ErrFQLNotSupported = fmt.Errorf("full query logging is only supported on OSS Cassandra 4.0+")
)
Functions ¶
func CleanLabelValue ¶ added in v1.10.5
CleanLabelValue a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric. Note: we apply a prefix of "cassandra-" to the cluster name value used as label name. As such, empty string isn't a valid case.
func CleanupForKubernetes ¶ added in v1.9.0
func CleanupSubdomain ¶ added in v1.10.6
func SplitRacks ¶
func ValidateAdditionalVolumes ¶ added in v1.14.0
func ValidateAdditionalVolumes(dc CassandraDatacenter) error
func ValidateDatacenterFieldChanges ¶
func ValidateDatacenterFieldChanges(oldDc CassandraDatacenter, newDc CassandraDatacenter) error
ValidateDatacenterFieldChanges checks that no values are improperly changing while updating a CassandraDatacenter
func ValidateDeprecatedFieldUsage ¶ added in v1.14.0
func ValidateDeprecatedFieldUsage(dc CassandraDatacenter) error
ValidateDeprecatedFieldUsage prevents adding fields that are deprecated
func ValidateFQLConfig ¶ added in v1.9.0
func ValidateFQLConfig(dc CassandraDatacenter) error
func ValidateServiceLabelsAndAnnotations ¶ added in v1.10.5
func ValidateServiceLabelsAndAnnotations(dc CassandraDatacenter) error
func ValidateSingleDatacenter ¶
func ValidateSingleDatacenter(dc CassandraDatacenter) error
ValidateSingleDatacenter checks that no values are improperly set on a CassandraDatacenter
Types ¶
type AdditionalVolumes ¶
type AdditionalVolumes struct { // Mount path into cassandra container MountPath string `json:"mountPath"` // Name of the pvc / volume // +kubebuilder:validation:Pattern=[a-z0-9]([-a-z0-9]*[a-z0-9])? Name string `json:"name"` // PVCSpec is a persistent volume claim spec. Either this or VolumeSource is required. PVCSpec *corev1.PersistentVolumeClaimSpec `json:"pvcSpec,omitempty"` // VolumeSource to mount the volume from (such as ConfigMap / Secret). This or PVCSpec is required. VolumeSource *corev1.VolumeSource `json:"volumeSource,omitempty"` }
AdditionalVolumes defines additional storage configurations
func (*AdditionalVolumes) DeepCopy ¶
func (in *AdditionalVolumes) DeepCopy() *AdditionalVolumes
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalVolumes.
func (*AdditionalVolumes) DeepCopyInto ¶
func (in *AdditionalVolumes) DeepCopyInto(out *AdditionalVolumes)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdditionalVolumesSlice ¶
type AdditionalVolumesSlice []AdditionalVolumes
func (AdditionalVolumesSlice) DeepCopy ¶
func (in AdditionalVolumesSlice) DeepCopy() AdditionalVolumesSlice
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalVolumesSlice.
func (AdditionalVolumesSlice) DeepCopyInto ¶
func (in AdditionalVolumesSlice) DeepCopyInto(out *AdditionalVolumesSlice)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CDCConfiguration ¶ added in v1.12.0
type CDCConfiguration struct { // +kubebuilder:validation:MinLength=1 PulsarServiceUrl *string `json:"pulsarServiceUrl"` // +optional TopicPrefix *string `json:"topicPrefix,omitempty"` // +optional CDCWorkingDir *string `json:"cdcWorkingDir,omitempty"` // +optional CDCPollIntervalMs *int `json:"cdcPollIntervalM,omitempty"` // +optional ErrorCommitLogReprocessEnabled *bool `json:"errorCommitLogReprocessEnabled,omitempty"` // +optional CDCConcurrentProcessors *int `json:"cdcConcurrentProcessors,omitempty"` // +optional PulsarBatchDelayInMs *int `json:"pulsarBatchDelayInMs,omitempty"` // +optional PulsarKeyBasedBatcher *bool `json:"pulsarKeyBasedBatcher,omitempty"` // +optional PulsarMaxPendingMessages *int `json:"pulsarMaxPendingMessages,omitempty"` // +optional PulsarMaxPendingMessagesAcrossPartitions *int `json:"pulsarMaxPendingMessagesAcrossPartitions,omitempty"` // +optional PulsarAuthPluginClassName *string `json:"pulsarAuthPluginClassName,omitempty"` // +optional PulsarAuthParams *string `json:"pulsarAuthParams,omitempty"` // +optional SSLProvider *string `json:"sslProvider,omitempty"` // +optional SSLTruststorePath *string `json:"sslTruststorePath,omitempty"` // +optional SSLTruststorePassword *string `json:"sslTruststorePassword,omitempty"` // +optional SSLTruststoreType *string `json:"sslTruststoreType,omitempty"` // +optional SSLKeystorePath *string `json:"sslKeystorePath,omitempty"` // +optional SSLKeystorePassword *string `json:"sslKeystorePassword,omitempty"` // +optional SSLCipherSuites *string `json:"sslCipherSuites,omitempty"` // +optional SSLEnabledProtocols *string `json:"sslEnabledProtocols,omitempty"` // +optional SSLAllowInsecureConnection *string `json:"sslAllowInsecureConnection,omitempty"` // +optional SSLHostnameVerificationEnable *string `json:"sslHostnameVerificationEnable,omitempty"` }
CDCConfiguration holds CDC config for the CassandraDatacenter. Note that it cannot contain arrays, channels, maps etc. because of the way the reflection logic works which marshalls it into a string for the purposes of passing on the command line.
func (*CDCConfiguration) DeepCopy ¶ added in v1.12.0
func (in *CDCConfiguration) DeepCopy() *CDCConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CDCConfiguration.
func (*CDCConfiguration) DeepCopyInto ¶ added in v1.12.0
func (in *CDCConfiguration) DeepCopyInto(out *CDCConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CassandraDatacenter ¶
type CassandraDatacenter struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CassandraDatacenterSpec `json:"spec,omitempty"` Status CassandraDatacenterStatus `json:"status,omitempty"` }
CassandraDatacenter is the Schema for the cassandradatacenters API +k8s:openapi-gen=true +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=cassandradatacenters,scope=Namespaced,shortName=cassdc;cassdcs
func (*CassandraDatacenter) DatacenterName ¶ added in v1.15.0
func (dc *CassandraDatacenter) DatacenterName() string
DatacenterName returns the Cassandra DC name override if it exists, otherwise the cassdc object name.
func (*CassandraDatacenter) DeepCopy ¶
func (in *CassandraDatacenter) DeepCopy() *CassandraDatacenter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraDatacenter.
func (*CassandraDatacenter) DeepCopyInto ¶
func (in *CassandraDatacenter) DeepCopyInto(out *CassandraDatacenter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CassandraDatacenter) DeepCopyObject ¶
func (in *CassandraDatacenter) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CassandraDatacenter) Default ¶
func (dc *CassandraDatacenter) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*CassandraDatacenter) DeploymentSupportsFQL ¶ added in v1.9.0
func (dc *CassandraDatacenter) DeploymentSupportsFQL() bool
func (*CassandraDatacenter) FullQueryEnabled ¶ added in v1.9.0
func (dc *CassandraDatacenter) FullQueryEnabled() (bool, error)
func (*CassandraDatacenter) GetAdditionalSeedsServiceName ¶
func (dc *CassandraDatacenter) GetAdditionalSeedsServiceName() string
func (*CassandraDatacenter) GetAllPodsServiceName ¶
func (dc *CassandraDatacenter) GetAllPodsServiceName() string
func (*CassandraDatacenter) GetClusterLabels ¶
func (dc *CassandraDatacenter) GetClusterLabels() map[string]string
GetClusterLabels returns a new map with the cluster label key and cluster name value
func (*CassandraDatacenter) GetCondition ¶
func (dc *CassandraDatacenter) GetCondition(conditionType DatacenterConditionType) (DatacenterCondition, bool)
func (*CassandraDatacenter) GetConditionStatus ¶
func (dc *CassandraDatacenter) GetConditionStatus(conditionType DatacenterConditionType) corev1.ConditionStatus
func (*CassandraDatacenter) GetConfigAsJSON ¶
func (dc *CassandraDatacenter) GetConfigAsJSON(config []byte) (string, error)
GetConfigAsJSON gets a JSON-encoded string suitable for passing to configBuilder
func (*CassandraDatacenter) GetConfigBuilderImage ¶
func (dc *CassandraDatacenter) GetConfigBuilderImage() string
func (*CassandraDatacenter) GetContainerPorts ¶
func (dc *CassandraDatacenter) GetContainerPorts() ([]corev1.ContainerPort, error)
GetContainerPorts will return the container ports for the pods in a statefulset based on the provided config
func (*CassandraDatacenter) GetDatacenterLabels ¶
func (dc *CassandraDatacenter) GetDatacenterLabels() map[string]string
GetDatacenterLabels ...
func (*CassandraDatacenter) GetDatacenterServiceName ¶
func (dc *CassandraDatacenter) GetDatacenterServiceName() string
func (*CassandraDatacenter) GetNodePortInternodePort ¶
func (dc *CassandraDatacenter) GetNodePortInternodePort() int
GetNodePortInternodePort Gets the defined internode/broadcast port for NodePort. 0 will be returned if NodePort is not configured. The SSL port will be returned if it is defined, otherwise the normal internode port will be used.
func (*CassandraDatacenter) GetNodePortNativePort ¶
func (dc *CassandraDatacenter) GetNodePortNativePort() int
GetNodePortNativePort Gets the defined CQL port for NodePort. 0 will be returned if NodePort is not configured. The SSL port will be returned if it is defined, otherwise the normal CQL port will be used.
func (*CassandraDatacenter) GetNodePortServiceName ¶
func (dc *CassandraDatacenter) GetNodePortServiceName() string
func (*CassandraDatacenter) GetRack ¶ added in v1.14.0
func (dc *CassandraDatacenter) GetRack(rackName string) Rack
func (*CassandraDatacenter) GetRackLabels ¶
func (dc *CassandraDatacenter) GetRackLabels(rackName string) map[string]string
GetRackLabels ...
func (*CassandraDatacenter) GetRacks ¶
func (dc *CassandraDatacenter) GetRacks() []Rack
GetRacks is a getter for the Rack slice in the spec It ensures there is always at least one rack
func (*CassandraDatacenter) GetSeedServiceName ¶
func (dc *CassandraDatacenter) GetSeedServiceName() string
func (*CassandraDatacenter) GetServerImage ¶
func (dc *CassandraDatacenter) GetServerImage() string
GetServerImage produces a fully qualified container image to pull based on either the version, or an explicitly specified image
In the event that no valid image could be retrieved from the specified version, an error is returned.
func (*CassandraDatacenter) GetSuperuserSecretNamespacedName ¶
func (dc *CassandraDatacenter) GetSuperuserSecretNamespacedName() types.NamespacedName
func (*CassandraDatacenter) IsHostNetworkEnabled ¶
func (dc *CassandraDatacenter) IsHostNetworkEnabled() bool
func (*CassandraDatacenter) IsNodePortEnabled ¶
func (dc *CassandraDatacenter) IsNodePortEnabled() bool
IsNodePortEnabled is the NodePort service enabled?
func (*CassandraDatacenter) LegacyInternodeEnabled ¶ added in v1.14.0
func (dc *CassandraDatacenter) LegacyInternodeEnabled() bool
func (*CassandraDatacenter) SanitizedName ¶ added in v1.14.0
func (dc *CassandraDatacenter) SanitizedName() string
SanitizedName returns a sanitized version of the name returned by DatacenterName()
func (*CassandraDatacenter) SetCondition ¶
func (dc *CassandraDatacenter) SetCondition(condition DatacenterCondition)
func (*CassandraDatacenter) SetupWebhookWithManager ¶
func (dc *CassandraDatacenter) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*CassandraDatacenter) ShouldGenerateSuperuserSecret ¶
func (dc *CassandraDatacenter) ShouldGenerateSuperuserSecret() bool
func (*CassandraDatacenter) ValidateCreate ¶
func (dc *CassandraDatacenter) ValidateCreate() error
func (*CassandraDatacenter) ValidateDelete ¶
func (dc *CassandraDatacenter) ValidateDelete() error
func (*CassandraDatacenter) ValidateUpdate ¶
func (dc *CassandraDatacenter) ValidateUpdate(old runtime.Object) error
type CassandraDatacenterList ¶
type CassandraDatacenterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []CassandraDatacenter `json:"items"` }
CassandraDatacenterList contains a list of CassandraDatacenter
func (*CassandraDatacenterList) DeepCopy ¶
func (in *CassandraDatacenterList) DeepCopy() *CassandraDatacenterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraDatacenterList.
func (*CassandraDatacenterList) DeepCopyInto ¶
func (in *CassandraDatacenterList) DeepCopyInto(out *CassandraDatacenterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CassandraDatacenterList) DeepCopyObject ¶
func (in *CassandraDatacenterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CassandraDatacenterSpec ¶
type CassandraDatacenterSpec struct { // Desired number of Cassandra server nodes // +kubebuilder:validation:Minimum=1 Size int32 `json:"size"` // Version string for config builder, // used to generate Cassandra server configuration // +kubebuilder:validation:Pattern=(6\.8\.\d+)|(3\.11\.\d+)|(4\.\d+\.\d+) ServerVersion string `json:"serverVersion"` // Cassandra server image name. Use of ImageConfig to match ServerVersion is recommended instead of this value. // This value will override anything set in the ImageConfig matching the ServerVersion // More info: https://kubernetes.io/docs/concepts/containers/images ServerImage string `json:"serverImage,omitempty"` // Server type: "cassandra" or "dse" // +kubebuilder:validation:Enum=cassandra;dse ServerType string `json:"serverType"` // Does the Server Docker image run as the Cassandra user? Defaults to true DockerImageRunsAsCassandra *bool `json:"dockerImageRunsAsCassandra,omitempty"` // Config for the server, in YAML format // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:XPreserveUnknownFields Config json.RawMessage `json:"config,omitempty"` // ConfigSecret is the name of a secret that contains configuration for Cassandra. The // secret is expected to have a property named config whose value should be a JSON // formatted string that should look like this: // // config: |- // { // "cassandra-yaml": { // "read_request_timeout_in_ms": 10000 // }, // "jmv-options": { // "max_heap_size": 1024M // } // } // // ConfigSecret is mutually exclusive with Config. ConfigSecret takes precedence and // will be used exclusively if both properties are set. The operator sets a watch such // that an update to the secret will trigger an update of the StatefulSets. ConfigSecret string `json:"configSecret,omitempty"` // Config for the Management API certificates ManagementApiAuth ManagementApiAuthConfig `json:"managementApiAuth,omitempty"` //NodeAffinityLabels to pin the Datacenter, using node affinity NodeAffinityLabels map[string]string `json:"nodeAffinityLabels,omitempty"` // Kubernetes resource requests and limits, per pod Resources corev1.ResourceRequirements `json:"resources,omitempty"` // Kubernetes resource requests and limits per system logger container. SystemLoggerResources corev1.ResourceRequirements `json:"systemLoggerResources,omitempty"` // Kubernetes resource requests and limits per server config initialization container. ConfigBuilderResources corev1.ResourceRequirements `json:"configBuilderResources,omitempty"` // A list of the named racks in the datacenter, representing independent failure domains. The // number of racks should match the replication factor in the keyspaces you plan to create, and // the number of racks cannot easily be changed once a datacenter is deployed. Racks []Rack `json:"racks,omitempty"` // StorageConfig describes the persistent storage request of each server node StorageConfig StorageConfig `json:"storageConfig"` // DEPRECATED Use CassandraTask replacenode to achieve correct node replacement. A list of pod names that need to be replaced. ReplaceNodes []string `json:"replaceNodes,omitempty"` // The name by which CQL clients and instances will know the cluster. If the same // cluster name is shared by multiple Datacenters in the same Kubernetes namespace, // they will join together in a multi-datacenter cluster. // +kubebuilder:validation:MinLength=2 ClusterName string `json:"clusterName"` // A stopped CassandraDatacenter will have no running server pods, like using "stop" with // traditional System V init scripts. Other Kubernetes resources will be left intact, and volumes // will re-attach when the CassandraDatacenter workload is resumed. Stopped bool `json:"stopped,omitempty"` // Container image for the config builder init container. Overrides value from ImageConfig ConfigBuilderImage ConfigBuilderImage string `json:"configBuilderImage,omitempty"` // Indicates that configuration and container image changes should only be pushed to // the first rack of the datacenter CanaryUpgrade bool `json:"canaryUpgrade,omitempty"` // The number of nodes that will be updated when CanaryUpgrade is true. Note that the value is // either 0 or greater than the rack size, then all nodes in the rack will get updated. CanaryUpgradeCount int32 `json:"canaryUpgradeCount,omitempty"` // Turning this option on allows multiple server pods to be created on a k8s worker node, by removing the default pod anti affinity rules. // By default the operator creates just one server pod per k8s worker node. Using custom affinity rules might require turning this // option on in which case the defaults are not set. AllowMultipleNodesPerWorker bool `json:"allowMultipleNodesPerWorker,omitempty"` // This secret defines the username and password for the Cassandra server superuser. // If it is omitted, we will generate a secret instead. SuperuserSecretName string `json:"superuserSecretName,omitempty"` // The k8s service account to use for the server pods ServiceAccount string `json:"serviceAccount,omitempty"` // DEPRECATED. Use CassandraTask for rolling restarts. Whether to do a rolling restart at the next opportunity. The operator will set this back // to false once the restart is in progress. RollingRestartRequested bool `json:"rollingRestartRequested,omitempty"` // A map of label keys and values to restrict Cassandra node scheduling to k8s workers // with matchiing labels. // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Rack names in this list are set to the latest StatefulSet configuration // even if Cassandra nodes are down. Use this to recover from an upgrade that couldn't // roll out. ForceUpgradeRacks []string `json:"forceUpgradeRacks,omitempty"` DseWorkloads *DseWorkloads `json:"dseWorkloads,omitempty"` // PodTemplate provides customisation options (labels, annotations, affinity rules, resource requests, and so on) for the cassandra pods PodTemplateSpec *corev1.PodTemplateSpec `json:"podTemplateSpec,omitempty"` // Cassandra users to bootstrap Users []CassandraUser `json:"users,omitempty"` Networking *NetworkingConfig `json:"networking,omitempty"` AdditionalSeeds []string `json:"additionalSeeds,omitempty"` // Configuration for disabling the simple log tailing sidecar container. Our default is to have it enabled. DisableSystemLoggerSidecar bool `json:"disableSystemLoggerSidecar,omitempty"` // Container image for the log tailing sidecar container. Overrides value from ImageConfig SystemLoggerImage SystemLoggerImage string `json:"systemLoggerImage,omitempty"` // AdditionalServiceConfig allows to define additional parameters that are included in the created Services. Note, user can override values set by cass-operator and doing so could break cass-operator functionality. // Avoid label "cass-operator" and anything that starts with "cassandra.datastax.com/" AdditionalServiceConfig ServiceConfig `json:"additionalServiceConfig,omitempty"` // Tolerations applied to the Cassandra pod. Note that these cannot be overridden with PodTemplateSpec. Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // Additional Labels allows to define additional labels that will be included in all objects created by the operator. Note, user can override values set by default from the cass-operator and doing so could break cass-operator functionality. AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` // CDC allows configuration of the change data capture agent which can run within the Management API container. Use it to send data to Pulsar. CDC *CDCConfiguration `json:"cdc,omitempty"` // DatacenterName allows to override the name of the Cassandra datacenter. Kubernetes objects will be named after a sanitized version of it if set, and if not metadata.name. In Cassandra the DC name will be overridden by this value. // It may generate some confusion as objects created for the DC will have a different name than the CasandraDatacenter object itself. // This setting can create conflicts if multiple DCs coexist in the same namespace if metadata.name for a DC with no override is set to the same value as the override name of another DC. // Use cautiously. // +optional DatacenterName string `json:"datacenterName,omitempty"` }
CassandraDatacenterSpec defines the desired state of a CassandraDatacenter +k8s:openapi-gen=true +kubebuilder:pruning:PreserveUnknownFields +kubebuilder:validation:XPreserveUnknownFields
func (*CassandraDatacenterSpec) DeepCopy ¶
func (in *CassandraDatacenterSpec) DeepCopy() *CassandraDatacenterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraDatacenterSpec.
func (*CassandraDatacenterSpec) DeepCopyInto ¶
func (in *CassandraDatacenterSpec) DeepCopyInto(out *CassandraDatacenterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CassandraDatacenterStatus ¶
type CassandraDatacenterStatus struct { Conditions []DatacenterCondition `json:"conditions,omitempty"` // Deprecated. Use usersUpserted instead. The timestamp at // which CQL superuser credentials were last upserted to the // management API // +optional SuperUserUpserted metav1.Time `json:"superUserUpserted,omitempty"` // The timestamp at which managed cassandra users' credentials // were last upserted to the management API // +optional UsersUpserted metav1.Time `json:"usersUpserted,omitempty"` // The timestamp when the operator last started a Server node // with the management API // +optional LastServerNodeStarted metav1.Time `json:"lastServerNodeStarted,omitempty"` // Last known progress state of the Cassandra Operator // +optional CassandraOperatorProgress ProgressState `json:"cassandraOperatorProgress,omitempty"` // +optional LastRollingRestart metav1.Time `json:"lastRollingRestart,omitempty"` // +optional NodeStatuses CassandraStatusMap `json:"nodeStatuses"` // +optional NodeReplacements []string `json:"nodeReplacements"` // +optional QuietPeriod metav1.Time `json:"quietPeriod,omitempty"` // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // TrackedTasks tracks the tasks for completion that were created by the cass-operator // +optional TrackedTasks []corev1.ObjectReference `json:"trackedTasks,omitempty"` // DatacenterName is the name of the override used for the CassandraDatacenter // This field is used to perform validation checks preventing a user from changing the override // +optional DatacenterName *string `json:"datacenterName,omitempty"` }
CassandraDatacenterStatus defines the observed state of CassandraDatacenter +k8s:openapi-gen=true
func (*CassandraDatacenterStatus) AddTaskToTrack ¶ added in v1.10.0
func (status *CassandraDatacenterStatus) AddTaskToTrack(objectMeta metav1.ObjectMeta)
func (*CassandraDatacenterStatus) DeepCopy ¶
func (in *CassandraDatacenterStatus) DeepCopy() *CassandraDatacenterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraDatacenterStatus.
func (*CassandraDatacenterStatus) DeepCopyInto ¶
func (in *CassandraDatacenterStatus) DeepCopyInto(out *CassandraDatacenterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CassandraDatacenterStatus) GetConditionStatus ¶
func (status *CassandraDatacenterStatus) GetConditionStatus(conditionType DatacenterConditionType) corev1.ConditionStatus
func (*CassandraDatacenterStatus) RemoveTrackedTask ¶ added in v1.10.0
func (status *CassandraDatacenterStatus) RemoveTrackedTask(objectMeta metav1.ObjectMeta)
func (*CassandraDatacenterStatus) SetCondition ¶
func (status *CassandraDatacenterStatus) SetCondition(condition DatacenterCondition)
type CassandraNodeStatus ¶
type CassandraNodeStatus struct {
HostID string `json:"hostID,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 CassandraStatusMap ¶
type CassandraStatusMap map[string]CassandraNodeStatus
func (CassandraStatusMap) DeepCopy ¶
func (in CassandraStatusMap) DeepCopy() CassandraStatusMap
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraStatusMap.
func (CassandraStatusMap) DeepCopyInto ¶
func (in CassandraStatusMap) DeepCopyInto(out *CassandraStatusMap)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CassandraUser ¶
type CassandraUser struct { SecretName string `json:"secretName"` Superuser bool `json:"superuser"` }
func (*CassandraUser) DeepCopy ¶
func (in *CassandraUser) DeepCopy() *CassandraUser
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CassandraUser.
func (*CassandraUser) DeepCopyInto ¶
func (in *CassandraUser) DeepCopyInto(out *CassandraUser)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatacenterCondition ¶
type DatacenterCondition struct { Type DatacenterConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` Reason string `json:"reason"` Message string `json:"message"` LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` }
func NewDatacenterCondition ¶
func NewDatacenterCondition(conditionType DatacenterConditionType, status corev1.ConditionStatus) *DatacenterCondition
func NewDatacenterConditionWithReason ¶
func NewDatacenterConditionWithReason(conditionType DatacenterConditionType, status corev1.ConditionStatus, reason string, message string) *DatacenterCondition
func (*DatacenterCondition) DeepCopy ¶
func (in *DatacenterCondition) DeepCopy() *DatacenterCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatacenterCondition.
func (*DatacenterCondition) DeepCopyInto ¶
func (in *DatacenterCondition) DeepCopyInto(out *DatacenterCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatacenterConditionType ¶
type DatacenterConditionType string
const ( DatacenterReady DatacenterConditionType = "Ready" DatacenterInitialized DatacenterConditionType = "Initialized" DatacenterReplacingNodes DatacenterConditionType = "ReplacingNodes" DatacenterScalingUp DatacenterConditionType = "ScalingUp" DatacenterScalingDown DatacenterConditionType = "ScalingDown" DatacenterUpdating DatacenterConditionType = "Updating" DatacenterStopped DatacenterConditionType = "Stopped" DatacenterResuming DatacenterConditionType = "Resuming" DatacenterRollingRestart DatacenterConditionType = "RollingRestart" DatacenterValid DatacenterConditionType = "Valid" DatacenterDecommission DatacenterConditionType = "Decommission" // DatacenterHealthy indicates if QUORUM can be reached from all deployed nodes. // If this check fails, certain operations such as scaling up will not proceed. DatacenterHealthy DatacenterConditionType = "Healthy" )
type DseWorkloads ¶
type DseWorkloads struct { AnalyticsEnabled bool `json:"analyticsEnabled,omitempty"` GraphEnabled bool `json:"graphEnabled,omitempty"` SearchEnabled bool `json:"searchEnabled,omitempty"` }
func (*DseWorkloads) DeepCopy ¶
func (in *DseWorkloads) DeepCopy() *DseWorkloads
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DseWorkloads.
func (*DseWorkloads) DeepCopyInto ¶
func (in *DseWorkloads) DeepCopyInto(out *DseWorkloads)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManagementApiAuthConfig ¶
type ManagementApiAuthConfig struct { Insecure *ManagementApiAuthInsecureConfig `json:"insecure,omitempty"` Manual *ManagementApiAuthManualConfig `json:"manual,omitempty"` }
func (*ManagementApiAuthConfig) DeepCopy ¶
func (in *ManagementApiAuthConfig) DeepCopy() *ManagementApiAuthConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementApiAuthConfig.
func (*ManagementApiAuthConfig) DeepCopyInto ¶
func (in *ManagementApiAuthConfig) DeepCopyInto(out *ManagementApiAuthConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManagementApiAuthInsecureConfig ¶
type ManagementApiAuthInsecureConfig struct { }
func (*ManagementApiAuthInsecureConfig) DeepCopy ¶
func (in *ManagementApiAuthInsecureConfig) DeepCopy() *ManagementApiAuthInsecureConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementApiAuthInsecureConfig.
func (*ManagementApiAuthInsecureConfig) DeepCopyInto ¶
func (in *ManagementApiAuthInsecureConfig) DeepCopyInto(out *ManagementApiAuthInsecureConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManagementApiAuthManualConfig ¶
type ManagementApiAuthManualConfig struct { ClientSecretName string `json:"clientSecretName"` ServerSecretName string `json:"serverSecretName"` // +optional SkipSecretValidation bool `json:"skipSecretValidation,omitempty"` }
func (*ManagementApiAuthManualConfig) DeepCopy ¶
func (in *ManagementApiAuthManualConfig) DeepCopy() *ManagementApiAuthManualConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagementApiAuthManualConfig.
func (*ManagementApiAuthManualConfig) DeepCopyInto ¶
func (in *ManagementApiAuthManualConfig) DeepCopyInto(out *ManagementApiAuthManualConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkingConfig ¶
type NetworkingConfig struct { NodePort *NodePortConfig `json:"nodePort,omitempty"` HostNetwork bool `json:"hostNetwork,omitempty"` }
func (*NetworkingConfig) DeepCopy ¶
func (in *NetworkingConfig) DeepCopy() *NetworkingConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkingConfig.
func (*NetworkingConfig) DeepCopyInto ¶
func (in *NetworkingConfig) DeepCopyInto(out *NetworkingConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodePortConfig ¶
type NodePortConfig struct { Native int `json:"native,omitempty"` NativeSSL int `json:"nativeSSL,omitempty"` Internode int `json:"internode,omitempty"` InternodeSSL int `json:"internodeSSL,omitempty"` }
func (*NodePortConfig) DeepCopy ¶
func (in *NodePortConfig) DeepCopy() *NodePortConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePortConfig.
func (*NodePortConfig) DeepCopyInto ¶
func (in *NodePortConfig) DeepCopyInto(out *NodePortConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProgressState ¶
type ProgressState string
ProgressState - this type exists so there's no chance of pushing random strings to our progress status
type Rack ¶
type Rack struct { // The rack name // +kubebuilder:validation:MinLength=2 Name string `json:"name"` // Deprecated. Use nodeAffinityLabels instead. Zone name to pin the rack, using node affinity Zone string `json:"zone,omitempty"` // NodeAffinityLabels to pin the rack, using node affinity NodeAffinityLabels map[string]string `json:"nodeAffinityLabels,omitempty"` // Affinity rules to set for this rack only. Merged with values from PodTemplateSpec Affinity as well as NodeAffinityLabels. If you wish to override all the default // PodAntiAffinity rules, set allowMultipleWorkers to true, otherwise defaults are applied and then these Affinity settings are merged. Affinity *corev1.Affinity `json:"affinity,omitempty"` }
Rack ...
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 ServiceConfig ¶
type ServiceConfig struct { DatacenterService ServiceConfigAdditions `json:"dcService,omitempty"` SeedService ServiceConfigAdditions `json:"seedService,omitempty"` AllPodsService ServiceConfigAdditions `json:"allpodsService,omitempty"` AdditionalSeedService ServiceConfigAdditions `json:"additionalSeedService,omitempty"` NodePortService ServiceConfigAdditions `json:"nodePortService,omitempty"` }
ServiceConfig defines additional service configurations.
func (*ServiceConfig) DeepCopy ¶
func (in *ServiceConfig) DeepCopy() *ServiceConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceConfig.
func (*ServiceConfig) DeepCopyInto ¶
func (in *ServiceConfig) DeepCopyInto(out *ServiceConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceConfigAdditions ¶
type ServiceConfigAdditions struct { Labels map[string]string `json:"additionalLabels,omitempty"` Annotations map[string]string `json:"additionalAnnotations,omitempty"` }
ServiceConfigAdditions exposes additional options for each service
func (*ServiceConfigAdditions) DeepCopy ¶
func (in *ServiceConfigAdditions) DeepCopy() *ServiceConfigAdditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceConfigAdditions.
func (*ServiceConfigAdditions) DeepCopyInto ¶
func (in *ServiceConfigAdditions) DeepCopyInto(out *ServiceConfigAdditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageConfig ¶
type StorageConfig struct { CassandraDataVolumeClaimSpec *corev1.PersistentVolumeClaimSpec `json:"cassandraDataVolumeClaimSpec,omitempty"` AdditionalVolumes AdditionalVolumesSlice `json:"additionalVolumes,omitempty"` }
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.