Documentation
¶
Overview ¶
Package v1beta1 contains API Schema definitions for the cassandra v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=cassandra.datastax.com
Package v1beta1 contains API Schema definitions for the cassandra v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=cassandra.datastax.com
Index ¶
- Constants
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- func Resource(resource string) schema.GroupResource
- func SplitRacks(nodeCount, rackCount int) []int
- func ValidateDatacenterFieldChanges(oldDc CassandraDatacenter, newDc CassandraDatacenter) error
- func ValidateSingleDatacenter(dc CassandraDatacenter) error
- type CassandraDatacenter
- func (in *CassandraDatacenter) DeepCopy() *CassandraDatacenter
- func (in *CassandraDatacenter) DeepCopyInto(out *CassandraDatacenter)
- func (in *CassandraDatacenter) DeepCopyObject() runtime.Object
- func (dc *CassandraDatacenter) GetAllPodsServiceName() string
- func (dc *CassandraDatacenter) GetClusterLabels() map[string]string
- func (dc *CassandraDatacenter) GetConditionStatus(conditionType DatacenterConditionType) corev1.ConditionStatus
- func (dc *CassandraDatacenter) GetConfigAsJSON() (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) GetRackLabels(rackName string) map[string]string
- func (dc *CassandraDatacenter) GetRacks() []Rack
- func (dc *CassandraDatacenter) GetSeedServiceName() string
- func (dc *CassandraDatacenter) GetServerImage() (string, error)
- func (dc *CassandraDatacenter) GetSuperuserSecretNamespacedName() types.NamespacedName
- func (dc *CassandraDatacenter) SetCondition(condition DatacenterCondition)
- 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 (in *CassandraDatacenterStatus) DeepCopy() *CassandraDatacenterStatus
- func (in *CassandraDatacenterStatus) DeepCopyInto(out *CassandraDatacenterStatus)
- func (status *CassandraDatacenterStatus) GetConditionStatus(conditionType DatacenterConditionType) corev1.ConditionStatus
- func (status *CassandraDatacenterStatus) SetCondition(condition DatacenterCondition)
- type CassandraNodeStatus
- type CassandraStatusMap
- type DatacenterCondition
- type DatacenterConditionType
- type ManagementApiAuthConfig
- type ManagementApiAuthInsecureConfig
- type ManagementApiAuthManualConfig
- type ProgressState
- type Rack
- 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" // RackLabel is the operator's label for the rack name CassOperatorProgressLabel = "cassandra.datastax.com/operator-progress" // CassNodeState CassNodeState = "cassandra.datastax.com/node-state" // Progress states for status ProgressUpdating ProgressState = "Updating" ProgressReady ProgressState = "Ready" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "cassandra.datastax.com", Version: "v1beta1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
var AddToScheme = SchemeBuilder.AddToScheme
AddToScheme is a global function that registers this API group & version to a scheme
Functions ¶
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
func SplitRacks ¶
func ValidateDatacenterFieldChanges ¶
func ValidateDatacenterFieldChanges(oldDc CassandraDatacenter, newDc CassandraDatacenter) error
Ensure that no values are improperly set
func ValidateSingleDatacenter ¶
func ValidateSingleDatacenter(dc CassandraDatacenter) error
Ensure that no values are improperly set
Types ¶
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:subresource:status +kubebuilder:resource:path=cassandradatacenters,scope=Namespaced,shortName=cassdc;cassdcs
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) 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) GetConditionStatus ¶
func (dc *CassandraDatacenter) GetConditionStatus(conditionType DatacenterConditionType) corev1.ConditionStatus
func (*CassandraDatacenter) GetConfigAsJSON ¶
func (dc *CassandraDatacenter) GetConfigAsJSON() (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) 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, error)
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) SetCondition ¶
func (dc *CassandraDatacenter) SetCondition(condition DatacenterCondition)
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:Enum="6.8.0";"3.11.6";"4.0.0" ServerVersion string `json:"serverVersion"` // Cassandra server image name. // 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"` // Config for the server, in YAML format Config json.RawMessage `json:"config,omitempty"` // Config for the Management API certificates ManagementApiAuth ManagementApiAuthConfig `json:"managementApiAuth,omitempty"` // Kubernetes resource requests and limits, per pod Resources corev1.ResourceRequirements `json:"resources,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"` // Describes the persistent storage request of each server node StorageConfig StorageConfig `json:"storageConfig"` // 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. 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"` // Turning this option on allows multiple server pods to be created on a k8s worker node. // By default the operator creates just one server pod per k8s worker node using k8s // podAntiAffinity and requiredDuringSchedulingIgnoredDuringExecution. 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"` // 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"` // PodTemplate provides customisation options (labels, annotations, affinity rules, resource requests, and so on) for the cassandra pods PodTemplateSpec *corev1.PodTemplateSpec `json:"podTemplateSpec,omitempty"` }
CassandraDatacenterSpec defines the desired state of a CassandraDatacenter +k8s:openapi-gen=true
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"` // The timestamp at which CQL superuser credentials // were last upserted to the management API // +optional SuperUserUpserted metav1.Time `json:"superUserUpserted,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"` }
CassandraDatacenterStatus defines the observed state of CassandraDatacenter +k8s:openapi-gen=true
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) SetCondition ¶
func (status *CassandraDatacenterStatus) SetCondition(condition DatacenterCondition)
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 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 DatacenterCondition ¶
type DatacenterCondition struct { Type DatacenterConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` }
func NewDatacenterCondition ¶
func NewDatacenterCondition(conditionType DatacenterConditionType, status corev1.ConditionStatus) *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" DatacenterUpdating DatacenterConditionType = "Updating" DatacenterStopped DatacenterConditionType = "Stopped" DatacenterResuming DatacenterConditionType = "Resuming" DatacenterRollingRestart DatacenterConditionType = "RollingRestart" )
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 ProgressState ¶
type ProgressState string
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"` // Zone name to pin the rack, using node affinity Zone string `json:"zone,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 StorageConfig ¶
type StorageConfig struct {
CassandraDataVolumeClaimSpec *corev1.PersistentVolumeClaimSpec `json:"cassandraDataVolumeClaimSpec,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.