Documentation ¶
Index ¶
- Constants
- func AgentAuthTokenSecretName(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
- func AgentAuthTokenSecretNameForScyllaCluster(sc *scyllav1.ScyllaCluster) string
- func CleanupJobForService(svcName string) string
- func ClusterLabels(sdc *scyllav1alpha1.ScyllaDBDatacenter) map[string]string
- func ClusterLabelsForScyllaCluster(sc *scyllav1.ScyllaCluster) map[string]string
- func ClusterSelector(sdc *scyllav1alpha1.ScyllaDBDatacenter) labels.Selector
- func CrossNamespaceServiceNameForCluster(sc *scyllav1.ScyllaCluster) string
- func DatacenterLabels(sdc *scyllav1alpha1.ScyllaDBDatacenter) map[string]string
- func FindContainerWithName(containers []corev1.Container, name string) (int, error)
- func FindScyllaContainer(containers []corev1.Container) (int, error)
- func FindSidecarInjectorContainer(containers []corev1.Container) (int, error)
- func GetCQLHostIDSubDomain(hostID, domain string) string
- func GetCQLProtocolSubDomain(domain string) string
- func GetProtocolSubDomain(protocol, domain string) string
- func GetScyllaClusterAlternatorLocalServingCAName(scName string) string
- func GetScyllaClusterAlternatorLocalServingCertName(scName string) string
- func GetScyllaClusterLocalAdminCQLConnectionConfigsName(scName string) string
- func GetScyllaClusterLocalClientCAName(scName string) string
- func GetScyllaClusterLocalServingCAName(scName string) string
- func GetScyllaClusterLocalServingCertName(scName string) string
- func GetScyllaClusterLocalUserAdminCertName(scName string) string
- func GetScyllaDBDatacenterGossipDatacenterName(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
- func GetScyllaDBManagedConfigCMName(clusterName string) string
- func GetTuningConfigMapNameForPod(pod *corev1.Pod) string
- func IdentityServiceName(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
- func IdentityServiceNameForScyllaCluster(sc *scyllav1.ScyllaCluster) string
- func ImageToRepositoryVersion(image string) (string, string, error)
- func ImageToVersion(image string) (string, error)
- func IndexFromName(n string) (int32, error)
- func ManagerClusterName(sc *scyllav1.ScyllaCluster) string
- func ManagerSelector() labels.Selector
- func ManualRef(namespace, name string) string
- func MemberServiceAccountNameForScyllaDBDatacenter(sdcName string) string
- func MemberServiceName(r scyllav1alpha1.RackSpec, sdc *scyllav1alpha1.ScyllaDBDatacenter, idx int) string
- func MemberServiceNameForScyllaCluster(r scyllav1.RackSpec, sc *scyllav1.ScyllaCluster, idx int) string
- func ObjRef(obj metav1.Object) string
- func ObjRefWithUID(obj metav1.Object) string
- func PVCNameForPod(podName string) string
- func PVCNameForService(svcName string) string
- func PVCNameForStatefulSet(stsName string, ordinal int32) string
- func PVCNamePrefix(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
- func PVCNamePrefixForScyllaCluster(sc *scyllav1.ScyllaCluster) string
- func PodDisruptionBudgetName(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
- func PodDisruptionBudgetNameForScyllaCluster(sc *scyllav1.ScyllaCluster) string
- func PodNameForScyllaCluster(r scyllav1.RackSpec, sc *scyllav1.ScyllaCluster, idx int) string
- func PodNameFromService(svc *corev1.Service) string
- func RackSelectorLabels(r scyllav1alpha1.RackSpec, sdc *scyllav1alpha1.ScyllaDBDatacenter) (map[string]string, error)
- func ScyllaLabels() map[string]string
- func ScyllaSelector() labels.Selector
- func ScyllaVersion(containers []corev1.Container) (string, error)
- func StatefulSetNameForRack(r scyllav1alpha1.RackSpec, sdc *scyllav1alpha1.ScyllaDBDatacenter) string
- func StatefulSetNameForRackForScyllaCluster(r scyllav1.RackSpec, sc *scyllav1.ScyllaCluster) string
- func StatefulSetPodLabel(name string) map[string]string
- func UpgradeContextConfigMapName(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
- type ConfigMapType
- type NodeConfigJobType
- type NodeJobType
- type ProtocolDNSLabel
- type ScyllaIngressType
- type ScyllaServiceType
Constants ¶
const ( // DecommissionedLabel expresses the intent to decommission // the specific member. The presence of the label expresses // the intent to decommission. If the value is true, it means // the member has finished decommissioning. // Values: {true, false} DecommissionedLabel = "scylla/decommissioned" // ReplaceLabel express the intent to replace pod under the specific member. ReplaceLabel = "scylla/replace" // ReplacingNodeHostIDLabel contains the Host ID of node labelled node is replacing. ReplacingNodeHostIDLabel = "internal.scylla-operator.scylladb.com/replacing-node-hostid" // NodeMaintenanceLabel means that node is under maintenance. // Readiness check will always fail when this label is added to member service. NodeMaintenanceLabel = "scylla/node-maintenance" // ForceIgnitionValueAnnotation allows to force ignition state. The value can be either "true" or "false". ForceIgnitionValueAnnotation = "internal.scylla-operator.scylladb.com/force-ignition-value" LabelValueTrue = "true" LabelValueFalse = "false" )
These labels are only used on the ClusterIP services acting as each member's identity (static ip). Each of these labels is a record of intent to do something. The controller sets these labels and each member watches for them and takes the appropriate actions.
See the sidecar design doc for more details.
const ( // HostIDAnnotation reflects the host_id of the scylla node. HostIDAnnotation = "internal.scylla-operator.scylladb.com/host-id" // CurrentTokenRingHashAnnotation reflects the current hash of token ring of the scylla node. CurrentTokenRingHashAnnotation = "internal.scylla-operator.scylladb.com/current-token-ring-hash" // LastCleanedUpTokenRingHashAnnotation reflects the last cleaned up hash of token ring of the scylla node. LastCleanedUpTokenRingHashAnnotation = "internal.scylla-operator.scylladb.com/last-cleaned-up-token-ring-hash" // CleanupJobTokenRingHashAnnotation reflects which version of token ring cleanup Job is cleaning. CleanupJobTokenRingHashAnnotation = "internal.scylla-operator.scylladb.com/cleanup-token-ring-hash" )
Annotations used internally.
const ( TransformScyllaClusterToScyllaDBDatacenterHostNetworkingAnnotation = "internal.scylla-operator.scylladb.com/host-networking" TransformScyllaClusterToScyllaDBDatacenterAlternatorPortAnnotation = "internal.scylla-operator.scylladb.com/alternator-port" TransformScyllaClusterToScyllaDBDatacenterInsecureEnableHTTPAnnotation = "internal.scylla-operator.scylladb.com/alternator-insecure-enable-http" TransformScyllaClusterToScyllaDBDatacenterInsecureDisableAuthorizationAnnotation = "internal.scylla-operator.scylladb.com/alternator-insecure-disable-authorization" TransformScyllaClusterToScyllaDBDatacenterSysctlsAnnotation = "internal.scylla-operator.scylladb.com/sysctls" )
Annotations used for feature backward compatibility between v1.ScyllaCluster and v1alpha1.ScyllaDBDatacenter
const ( // ClusterNameLabel specifies ScyllaCluster name. It's used as a selector by both ScyllaCluster and ScyllaDBDatacenter controllers. // As controller selector cannot be changed, this may be misleading in the context of ScyllaDBDatacenter. It should // specify the ScyllaCluster object name ScyllaDBDatacenter originated from or object name in case it wasn't migrated. ClusterNameLabel = "scylla/cluster" DatacenterNameLabel = "scylla/datacenter" RackNameLabel = "scylla/rack" RackOrdinalLabel = "scylla/rack-ordinal" ScyllaVersionLabel = "scylla/scylla-version" ScyllaServiceTypeLabel = "scylla-operator.scylladb.com/scylla-service-type" ScyllaIngressTypeLabel = "scylla-operator.scylladb.com/scylla-ingress-type" ManagedHash = "scylla-operator.scylladb.com/managed-hash" NodeConfigJobForNodeUIDLabel = "scylla-operator.scylladb.com/node-config-job-for-node-uid" NodeConfigJobTypeLabel = "scylla-operator.scylladb.com/node-config-job-type" NodeConfigJobData = "scylla-operator.scylladb.com/node-config-job-data" NodeConfigNameLabel = "scylla-operator.scylladb.com/node-config-name" ConfigMapTypeLabel = "scylla-operator.scylladb.com/config-map-type" OwnerUIDLabel = "scylla-operator.scylladb.com/owner-uid" ScyllaDBMonitoringNameLabel = "scylla-operator.scylladb.com/scylladbmonitoring-name" ControllerNameLabel = "scylla-operator.scylladb.com/controller-name" NodeJobLabel = "scylla-operator.scylladb.com/node-job" NodeJobTypeLabel = "scylla-operator.scylladb.com/node-job-type" AppName = "scylla" OperatorAppName = "scylla-operator" ManagerAppName = "scylla-manager" NodeConfigAppName = "scylla-node-config" PrometheusScrapeAnnotation = "prometheus.io/scrape" PrometheusPortAnnotation = "prometheus.io/port" ForceRedeploymentReasonAnnotation = "scylla-operator.scylladb.com/force-redeployment-reason" InputsHashAnnotation = "scylla-operator.scylladb.com/inputs-hash" )
Generic Labels used on objects created by the operator.
const ( ScyllaContainerName = "scylla" ScyllaDBIgnitionContainerName = "scylladb-ignition" ScyllaManagerAgentContainerName = "scylla-manager-agent" SidecarInjectorContainerName = "sidecar-injection" PerftuneContainerName = "perftune" CleanupContainerName = "cleanup" RLimitsContainerName = "rlimits" PVCTemplateName = "data" ScyllaConfigDirName = "/mnt/scylla-config" ScyllaAgentConfigDirName = "/mnt/scylla-agent-config" ScyllaAgentConfigFileName = "scylla-manager-agent.yaml" ScyllaAgentAuthTokenFileName = "auth-token.yaml" ScyllaAgentConfigDefaultFile = "/etc/scylla-manager-agent/scylla-manager-agent.yaml" ScyllaClientConfigDirName = "/mnt/scylla-client-config" ScyllaDBManagedConfigDir = "/var/run/configmaps/scylla-operator.scylladb.com/scylladb/managed-config" ScyllaConfigName = "scylla.yaml" ScyllaDBManagedConfigName = "scylladb-managed-config.yaml" ScyllaManagedConfigPath = ScyllaDBManagedConfigDir + "/" + ScyllaDBManagedConfigName ScyllaRackDCPropertiesName = "cassandra-rackdc.properties" ScyllaIOPropertiesName = "io_properties.yaml" ScyllaDBIgnitionDonePath = SharedDirName + "/ignition.done" DataDir = "/var/lib/scylla" ReadinessProbePath = "/readyz" LivenessProbePath = "/healthz" ScyllaDBAPIStatusProbePort = 8080 ScyllaDBIgnitionProbePort = 42081 ScyllaAPIPort = 10000 OperatorEnvVarPrefix = "SCYLLA_OPERATOR_" )
Configuration Values
const ( ScyllaManagerNamespace = "scylla-manager" ScyllaManagerServiceName = "scylla-manager" ScyllaOperatorNodeTuningNamespace = "scylla-operator-node-tuning" ScyllaClusterMemberClusterRoleName = "scyllacluster-member" SingletonName = "cluster" PerftuneJobPrefixName = "perftune" PerftuneServiceAccountName = "perftune" RlimitsJobServiceAccountName = "rlimits" )
const (
CQLProtocolDNSLabel = "cql"
)
const (
DevLoopDeviceDirectoryName = "loops"
)
const (
NodeConfigJobForNodeKey = "scylla-operator.scylladb.com/node-config-job-for-node"
)
const (
ScyllaRuntimeConfigKey string = "ScyllaRuntimeConfig"
)
const (
UpgradeContextConfigMapKey = "upgrade-context.json"
)
Variables ¶
This section is empty.
Functions ¶
func AgentAuthTokenSecretName ¶ added in v1.3.0
func AgentAuthTokenSecretName(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
func AgentAuthTokenSecretNameForScyllaCluster ¶ added in v1.15.0
func AgentAuthTokenSecretNameForScyllaCluster(sc *scyllav1.ScyllaCluster) string
func CleanupJobForService ¶ added in v1.10.0
func ClusterLabels ¶
func ClusterLabels(sdc *scyllav1alpha1.ScyllaDBDatacenter) map[string]string
ClusterLabels returns a map of label keys and values for the given Cluster.
func ClusterLabelsForScyllaCluster ¶ added in v1.15.0
func ClusterLabelsForScyllaCluster(sc *scyllav1.ScyllaCluster) map[string]string
func ClusterSelector ¶ added in v1.11.0
func ClusterSelector(sdc *scyllav1alpha1.ScyllaDBDatacenter) labels.Selector
ClusterSelector returns a labels selector for the given ScyllaCluster.
func CrossNamespaceServiceNameForCluster ¶ added in v0.3.0
func CrossNamespaceServiceNameForCluster(sc *scyllav1.ScyllaCluster) string
func DatacenterLabels ¶
func DatacenterLabels(sdc *scyllav1alpha1.ScyllaDBDatacenter) map[string]string
DatacenterLabels returns a map of label keys and values for the given Datacenter.
func FindContainerWithName ¶ added in v1.1.0
FindContainerWithName returns container having
func FindScyllaContainer ¶
FindScyllaContainer returns Scylla container from given list.
func FindSidecarInjectorContainer ¶ added in v1.1.0
FindSidecarInjectorContainer returns sidecar injector container from given list.
func GetCQLHostIDSubDomain ¶ added in v1.8.0
func GetCQLProtocolSubDomain ¶ added in v1.8.0
func GetProtocolSubDomain ¶ added in v1.8.0
func GetScyllaClusterAlternatorLocalServingCAName ¶ added in v1.12.0
func GetScyllaClusterAlternatorLocalServingCertName ¶ added in v1.12.0
func GetScyllaClusterLocalAdminCQLConnectionConfigsName ¶ added in v1.8.0
func GetScyllaClusterLocalClientCAName ¶ added in v1.8.0
func GetScyllaClusterLocalServingCAName ¶ added in v1.8.0
func GetScyllaClusterLocalServingCertName ¶ added in v1.8.0
func GetScyllaClusterLocalUserAdminCertName ¶ added in v1.8.0
func GetScyllaDBDatacenterGossipDatacenterName ¶ added in v1.15.0
func GetScyllaDBDatacenterGossipDatacenterName(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
func GetScyllaDBManagedConfigCMName ¶ added in v1.12.0
func GetTuningConfigMapNameForPod ¶ added in v1.6.0
func IdentityServiceName ¶ added in v1.12.0
func IdentityServiceName(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
func IdentityServiceNameForScyllaCluster ¶ added in v1.15.0
func IdentityServiceNameForScyllaCluster(sc *scyllav1.ScyllaCluster) string
func ImageToRepositoryVersion ¶ added in v1.15.0
func ImageToVersion ¶
ImageToVersion strips version part from container image.
func IndexFromName ¶
IndexFromName attempts to get the index from a name using the naming convention <name>-<index>.
func ManagerClusterName ¶ added in v0.3.0
func ManagerClusterName(sc *scyllav1.ScyllaCluster) string
func ManagerSelector ¶ added in v0.3.0
func MemberServiceAccountNameForScyllaDBDatacenter ¶ added in v1.15.0
func MemberServiceName ¶ added in v1.0.0
func MemberServiceName(r scyllav1alpha1.RackSpec, sdc *scyllav1alpha1.ScyllaDBDatacenter, idx int) string
func MemberServiceNameForScyllaCluster ¶ added in v1.15.0
func ObjRefWithUID ¶ added in v1.6.0
func PVCNameForPod ¶
func PVCNameForService ¶ added in v1.4.0
func PVCNameForStatefulSet ¶ added in v1.4.0
func PVCNamePrefix ¶ added in v1.15.0
func PVCNamePrefix(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
func PVCNamePrefixForScyllaCluster ¶ added in v1.4.0
func PVCNamePrefixForScyllaCluster(sc *scyllav1.ScyllaCluster) string
func PodDisruptionBudgetName ¶ added in v1.2.0
func PodDisruptionBudgetName(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
func PodDisruptionBudgetNameForScyllaCluster ¶ added in v1.15.0
func PodDisruptionBudgetNameForScyllaCluster(sc *scyllav1.ScyllaCluster) string
func PodNameForScyllaCluster ¶ added in v1.15.0
func PodNameFromService ¶ added in v1.11.1
func RackSelectorLabels ¶ added in v1.11.1
func RackSelectorLabels(r scyllav1alpha1.RackSpec, sdc *scyllav1alpha1.ScyllaDBDatacenter) (map[string]string, error)
RackSelectorLabels returns a map of label keys and values for the given Rack. Labels set cannot be changed.
func ScyllaLabels ¶ added in v1.6.0
func ScyllaSelector ¶ added in v1.6.0
func ScyllaVersion ¶ added in v1.1.0
ScyllaVersion returns version of Scylla container.
func StatefulSetNameForRack ¶
func StatefulSetNameForRack(r scyllav1alpha1.RackSpec, sdc *scyllav1alpha1.ScyllaDBDatacenter) string
func StatefulSetNameForRackForScyllaCluster ¶ added in v1.15.0
func StatefulSetNameForRackForScyllaCluster(r scyllav1.RackSpec, sc *scyllav1.ScyllaCluster) string
func StatefulSetPodLabel ¶
StatefulSetPodLabel returns a map of labels to uniquely identify a StatefulSet Pod with the given name
func UpgradeContextConfigMapName ¶ added in v1.15.0
func UpgradeContextConfigMapName(sdc *scyllav1alpha1.ScyllaDBDatacenter) string
Types ¶
type ConfigMapType ¶ added in v1.6.0
type ConfigMapType string
const (
NodeConfigDataConfigMapType ConfigMapType = "NodeConfigData"
)
type NodeConfigJobType ¶ added in v1.6.0
type NodeConfigJobType string
const ( NodeConfigJobTypeNode NodeConfigJobType = "Node" NodeConfigJobTypeContainerPerftune NodeConfigJobType = "ContainerPerftune" NodeConfigJobTypeContainerResourceLimits NodeConfigJobType = "ContainerResourceLimits" )
type NodeJobType ¶ added in v1.10.0
type NodeJobType string
const (
JobTypeCleanup NodeJobType = "Cleanup"
)
type ProtocolDNSLabel ¶ added in v1.8.0
type ProtocolDNSLabel string
type ScyllaIngressType ¶ added in v1.8.0
type ScyllaIngressType string
const ( ScyllaIngressTypeNode ScyllaIngressType = "Node" ScyllaIngressTypeAnyNode ScyllaIngressType = "AnyNode" )
type ScyllaServiceType ¶ added in v1.8.0
type ScyllaServiceType string
const ( ScyllaServiceTypeIdentity ScyllaServiceType = "identity" ScyllaServiceTypeMember ScyllaServiceType = "member" )