Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the druid v1alpha1 API group
Index ¶
- Constants
- Variables
- func AreManagedResourcesProtected(etcdObjMeta metav1.ObjectMeta) bool
- func GetAllPodNames(etcdObjMeta metav1.ObjectMeta, replicas int32) []string
- func GetAsOwnerReference(etcdObjMeta metav1.ObjectMeta) metav1.OwnerReference
- func GetClientServiceName(etcdObjMeta metav1.ObjectMeta) string
- func GetCompactionJobName(etcdObjMeta metav1.ObjectMeta) string
- func GetConfigMapName(etcdObjMeta metav1.ObjectMeta) string
- func GetDefaultLabels(etcdObjMeta metav1.ObjectMeta) map[string]string
- func GetDeltaSnapshotLeaseName(etcdObjMeta metav1.ObjectMeta) string
- func GetFullSnapshotLeaseName(etcdObjMeta metav1.ObjectMeta) string
- func GetMemberLeaseNames(etcdObjMeta metav1.ObjectMeta, replicas int32) []string
- func GetNamespaceName(etcdObjMeta metav1.ObjectMeta) types.NamespacedName
- func GetOrdinalPodName(etcdObjMeta metav1.ObjectMeta, ordinal int) string
- func GetPeerServiceName(etcdObjMeta metav1.ObjectMeta) string
- func GetPodDisruptionBudgetName(etcdObjMeta metav1.ObjectMeta) string
- func GetReconcileOperationAnnotationKey(etcdObjMeta metav1.ObjectMeta) *string
- func GetRoleBindingName(etcdObjMeta metav1.ObjectMeta) string
- func GetRoleName(etcdObjMeta metav1.ObjectMeta) string
- func GetServiceAccountName(etcdObjMeta metav1.ObjectMeta) string
- func GetStatefulSetName(etcdObjMeta metav1.ObjectMeta) string
- func GetSuspendEtcdSpecReconcileAnnotationKey(etcdObjMeta metav1.ObjectMeta) *string
- func HasReconcileOperationAnnotation(etcdObjMeta metav1.ObjectMeta) bool
- func IsEtcdRuntimeComponentCreationEnabled(etcdObjMeta metav1.ObjectMeta) bool
- func IsResourceMarkedForDeletion(objMeta metav1.ObjectMeta) bool
- func Kind(kind string) schema.GroupKind
- func RemoveOperationAnnotation(etcdObjMeta metav1.ObjectMeta)
- func Resource(resource string) schema.GroupResource
- type BackupSpec
- type ClientService
- type CompactionMode
- type CompressionPolicy
- type CompressionSpec
- type Condition
- type ConditionStatus
- type ConditionType
- type CrossVersionObjectReference
- type Etcd
- type EtcdConfig
- type EtcdCopyBackupsTask
- type EtcdCopyBackupsTaskList
- type EtcdCopyBackupsTaskSpec
- type EtcdCopyBackupsTaskStatus
- type EtcdList
- type EtcdMemberConditionStatus
- type EtcdMemberStatus
- type EtcdOpsTask
- func (in *EtcdOpsTask) DeepCopy() *EtcdOpsTask
- func (in *EtcdOpsTask) DeepCopyInto(out *EtcdOpsTask)
- func (in *EtcdOpsTask) DeepCopyObject() runtime.Object
- func (t *EtcdOpsTask) GetEtcdReference() types.NamespacedName
- func (t *EtcdOpsTask) GetTimeToExpiry() time.Duration
- func (t *EtcdOpsTask) HasTTLExpired() bool
- func (t *EtcdOpsTask) IsCompleted() bool
- type EtcdOpsTaskConfig
- type EtcdOpsTaskList
- type EtcdOpsTaskSpec
- type EtcdOpsTaskStatus
- type EtcdRole
- type EtcdSpec
- type EtcdStatus
- type GarbageCollectionPolicy
- type LeaderElectionSpec
- type MetricsLevel
- type OnDemandSnapshotConfig
- type OnDemandSnapshotType
- type SchedulingConstraints
- type SecretReference
- type SharedConfig
- type SnapshotCompactionSpec
- type StorageProvider
- type StoreSpec
- type TLSConfig
- type TaskState
- type WaitForFinalSnapshotSpec
Constants ¶
const ( // LabelAppNameKey is a label which sets the name of the resource provisioned for an etcd cluster. LabelAppNameKey = "app.kubernetes.io/name" // LabelManagedByKey is a key of a label which sets druid as a manager for resources provisioned for an etcd cluster. LabelManagedByKey = "app.kubernetes.io/managed-by" // LabelManagedByValue is the value for LabelManagedByKey. LabelManagedByValue = "etcd-druid" // LabelPartOfKey is a key of a label which establishes that a provisioned resource belongs to a parent etcd cluster. LabelPartOfKey = "app.kubernetes.io/part-of" // LabelComponentKey is a key for a label that sets the component type on resources provisioned for an etcd cluster. LabelComponentKey = "app.kubernetes.io/component" )
Common label keys to be placed on all druid-managed resources
const ( // SuspendEtcdSpecReconcileAnnotation is an annotation set by an operator to temporarily suspend any etcd spec reconciliation. SuspendEtcdSpecReconcileAnnotation = "druid.gardener.cloud/suspend-etcd-spec-reconcile" // DisableEtcdComponentProtectionAnnotation is an annotation set by an operator to disable protection of components created for // an etcd cluster and managed by etcd-druid. DisableEtcdComponentProtectionAnnotation = "druid.gardener.cloud/disable-etcd-component-protection" // GardenerOperationAnnotation is an annotation set by an operator to specify the operation that is desired on an Etcd resource. // Deprecated: Please use DruidOperationAnnotation instead. GardenerOperationAnnotation = "gardener.cloud/operation" // DruidOperationAnnotation is an annotation set by an operator to specify the operation that is desired on an Etcd resource. DruidOperationAnnotation = "druid.gardener.cloud/operation" // DruidOperationReconcile is the value for the DruidOperationAnnotation key to specify that the desired operation is to reconcile the Etcd Resource. // This value will only be effective if etcd-druid is not configured with auto-reconciliation of Etcd resource specification via // --enable-etcd-spec-auto-reconcile CLI flag. DruidOperationReconcile = "reconcile" // DisableEtcdRuntimeComponentCreationAnnotation is an annotation set by an operator to disable the creation and management of // runtime components of the etcd cluster such as pods, PVCs, leases, RBAC resources, PDBs, services, etc. DisableEtcdRuntimeComponentCreationAnnotation = "druid.gardener.cloud/disable-etcd-runtime-component-creation" )
Annotation keys that can be placed on an Etcd custom resource.
const ( // PodFailureReasonPreemptionByScheduler is a reason for a pod failure that indicates that the pod was preempted by the scheduler. PodFailureReasonPreemptionByScheduler = v1.PodReasonPreemptionByScheduler // PodFailureReasonDeletionByTaintManager is a reason for a pod failure that indicates that the pod was deleted by the taint manager. PodFailureReasonDeletionByTaintManager = "DeletionByTaintManager" // PodFailureReasonEvictionByEvictionAPI is a reason for a pod failure that indicates that the pod was evicted by the eviction API. PodFailureReasonEvictionByEvictionAPI = "EvictionByEvictionAPI" // PodFailureReasonTerminationByKubelet is a reason for a pod failure that indicates that the pod was terminated by the kubelet. PodFailureReasonTerminationByKubelet = v1.PodReasonTerminationByKubelet // PodFailureReasonProcessFailure is a reason for a pod failure that indicates that the pod process failed. PodFailureReasonProcessFailure = "ProcessFailure" // PodFailureReasonUnknown is a reason for a pod failure that indicates that the reason for the pod failure is unknown. PodFailureReasonUnknown = "Unknown" // PodSuccessReasonNone is a reason for a pod success that indicates that the pod has not failed. PodSuccessReasonNone = "None" // JobFailureReasonDeadlineExceeded is a reason for a job failure that indicates that the job has exceeded its deadline. JobFailureReasonDeadlineExceeded = batchv1.JobReasonDeadlineExceeded // JobFailureReasonBackoffLimitExceeded is a reason for a job failure that indicates that the job has exceeded its backoff limit. JobFailureReasonBackoffLimitExceeded = batchv1.JobReasonBackoffLimitExceeded // FullSnapshotSuccessReason is the reason for a successful full snapshot. FullSnapshotSuccessReason string = "FullSnapshotTakenSuccessfully" // FullSnapshotFailureReason is the reason for a failed full snapshot. FullSnapshotFailureReason string = "ErrorTriggeringFullSnapshot" )
Compaction Job/Pod reasons that are used to set the reason for a pod condition in the status of an Etcd resource.
const ( // GarbageCollectionPolicyExponential defines the exponential policy for garbage collecting old backups GarbageCollectionPolicyExponential = "Exponential" // GarbageCollectionPolicyLimitBased defines the limit based policy for garbage collecting old backups GarbageCollectionPolicyLimitBased = "LimitBased" // Basic is a constant for metrics level basic. Basic MetricsLevel = "basic" // Extensive is a constant for metrics level extensive. Extensive MetricsLevel = "extensive" // GzipCompression is constant for gzip compression policy. GzipCompression CompressionPolicy = "gzip" // LzwCompression is constant for lzw compression policy. LzwCompression CompressionPolicy = "lzw" // ZlibCompression is constant for zlib compression policy. ZlibCompression CompressionPolicy = "zlib" // DefaultCompression is constant for default compression policy(only if compression is enabled). DefaultCompression = GzipCompression // DefaultCompressionEnabled is constant to define whether to compress the snapshots or not. DefaultCompressionEnabled bool = true // Periodic is a constant to set auto-compaction-mode 'periodic' for duration based retention. Periodic CompactionMode = "periodic" // Revision is a constant to set auto-compaction-mode 'revision' for revision number based retention. Revision CompactionMode = "revision" )
const ( // LastOperationTypeCreate indicates that the last operation was a creation of a new Etcd resource. LastOperationTypeCreate druidapicommon.LastOperationType = "Create" // LastOperationTypeReconcile indicates that the last operation was a reconciliation of the spec of an Etcd resource. LastOperationTypeReconcile druidapicommon.LastOperationType = "Reconcile" // LastOperationTypeDelete indicates that the last operation was a deletion of an existing Etcd resource. LastOperationTypeDelete druidapicommon.LastOperationType = "Delete" )
const ( // LastOperationStateProcessing indicates that an operation is in progress. LastOperationStateProcessing druidapicommon.LastOperationState = "Processing" // LastOperationStateSucceeded indicates that an operation has completed successfully. LastOperationStateSucceeded druidapicommon.LastOperationState = "Succeeded" // LastOperationStateError indicates that an operation is completed with errors and will be retried. LastOperationStateError druidapicommon.LastOperationState = "Error" // LastOperationStateRequeue indicates that an operation is not completed and either due to an error or unfulfilled conditions will be retried. LastOperationStateRequeue druidapicommon.LastOperationState = "Requeue" )
const ( // LastOperationTypeAdmit indicates that the task is in the admission phase. LastOperationTypeAdmit druidapicommon.LastOperationType = "Admit" // LastOperationTypeExecution indicates that the task has successfully passed admission criteria and is currently being executed. LastOperationTypeExecution druidapicommon.LastOperationType = "Execution" // LastOperationTypeCleanup indicates that the cleanup of the task resources has begun. // This will happen when the task has completed and its TTL has expired. LastOperationTypeCleanup druidapicommon.LastOperationType = "Cleanup" )
const ( // LastOperationStateInProgress indicates that the operation is currently in progress. LastOperationStateInProgress druidapicommon.LastOperationState = "InProgress" // LastOperationStateCompleted indicates that the operation has completed. LastOperationStateCompleted druidapicommon.LastOperationState = "Completed" // LastOperationStateFailed indicates that the operation has failed. LastOperationStateFailed druidapicommon.LastOperationState = "Failed" )
const GroupName = "druid.gardener.cloud"
GroupName is the name of the druid API group.
Variables ¶
var ( // SchemeGroupVersion is group version used to register objects from the etcd-druid API. SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = localSchemeBuilder.AddToScheme )
nolint:gochecknoglobals
Functions ¶
func AreManagedResourcesProtected ¶
func AreManagedResourcesProtected(etcdObjMeta metav1.ObjectMeta) bool
AreManagedResourcesProtected returns false if the Etcd resource has the `druid.gardener.cloud/disable-etcd-component-protection` annotation set, else returns true.
func GetAllPodNames ¶
func GetAllPodNames(etcdObjMeta metav1.ObjectMeta, replicas int32) []string
GetAllPodNames returns the names of all pods for the Etcd.
func GetAsOwnerReference ¶
func GetAsOwnerReference(etcdObjMeta metav1.ObjectMeta) metav1.OwnerReference
GetAsOwnerReference returns an OwnerReference object that represents the current Etcd instance.
func GetClientServiceName ¶
func GetClientServiceName(etcdObjMeta metav1.ObjectMeta) string
GetClientServiceName returns the client service name for the Etcd cluster reachable by external clients.
func GetCompactionJobName ¶
func GetCompactionJobName(etcdObjMeta metav1.ObjectMeta) string
GetCompactionJobName returns the compaction job name for the Etcd.
func GetConfigMapName ¶
func GetConfigMapName(etcdObjMeta metav1.ObjectMeta) string
GetConfigMapName returns the name of the configmap for the Etcd.
func GetDefaultLabels ¶
func GetDefaultLabels(etcdObjMeta metav1.ObjectMeta) map[string]string
GetDefaultLabels returns the default labels for etcd.
func GetDeltaSnapshotLeaseName ¶
func GetDeltaSnapshotLeaseName(etcdObjMeta metav1.ObjectMeta) string
GetDeltaSnapshotLeaseName returns the name of the delta snapshot lease for the Etcd.
func GetFullSnapshotLeaseName ¶
func GetFullSnapshotLeaseName(etcdObjMeta metav1.ObjectMeta) string
GetFullSnapshotLeaseName returns the name of the full snapshot lease for the Etcd.
func GetMemberLeaseNames ¶
func GetMemberLeaseNames(etcdObjMeta metav1.ObjectMeta, replicas int32) []string
GetMemberLeaseNames returns the name of member leases for the Etcd.
func GetNamespaceName ¶
func GetNamespaceName(etcdObjMeta metav1.ObjectMeta) types.NamespacedName
GetNamespaceName is a convenience function which creates a types.NamespacedName for an Etcd resource.
func GetOrdinalPodName ¶
func GetOrdinalPodName(etcdObjMeta metav1.ObjectMeta, ordinal int) string
GetOrdinalPodName returns the Etcd pod name based on the ordinal.
func GetPeerServiceName ¶
func GetPeerServiceName(etcdObjMeta metav1.ObjectMeta) string
GetPeerServiceName returns the peer service name for the Etcd cluster reachable by members within the Etcd cluster.
func GetPodDisruptionBudgetName ¶
func GetPodDisruptionBudgetName(etcdObjMeta metav1.ObjectMeta) string
GetPodDisruptionBudgetName returns the name of the pod disruption budget for the Etcd.
func GetReconcileOperationAnnotationKey ¶
func GetReconcileOperationAnnotationKey(etcdObjMeta metav1.ObjectMeta) *string
GetReconcileOperationAnnotationKey returns the reconcile operation annotation key set on an Etcd resource. It will return nil if no such annotation is found.
func GetRoleBindingName ¶
func GetRoleBindingName(etcdObjMeta metav1.ObjectMeta) string
GetRoleBindingName returns the role binding name for the Etcd.
func GetRoleName ¶
func GetRoleName(etcdObjMeta metav1.ObjectMeta) string
GetRoleName returns the role name for the Etcd.
func GetServiceAccountName ¶
func GetServiceAccountName(etcdObjMeta metav1.ObjectMeta) string
GetServiceAccountName returns the service account name for the Etcd.
func GetStatefulSetName ¶
func GetStatefulSetName(etcdObjMeta metav1.ObjectMeta) string
GetStatefulSetName returns the name of the StatefulSet for the Etcd.
func GetSuspendEtcdSpecReconcileAnnotationKey ¶
func GetSuspendEtcdSpecReconcileAnnotationKey(etcdObjMeta metav1.ObjectMeta) *string
GetSuspendEtcdSpecReconcileAnnotationKey gets the annotation key set on an Etcd resource signalling the intent to suspend spec reconciliation for this Etcd resource. If no annotation is set then it will return nil.
func HasReconcileOperationAnnotation ¶
func HasReconcileOperationAnnotation(etcdObjMeta metav1.ObjectMeta) bool
HasReconcileOperationAnnotation checks if an Etcd resource has been annotated with an operation annotation with its value set to reconcile.
func IsEtcdRuntimeComponentCreationEnabled ¶ added in v0.31.0
func IsEtcdRuntimeComponentCreationEnabled(etcdObjMeta metav1.ObjectMeta) bool
IsEtcdRuntimeComponentCreationEnabled checks if the creation of runtime components is enabled for an Etcd resource.
func IsResourceMarkedForDeletion ¶ added in v0.34.0
func IsResourceMarkedForDeletion(objMeta metav1.ObjectMeta) bool
IsResourceMarkedForDeletion returns true if the Etcd object is marked for deletion and false otherwise.
func RemoveOperationAnnotation ¶
func RemoveOperationAnnotation(etcdObjMeta metav1.ObjectMeta)
RemoveOperationAnnotation removes any operation annotation from the Etcd.ObjectMetadata.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource.
Types ¶
type BackupSpec ¶
type BackupSpec struct {
// Port define the port on which etcd-backup-restore server will be exposed.
// +optional
Port *int32 `json:"port,omitempty"`
// +optional
TLS *TLSConfig `json:"tls,omitempty"`
// Image defines the etcd container image and tag
// +optional
Image *string `json:"image,omitempty"`
// Store defines the specification of object store provider for storing backups.
// +optional
Store *StoreSpec `json:"store,omitempty"`
// Resources defines compute Resources required by backup-restore container.
// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// SnapshotCompaction defines the specification for compaction of backups.
// +optional
SnapshotCompaction *SnapshotCompactionSpec `json:"snapshotCompaction,omitempty"`
// FullSnapshotSchedule defines the cron standard schedule for full snapshots.
// +optional
// +kubebuilder:validation:Pattern="^(\\*|[1-5]?[0-9]|[1-5]?[0-9]-[1-5]?[0-9]|(?:[1-9]|[1-4][0-9]|5[0-9])\\/(?:[1-9]|[1-4][0-9]|5[0-9]|60)|\\*\\/(?:[1-9]|[1-4][0-9]|5[0-9]|60))\\s+(\\*|[0-9]|1[0-9]|2[0-3]|[0-9]-(?:[0-9]|1[0-9]|2[0-3])|1[0-9]-(?:1[0-9]|2[0-3])|2[0-3]-2[0-3]|(?:[1-9]|1[0-9]|2[0-3])\\/(?:[1-9]|1[0-9]|2[0-4])|\\*\\/(?:[1-9]|1[0-9]|2[0-4]))\\s+(\\*|[1-9]|[12][0-9]|3[01]|[1-9]-(?:[1-9]|[12][0-9]|3[01])|[12][0-9]-(?:[12][0-9]|3[01])|3[01]-3[01]|(?:[1-9]|[12][0-9]|30)\\/(?:[1-9]|[12][0-9]|3[01])|\\*\\/(?:[1-9]|[12][0-9]|3[01]))\\s+(\\*|[1-9]|1[0-2]|[1-9]-(?:[1-9]|1[0-2])|1[0-2]-1[0-2]|(?:[1-9]|1[0-2])\\/(?:[1-9]|1[0-2])|\\*\\/(?:[1-9]|1[0-2]))\\s+(\\*|[1-7]|[1-6]-[1-7]|[1-6]\\/[1-7]|\\*\\/[1-7])$"
FullSnapshotSchedule *string `json:"fullSnapshotSchedule,omitempty"`
// GarbageCollectionPolicy defines the policy for garbage collecting old backups
// +optional
GarbageCollectionPolicy *GarbageCollectionPolicy `json:"garbageCollectionPolicy,omitempty"`
// MaxBackupsLimitBasedGC defines the maximum number of Full snapshots to retain in Limit Based GarbageCollectionPolicy
// All full snapshots beyond this limit will be garbage collected.
// +optional
MaxBackupsLimitBasedGC *int32 `json:"maxBackupsLimitBasedGC,omitempty"`
// GarbageCollectionPeriod defines the period for garbage collecting old backups
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$"
GarbageCollectionPeriod *metav1.Duration `json:"garbageCollectionPeriod,omitempty"`
// DeltaSnapshotPeriod defines the period after which delta snapshots will be taken
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$"
DeltaSnapshotPeriod *metav1.Duration `json:"deltaSnapshotPeriod,omitempty"`
// DeltaSnapshotMemoryLimit defines the memory limit after which delta snapshots will be taken
// +optional
DeltaSnapshotMemoryLimit *resource.Quantity `json:"deltaSnapshotMemoryLimit,omitempty"`
// DeltaSnapshotRetentionPeriod defines the duration for which delta snapshots will be retained, excluding the latest snapshot set.
// The value should be a string formatted as a duration (e.g., '1s', '2m', '3h', '4d')
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$"
// +optional
DeltaSnapshotRetentionPeriod *metav1.Duration `json:"deltaSnapshotRetentionPeriod,omitempty"`
// SnapshotCompression defines the specification for compression of Snapshots.
// +optional
SnapshotCompression *CompressionSpec `json:"compression,omitempty"`
// EnableProfiling defines if profiling should be enabled for the etcd-backup-restore-sidecar
// +optional
EnableProfiling *bool `json:"enableProfiling,omitempty"`
// EtcdSnapshotTimeout defines the timeout duration for etcd FullSnapshot operation
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$"
EtcdSnapshotTimeout *metav1.Duration `json:"etcdSnapshotTimeout,omitempty"`
// LeaderElection defines parameters related to the LeaderElection configuration.
// +optional
LeaderElection *LeaderElectionSpec `json:"leaderElection,omitempty"`
}
BackupSpec defines parameters associated with the full and delta snapshots of etcd. +kubebuilder:validation:XValidation:message="etcd.spec.backup.garbageCollectionPeriod must be greater than etcd.spec.backup.deltaSnapshotPeriod",rule="!(has(self.deltaSnapshotPeriod) && has(self.garbageCollectionPeriod)) || duration(self.deltaSnapshotPeriod).getSeconds() < duration(self.garbageCollectionPeriod).getSeconds()"
func (*BackupSpec) DeepCopy ¶
func (in *BackupSpec) DeepCopy() *BackupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSpec.
func (*BackupSpec) DeepCopyInto ¶
func (in *BackupSpec) DeepCopyInto(out *BackupSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClientService ¶
type ClientService struct {
// Annotations specify the annotations that should be added to the client service
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
// Labels specify the labels that should be added to the client service
// +optional
Labels map[string]string `json:"labels,omitempty"`
// TrafficDistribution defines the traffic distribution preference that should be added to the client service.
// More info: https://kubernetes.io/docs/reference/networking/virtual-ips/#traffic-distribution
// +optional
// +kubebuilder:validation:Enum=PreferSameZone;PreferSameNode;PreferClose
TrafficDistribution *string `json:"trafficDistribution,omitempty"`
}
ClientService defines the parameters of the client service that a user can specify
func (*ClientService) DeepCopy ¶
func (in *ClientService) DeepCopy() *ClientService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientService.
func (*ClientService) DeepCopyInto ¶
func (in *ClientService) DeepCopyInto(out *ClientService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CompactionMode ¶
type CompactionMode string
CompactionMode defines the auto-compaction-mode: 'periodic' or 'revision'. 'periodic' for duration based retention and 'revision' for revision number based retention. +kubebuilder:validation:Enum=periodic;revision
type CompressionPolicy ¶
type CompressionPolicy string
CompressionPolicy defines the type of policy for compression of snapshots. +kubebuilder:validation:Enum=gzip;lzw;zlib
type CompressionSpec ¶
type CompressionSpec struct {
// +optional
Enabled *bool `json:"enabled,omitempty"`
// +optional
Policy *CompressionPolicy `json:"policy,omitempty"`
}
CompressionSpec defines parameters related to compression of Snapshots(full as well as delta).
func (*CompressionSpec) DeepCopy ¶
func (in *CompressionSpec) DeepCopy() *CompressionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompressionSpec.
func (*CompressionSpec) DeepCopyInto ¶
func (in *CompressionSpec) DeepCopyInto(out *CompressionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Condition ¶
type Condition struct {
// Type of the Etcd condition.
Type ConditionType `json:"type"`
// Status of the condition, one of True, False, Unknown.
Status ConditionStatus `json:"status"`
// Last time the condition transitioned from one status to another.
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
// Last time the condition was updated.
LastUpdateTime metav1.Time `json:"lastUpdateTime"`
// The reason for the condition's last transition.
Reason string `json:"reason"`
// A human-readable message indicating details about the transition.
Message string `json:"message"`
}
Condition holds the information about the state of a resource.
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionStatus ¶
type ConditionStatus string
ConditionStatus is the status of a condition.
const ( // ConditionTrue means a resource is in the condition. ConditionTrue ConditionStatus = "True" // ConditionFalse means a resource is not in the condition. ConditionFalse ConditionStatus = "False" // ConditionUnknown means Gardener can't decide if a resource is in the condition or not. ConditionUnknown ConditionStatus = "Unknown" // ConditionProgressing means the condition was seen true, failed but stayed within a predefined failure threshold. // In the future, we could add other intermediate conditions, e.g. ConditionDegraded. // Deprecated: Will be removed in the future since druid conditions will be replaced by metav1.Condition // which has only three status options: True, False, Unknown. ConditionProgressing ConditionStatus = "Progressing" // ConditionCheckError is a constant for a reason in condition. // Deprecated: Will be removed in the future since druid conditions will be replaced by metav1.Condition // which has only three status options: True, False, Unknown. ConditionCheckError ConditionStatus = "ConditionCheckError" )
type ConditionType ¶
type ConditionType string
ConditionType is the type of condition.
const ( // ConditionTypeReady is a constant for a condition type indicating that the etcd cluster is ready. ConditionTypeReady ConditionType = "Ready" // ConditionTypeLastSnapshotCompactionSucceeded is a constant for a condition type indicating the status of last snapshot compaction. // If `ConditionTypeLastSnapshotCompactionSucceeded` condition status is `False`, it means the compaction controller is currently retrying the compaction operation. // Compaction operation can either be a compaction job or a full snapshot. ConditionTypeLastSnapshotCompactionSucceeded ConditionType = "LastSnapshotCompactionSucceeded" // ConditionTypeAllMembersReady is a constant for a condition type indicating that all members of the etcd cluster are ready. ConditionTypeAllMembersReady ConditionType = "AllMembersReady" // ConditionTypeAllMembersUpdated is a constant for a condition type indicating that all members // of the etcd cluster have been updated with the desired spec changes. ConditionTypeAllMembersUpdated ConditionType = "AllMembersUpdated" // ConditionTypeBackupReady is a constant for a condition type indicating that the etcd backup is ready. ConditionTypeBackupReady ConditionType = "BackupReady" // ConditionTypeDataVolumesReady is a constant for a condition type indicating that the etcd data volumes are ready. ConditionTypeDataVolumesReady ConditionType = "DataVolumesReady" // ConditionTypeClusterIDMismatch is a constant for a condition type indicating that the etcd cluster has multiple cluster IDs. ConditionTypeClusterIDMismatch ConditionType = "ClusterIDMismatch" )
const ( // EtcdCopyBackupsTaskSucceeded is a condition type indicating that a EtcdCopyBackupsTask has succeeded. EtcdCopyBackupsTaskSucceeded ConditionType = "Succeeded" // EtcdCopyBackupsTaskFailed is a condition type indicating that a EtcdCopyBackupsTask has failed. EtcdCopyBackupsTaskFailed ConditionType = "Failed" )
type CrossVersionObjectReference ¶
type CrossVersionObjectReference struct {
// Kind of the referent
// +required
Kind string `json:"kind,omitempty"`
// Name of the referent
// +required
Name string `json:"name,omitempty"`
// API version of the referent
// +optional
APIVersion string `json:"apiVersion,omitempty"`
}
CrossVersionObjectReference contains enough information to let you identify the referred resource.
func (*CrossVersionObjectReference) DeepCopy ¶
func (in *CrossVersionObjectReference) DeepCopy() *CrossVersionObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossVersionObjectReference.
func (*CrossVersionObjectReference) DeepCopyInto ¶
func (in *CrossVersionObjectReference) DeepCopyInto(out *CrossVersionObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Etcd ¶
type Etcd struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec EtcdSpec `json:"spec,omitempty"`
Status EtcdStatus `json:"status,omitempty"`
}
Etcd is the Schema for the etcds API
func (*Etcd) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Etcd.
func (*Etcd) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Etcd) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Etcd) IsBackupStoreEnabled ¶
IsBackupStoreEnabled returns true if backup store has been enabled for the Etcd resource, else returns false.
func (*Etcd) IsDeletionInProgress ¶
IsDeletionInProgress returns true if the Etcd resource is currently being reconciled, else returns false.
func (*Etcd) IsReady ¶ added in v0.34.0
IsReady checks if the etcd object is ready by examining its conditions.
func (*Etcd) IsReconciliationInProgress ¶
IsReconciliationInProgress returns true if the Etcd resource is currently being reconciled, else returns false.
type EtcdConfig ¶
type EtcdConfig struct {
// Quota defines the etcd DB quota.
// +optional
Quota *resource.Quantity `json:"quota,omitempty"`
// SnapshotCount defines the number of applied Raft entries to hold in-memory before compaction.
// More info: https://etcd.io/docs/v3.4/op-guide/maintenance/#raft-log-retention
// +optional
SnapshotCount *int64 `json:"snapshotCount,omitempty"`
// EnableGRPCGateway enables the gRPC-Gateway proxy for etcd.
// +optional
EnableGRPCGateway *bool `json:"enableGRPCGateway,omitempty"`
// DefragmentationSchedule defines the cron standard schedule for defragmentation of etcd.
// +optional
// +kubebuilder:validation:Pattern="^(\\*|[1-5]?[0-9]|[1-5]?[0-9]-[1-5]?[0-9]|(?:[1-9]|[1-4][0-9]|5[0-9])\\/(?:[1-9]|[1-4][0-9]|5[0-9]|60)|\\*\\/(?:[1-9]|[1-4][0-9]|5[0-9]|60))\\s+(\\*|[0-9]|1[0-9]|2[0-3]|[0-9]-(?:[0-9]|1[0-9]|2[0-3])|1[0-9]-(?:1[0-9]|2[0-3])|2[0-3]-2[0-3]|(?:[1-9]|1[0-9]|2[0-3])\\/(?:[1-9]|1[0-9]|2[0-4])|\\*\\/(?:[1-9]|1[0-9]|2[0-4]))\\s+(\\*|[1-9]|[12][0-9]|3[01]|[1-9]-(?:[1-9]|[12][0-9]|3[01])|[12][0-9]-(?:[12][0-9]|3[01])|3[01]-3[01]|(?:[1-9]|[12][0-9]|30)\\/(?:[1-9]|[12][0-9]|3[01])|\\*\\/(?:[1-9]|[12][0-9]|3[01]))\\s+(\\*|[1-9]|1[0-2]|[1-9]-(?:[1-9]|1[0-2])|1[0-2]-1[0-2]|(?:[1-9]|1[0-2])\\/(?:[1-9]|1[0-2])|\\*\\/(?:[1-9]|1[0-2]))\\s+(\\*|[1-7]|[1-6]-[1-7]|[1-6]\\/[1-7]|\\*\\/[1-7])$"
DefragmentationSchedule *string `json:"defragmentationSchedule,omitempty"`
// +optional
ServerPort *int32 `json:"serverPort,omitempty"`
// +optional
ClientPort *int32 `json:"clientPort,omitempty"`
// +optional
WrapperPort *int32 `json:"wrapperPort,omitempty"`
// Image defines the etcd container image and tag
// +optional
Image *string `json:"image,omitempty"`
// +optional
AuthSecretRef *corev1.SecretReference `json:"authSecretRef,omitempty"`
// Metrics defines the level of detail for exported metrics of etcd, specify 'extensive' to include histogram metrics.
// +optional
Metrics *MetricsLevel `json:"metrics,omitempty"`
// Resources defines the compute Resources required by etcd container.
// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// ClientUrlTLS contains the ca, server TLS and client TLS secrets for client communication to ETCD cluster
// +optional
ClientUrlTLS *TLSConfig `json:"clientUrlTls,omitempty"`
// PeerUrlTLS contains the ca and server TLS secrets for peer communication within ETCD cluster
// Currently, PeerUrlTLS does not require client TLS secrets for gardener implementation of ETCD cluster.
// +optional
PeerUrlTLS *TLSConfig `json:"peerUrlTls,omitempty"`
// EtcdDefragTimeout defines the timeout duration for etcd defrag call
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$"
EtcdDefragTimeout *metav1.Duration `json:"etcdDefragTimeout,omitempty"`
// HeartbeatDuration defines the duration for members to send heartbeats. The default value is 10s.
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$"
HeartbeatDuration *metav1.Duration `json:"heartbeatDuration,omitempty"`
// ClientService defines the parameters of the client service that a user can specify
// +optional
ClientService *ClientService `json:"clientService,omitempty"`
}
EtcdConfig defines the configuration for the etcd cluster to be deployed.
func (*EtcdConfig) DeepCopy ¶
func (in *EtcdConfig) DeepCopy() *EtcdConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdConfig.
func (*EtcdConfig) DeepCopyInto ¶
func (in *EtcdConfig) DeepCopyInto(out *EtcdConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdCopyBackupsTask ¶
type EtcdCopyBackupsTask struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec EtcdCopyBackupsTaskSpec `json:"spec,omitempty"`
Status EtcdCopyBackupsTaskStatus `json:"status,omitempty"`
}
EtcdCopyBackupsTask is a task for copying etcd backups from a source to a target store.
func (*EtcdCopyBackupsTask) DeepCopy ¶
func (in *EtcdCopyBackupsTask) DeepCopy() *EtcdCopyBackupsTask
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdCopyBackupsTask.
func (*EtcdCopyBackupsTask) DeepCopyInto ¶
func (in *EtcdCopyBackupsTask) DeepCopyInto(out *EtcdCopyBackupsTask)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EtcdCopyBackupsTask) DeepCopyObject ¶
func (in *EtcdCopyBackupsTask) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*EtcdCopyBackupsTask) GetJobName ¶
func (e *EtcdCopyBackupsTask) GetJobName() string
GetJobName returns the name of the CopyBackups Job.
type EtcdCopyBackupsTaskList ¶
type EtcdCopyBackupsTaskList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []EtcdCopyBackupsTask `json:"items"`
}
EtcdCopyBackupsTaskList contains a list of EtcdCopyBackupsTask objects.
func (*EtcdCopyBackupsTaskList) DeepCopy ¶
func (in *EtcdCopyBackupsTaskList) DeepCopy() *EtcdCopyBackupsTaskList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdCopyBackupsTaskList.
func (*EtcdCopyBackupsTaskList) DeepCopyInto ¶
func (in *EtcdCopyBackupsTaskList) DeepCopyInto(out *EtcdCopyBackupsTaskList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EtcdCopyBackupsTaskList) DeepCopyObject ¶
func (in *EtcdCopyBackupsTaskList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EtcdCopyBackupsTaskSpec ¶
type EtcdCopyBackupsTaskSpec struct {
// PodLabels is a set of labels that will be added to pod(s) created by the copy backups task.
// +optional
PodLabels map[string]string `json:"podLabels,omitempty"`
// SourceStore defines the specification of the source object store provider for storing backups.
SourceStore StoreSpec `json:"sourceStore"`
// TargetStore defines the specification of the target object store provider for storing backups.
TargetStore StoreSpec `json:"targetStore"`
// MaxBackupAge is the maximum age in days that a backup must have in order to be copied.
// By default, all backups will be copied.
// +optional
// +kubebuilder:validation:Minimum=0
MaxBackupAge *uint32 `json:"maxBackupAge,omitempty"`
// MaxBackups is the maximum number of backups that will be copied starting with the most recent ones.
// +optional
// +kubebuilder:validation:Minimum=0
MaxBackups *uint32 `json:"maxBackups,omitempty"`
// WaitForFinalSnapshot defines the parameters for waiting for a final full snapshot before copying backups.
// +optional
WaitForFinalSnapshot *WaitForFinalSnapshotSpec `json:"waitForFinalSnapshot,omitempty"`
}
EtcdCopyBackupsTaskSpec defines the parameters for the copy backups task.
func (*EtcdCopyBackupsTaskSpec) DeepCopy ¶
func (in *EtcdCopyBackupsTaskSpec) DeepCopy() *EtcdCopyBackupsTaskSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdCopyBackupsTaskSpec.
func (*EtcdCopyBackupsTaskSpec) DeepCopyInto ¶
func (in *EtcdCopyBackupsTaskSpec) DeepCopyInto(out *EtcdCopyBackupsTaskSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdCopyBackupsTaskStatus ¶
type EtcdCopyBackupsTaskStatus struct {
// Conditions represents the latest available observations of an object's current state.
// +patchMergeKey=type
// +patchStrategy=merge
// +optional
Conditions []Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
// ObservedGeneration is the most recent generation observed for this resource.
// +optional
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// LastError represents the last occurred error.
// +optional
LastError *string `json:"lastError,omitempty"`
}
EtcdCopyBackupsTaskStatus defines the observed state of the copy backups task.
func (*EtcdCopyBackupsTaskStatus) DeepCopy ¶
func (in *EtcdCopyBackupsTaskStatus) DeepCopy() *EtcdCopyBackupsTaskStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdCopyBackupsTaskStatus.
func (*EtcdCopyBackupsTaskStatus) DeepCopyInto ¶
func (in *EtcdCopyBackupsTaskStatus) DeepCopyInto(out *EtcdCopyBackupsTaskStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdList ¶
type EtcdList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Etcd `json:"items"`
}
EtcdList contains a list of Etcd
func (*EtcdList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdList.
func (*EtcdList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EtcdList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EtcdMemberConditionStatus ¶
type EtcdMemberConditionStatus string
EtcdMemberConditionStatus is the status of an etcd cluster member.
const ( // EtcdMemberStatusReady indicates that the etcd member is ready. EtcdMemberStatusReady EtcdMemberConditionStatus = "Ready" // EtcdMemberStatusNotReady indicates that the etcd member is not ready. EtcdMemberStatusNotReady EtcdMemberConditionStatus = "NotReady" // EtcdMemberStatusUnknown indicates that the status of the etcd member is unknown. EtcdMemberStatusUnknown EtcdMemberConditionStatus = "Unknown" )
type EtcdMemberStatus ¶
type EtcdMemberStatus struct {
// Name is the name of the etcd member. It is the name of the backing `Pod`.
Name string `json:"name"`
// ID is the ID of the etcd member.
// +optional
ID *string `json:"id,omitempty"`
// Role is the role in the etcd cluster, either `Leader` or `Member`.
// +optional
Role *EtcdRole `json:"role,omitempty"`
// Status of the condition, one of True, False, Unknown.
Status EtcdMemberConditionStatus `json:"status"`
// The reason for the condition's last transition.
Reason string `json:"reason"`
// LastTransitionTime is the last time the condition's status changed.
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
}
EtcdMemberStatus holds information about etcd cluster membership.
func (*EtcdMemberStatus) DeepCopy ¶
func (in *EtcdMemberStatus) DeepCopy() *EtcdMemberStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdMemberStatus.
func (*EtcdMemberStatus) DeepCopyInto ¶
func (in *EtcdMemberStatus) DeepCopyInto(out *EtcdMemberStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdOpsTask ¶ added in v0.34.0
type EtcdOpsTask struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
// Spec defines the desired specification of the EtcdOpsTask.
// +kubebuilder:validation:Required
Spec EtcdOpsTaskSpec `json:"spec"`
// Status defines the observed state of the EtcdOpsTask.
// +optional
Status EtcdOpsTaskStatus `json:"status,omitempty"`
}
EtcdOpsTask represents a task to perform operations on an Etcd cluster. It defines the desired configuration in Spec and tracks the observed state in Status.
func (*EtcdOpsTask) DeepCopy ¶ added in v0.34.0
func (in *EtcdOpsTask) DeepCopy() *EtcdOpsTask
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdOpsTask.
func (*EtcdOpsTask) DeepCopyInto ¶ added in v0.34.0
func (in *EtcdOpsTask) DeepCopyInto(out *EtcdOpsTask)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EtcdOpsTask) DeepCopyObject ¶ added in v0.34.0
func (in *EtcdOpsTask) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*EtcdOpsTask) GetEtcdReference ¶ added in v0.34.0
func (t *EtcdOpsTask) GetEtcdReference() types.NamespacedName
GetEtcdReference returns the NamespacedName of the etcd object referenced by the task.
func (*EtcdOpsTask) GetTimeToExpiry ¶ added in v0.34.0
func (t *EtcdOpsTask) GetTimeToExpiry() time.Duration
GetTimeToExpiry returns the remaining duration until the task's TTL expires. If the task's TTL has already expired, it returns zero.
func (*EtcdOpsTask) HasTTLExpired ¶ added in v0.34.0
func (t *EtcdOpsTask) HasTTLExpired() bool
HasTTLExpired returns true if the TTL after completion has expired.
func (*EtcdOpsTask) IsCompleted ¶ added in v0.34.0
func (t *EtcdOpsTask) IsCompleted() bool
IsCompleted returns true if the task is completed. The etcdopsatask is considered as completed if the task has one of these states: Succeeded, Failed, or Rejected.
type EtcdOpsTaskConfig ¶ added in v0.34.0
type EtcdOpsTaskConfig struct {
// OnDemandSnapshot defines the configuration for an on-demand snapshot task.
// +optional
OnDemandSnapshot *OnDemandSnapshotConfig `json:"onDemandSnapshot,omitempty"`
}
EtcdOpsTaskConfig holds the configuration for the specific operation. Exactly one of its members must be set according to the operation to be performed. +kubebuilder:validation:MinProperties=1 +kubebuilder:validation:MaxProperties=1
func (*EtcdOpsTaskConfig) DeepCopy ¶ added in v0.34.0
func (in *EtcdOpsTaskConfig) DeepCopy() *EtcdOpsTaskConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdOpsTaskConfig.
func (*EtcdOpsTaskConfig) DeepCopyInto ¶ added in v0.34.0
func (in *EtcdOpsTaskConfig) DeepCopyInto(out *EtcdOpsTaskConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdOpsTaskList ¶ added in v0.34.0
type EtcdOpsTaskList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []EtcdOpsTask `json:"items"`
}
EtcdOpsTaskList contains a list of EtcdOpsTask.
func (*EtcdOpsTaskList) DeepCopy ¶ added in v0.34.0
func (in *EtcdOpsTaskList) DeepCopy() *EtcdOpsTaskList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdOpsTaskList.
func (*EtcdOpsTaskList) DeepCopyInto ¶ added in v0.34.0
func (in *EtcdOpsTaskList) DeepCopyInto(out *EtcdOpsTaskList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EtcdOpsTaskList) DeepCopyObject ¶ added in v0.34.0
func (in *EtcdOpsTaskList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EtcdOpsTaskSpec ¶ added in v0.34.0
type EtcdOpsTaskSpec struct {
// Config specifies the configuration for the operation to be performed.
// Exactly one of the members of EtcdOpsTaskConfig must be set.
// +kubebuilder:validation:Required
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="config is immutable"
Config EtcdOpsTaskConfig `json:"config"`
// TTLSecondsAfterFinished is the duration in seconds after which a finished task (status.state == Succeeded|Failed|Rejected) will be garbage-collected.
// +optional
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default:=3600
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ttlSecondsAfterFinished is immutable"
TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
// EtcdName refers to the name of the Etcd resource that this task will operate on.
// +optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="etcdName is immutable"
EtcdName *string `json:"etcdName"`
}
EtcdOpsTaskSpec defines the desired state of an EtcdOpsTask.
func (*EtcdOpsTaskSpec) DeepCopy ¶ added in v0.34.0
func (in *EtcdOpsTaskSpec) DeepCopy() *EtcdOpsTaskSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdOpsTaskSpec.
func (*EtcdOpsTaskSpec) DeepCopyInto ¶ added in v0.34.0
func (in *EtcdOpsTaskSpec) DeepCopyInto(out *EtcdOpsTaskSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdOpsTaskStatus ¶ added in v0.34.0
type EtcdOpsTaskStatus struct {
// State represents the current state of the task.
// +optional
State *TaskState `json:"state,omitempty"`
// LastTransitionTime is the last time the state transitioned from one value to another.
// +optional
LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"`
// StartedAt is the time at which the task transitioned from Pending to InProgress.
// +optional
StartedAt *metav1.Time `json:"startedAt,omitempty"`
// LastErrors is a list of the most recent errors observed during the task's execution.
// A maximum of 10 latest errors will be recorded.
// +optional
// +kubebuilder:validation:MaxItems=10
LastErrors []druidapicommon.LastError `json:"lastErrors,omitempty"`
// LastOperation tracks the fine-grained progress of the task's execution.
// The controller initializes this field when processing the task.
// +optional
LastOperation *druidapicommon.LastOperation `json:"lastOperation,omitempty"`
}
EtcdOpsTaskStatus defines the observed state of an EtcdOpsTask.
func (*EtcdOpsTaskStatus) DeepCopy ¶ added in v0.34.0
func (in *EtcdOpsTaskStatus) DeepCopy() *EtcdOpsTaskStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdOpsTaskStatus.
func (*EtcdOpsTaskStatus) DeepCopyInto ¶ added in v0.34.0
func (in *EtcdOpsTaskStatus) DeepCopyInto(out *EtcdOpsTaskStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdSpec ¶
type EtcdSpec struct {
// selector is a label query over pods that should match the replica count.
// It must match the pod template's labels.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
// +optional
// Deprecated: this field will be removed in the future.
Selector *metav1.LabelSelector `json:"selector"`
// Labels defines the labels to be applied to the etcd pods backing the etcd cluster.
// +required
Labels map[string]string `json:"labels"`
// Annotations defines the annotations to be applied to the etcd pods backing the etcd cluster.
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
// +required
Etcd EtcdConfig `json:"etcd"`
// +required
Backup BackupSpec `json:"backup"`
// +optional
Common SharedConfig `json:"sharedConfig,omitempty"`
// +optional
SchedulingConstraints SchedulingConstraints `json:"schedulingConstraints,omitempty"`
// Replicas defines the number of etcd pods to be deployed, subsequently defining the etcd cluster size.
// If set to 0, the etcd cluster will be scaled down, i.e., it will cease to run.
// It can be scaled back up to the previously set value to continue running the etcd cluster.
// +required
// +kubebuilder:validation:XValidation:message="Replicas can either be increased or be downscaled to 0.",rule="self==0 ? true : self < oldSelf ? false : true"
Replicas int32 `json:"replicas"`
// PriorityClassName is the name of a priority class that shall be used for the etcd pods.
// +optional
PriorityClassName *string `json:"priorityClassName,omitempty"`
// StorageClass defines the name of the StorageClass required by the claim.
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
// +optional
// +kubebuilder:validation:XValidation:message="etcd.spec.storageClass is an immutable field",rule="self == oldSelf"
StorageClass *string `json:"storageClass,omitempty"`
// StorageCapacity defines the size of persistent volume.
// +optional
StorageCapacity *resource.Quantity `json:"storageCapacity,omitempty"`
// VolumeClaimTemplate defines the volume claim template to be created
// +optional
// +kubebuilder:validation:XValidation:message="etcd.spec.VolumeClaimTemplate is an immutable field",rule="self == oldSelf"
VolumeClaimTemplate *string `json:"volumeClaimTemplate,omitempty"`
// RunAsRoot defines whether the securityContext of the pod specification should indicate that the containers shall
// run as root. By default, they run as non-root with user 'nobody'.
// +optional
RunAsRoot *bool `json:"runAsRoot,omitempty"`
}
EtcdSpec defines the desired state of Etcd +kubebuilder:validation:XValidation:message="etcd.spec.storageClass is an immutable field.",rule="has(oldSelf.storageClass) == has(self.storageClass)" +kubebuilder:validation:XValidation:message="etcd.spec.volumeClaimTemplate is an immutable field.",rule="has(oldSelf.volumeClaimTemplate) == has(self.volumeClaimTemplate)"
func (*EtcdSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdSpec.
func (*EtcdSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdStatus ¶
type EtcdStatus struct {
// ObservedGeneration is the most recent generation observed for this resource.
// +optional
ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
// +optional
Etcd *CrossVersionObjectReference `json:"etcd,omitempty"`
// Conditions represents the latest available observations of an etcd's current state.
// +optional
Conditions []Condition `json:"conditions,omitempty"`
// LastErrors captures errors that occurred during the last operation.
// +optional
LastErrors []druidapicommon.LastError `json:"lastErrors,omitempty"`
// LastOperation indicates the last operation performed on this resource.
// +optional
LastOperation *druidapicommon.LastOperation `json:"lastOperation,omitempty"`
// CurrentReplicas is the current replica count for the etcd cluster.
// +optional
CurrentReplicas int32 `json:"currentReplicas,omitempty"`
// Replicas is the replica count of the etcd cluster.
// +optional
Replicas int32 `json:"replicas,omitempty"`
// ReadyReplicas is the count of replicas being ready in the etcd cluster.
// +optional
ReadyReplicas int32 `json:"readyReplicas,omitempty"`
// Ready is `true` if all etcd replicas are ready.
// +optional
Ready *bool `json:"ready,omitempty"`
// LabelSelector is a label query over pods that should match the replica count.
// It must match the pod template's labels.
// Deprecated: this field will be removed in the future.
// +optional
LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
// Members represents the members of the etcd cluster
// +optional
Members []EtcdMemberStatus `json:"members,omitempty"`
// PeerUrlTLSEnabled captures the state of peer url TLS being enabled for the etcd member(s)
// +optional
PeerUrlTLSEnabled *bool `json:"peerUrlTLSEnabled,omitempty"`
// Selector is a label query over pods that should match the replica count.
// It must match the pod template's labels.
// +optional
Selector *string `json:"selector,omitempty"`
}
EtcdStatus defines the observed state of Etcd.
func (*EtcdStatus) DeepCopy ¶
func (in *EtcdStatus) DeepCopy() *EtcdStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdStatus.
func (*EtcdStatus) DeepCopyInto ¶
func (in *EtcdStatus) DeepCopyInto(out *EtcdStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GarbageCollectionPolicy ¶
type GarbageCollectionPolicy string
GarbageCollectionPolicy defines the type of policy for snapshot garbage collection. +kubebuilder:validation:Enum=Exponential;LimitBased
type LeaderElectionSpec ¶
type LeaderElectionSpec struct {
// ReelectionPeriod defines the Period after which leadership status of corresponding etcd is checked.
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$"
ReelectionPeriod *metav1.Duration `json:"reelectionPeriod,omitempty"`
// EtcdConnectionTimeout defines the timeout duration for etcd client connection during leader election.
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$"
EtcdConnectionTimeout *metav1.Duration `json:"etcdConnectionTimeout,omitempty"`
}
LeaderElectionSpec defines parameters related to the LeaderElection configuration.
func (*LeaderElectionSpec) DeepCopy ¶
func (in *LeaderElectionSpec) DeepCopy() *LeaderElectionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaderElectionSpec.
func (*LeaderElectionSpec) DeepCopyInto ¶
func (in *LeaderElectionSpec) DeepCopyInto(out *LeaderElectionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetricsLevel ¶
type MetricsLevel string
MetricsLevel defines the level 'basic' or 'extensive'. +kubebuilder:validation:Enum=basic;extensive
type OnDemandSnapshotConfig ¶ added in v0.34.0
type OnDemandSnapshotConfig struct {
// Type specifies whether the snapshot is a 'full' or 'delta' snapshot.
// Use 'full' for a complete backup of the etcd database, or 'delta' for incremental changes since the last snapshot.
// +kubebuilder:validation:Required
Type OnDemandSnapshotType `json:"type"`
// IsFinal indicates whether the snapshot of type: full is marked as final. This is subject to change.
// +optional
IsFinal *bool `json:"isFinal,omitempty"`
// TimeoutSeconds is the timeout for the delta snapshot operation.
// Defaults to 60 seconds.
// +optional
// +kubebuilder:default=60
// +kubebuilder:validation:Minimum=10
TimeoutSecondsDelta *int32 `json:"timeoutSecondsDelta,omitempty"`
// TimeoutSecondsFull is the timeout for full snapshot operations.
// Defaults to 900 seconds (15 minutes).
// +optional
// +kubebuilder:default=900
// +kubebuilder:validation:Minimum=120
TimeoutSecondsFull *int32 `json:"timeoutSecondsFull,omitempty"`
}
OnDemandSnapshotConfig defines the configuration for an on-demand snapshot task. +kubebuilder:validation:XValidation:rule="self.type == 'delta' ? !has(self.isFinal) || self.isFinal == false : true",message="isFinal must be false (or omitted) when type is 'delta'"
func (*OnDemandSnapshotConfig) DeepCopy ¶ added in v0.34.0
func (in *OnDemandSnapshotConfig) DeepCopy() *OnDemandSnapshotConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OnDemandSnapshotConfig.
func (*OnDemandSnapshotConfig) DeepCopyInto ¶ added in v0.34.0
func (in *OnDemandSnapshotConfig) DeepCopyInto(out *OnDemandSnapshotConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OnDemandSnapshotType ¶ added in v0.34.0
type OnDemandSnapshotType string
OnDemandSnapshotType defines the type of on-demand snapshot. +kubebuilder:validation:Enum=full;delta
const ( // OnDemandSnapshotTypeFull indicates a full snapshot, capturing the entire etcd database state. OnDemandSnapshotTypeFull OnDemandSnapshotType = "full" // OnDemandSnapshotTypeDelta indicates a delta snapshot, capturing only changes since the last snapshot. OnDemandSnapshotTypeDelta OnDemandSnapshotType = "delta" )
type SchedulingConstraints ¶
type SchedulingConstraints struct {
// Affinity defines the various affinity and anti-affinity rules for a pod
// that are honoured by the kube-scheduler.
// +optional
Affinity *corev1.Affinity `json:"affinity,omitempty"`
// TopologySpreadConstraints describes how a group of pods ought to spread across topology domains,
// that are honoured by the kube-scheduler.
// +optional
TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}
SchedulingConstraints defines the different scheduling constraints that must be applied to the pod spec in the etcd statefulset. Currently supported constraints are Affinity and TopologySpreadConstraints.
func (*SchedulingConstraints) DeepCopy ¶
func (in *SchedulingConstraints) DeepCopy() *SchedulingConstraints
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchedulingConstraints.
func (*SchedulingConstraints) DeepCopyInto ¶
func (in *SchedulingConstraints) DeepCopyInto(out *SchedulingConstraints)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretReference ¶
type SecretReference struct {
corev1.SecretReference `json:",inline"`
// DataKey is the name of the key in the data map containing the credentials.
// +optional
DataKey *string `json:"dataKey,omitempty"`
}
SecretReference defines a reference to a secret.
func (*SecretReference) DeepCopy ¶
func (in *SecretReference) DeepCopy() *SecretReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretReference.
func (*SecretReference) DeepCopyInto ¶
func (in *SecretReference) DeepCopyInto(out *SecretReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SharedConfig ¶
type SharedConfig struct {
// +optional
AutoCompactionMode *CompactionMode `json:"autoCompactionMode,omitempty"`
// +optional
AutoCompactionRetention *string `json:"autoCompactionRetention,omitempty"`
}
SharedConfig defines parameters shared and used by Etcd as well as backup-restore sidecar.
func (*SharedConfig) DeepCopy ¶
func (in *SharedConfig) DeepCopy() *SharedConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfig.
func (*SharedConfig) DeepCopyInto ¶
func (in *SharedConfig) DeepCopyInto(out *SharedConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SnapshotCompactionSpec ¶ added in v0.32.0
type SnapshotCompactionSpec struct {
// Resources defines compute Resources required by compaction job.
// More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
// EventsThreshold defines the threshold for the number of etcd events before triggering a compaction job
// +optional
EventsThreshold *int64 `json:"eventsThreshold,omitempty"`
// TriggerFullSnapshotThreshold defines the upper threshold for the number of etcd events before giving up on compaction job and triggering a full snapshot.
// +optional
TriggerFullSnapshotThreshold *int64 `json:"triggerFullSnapshotThreshold,omitempty"`
}
SnapshotCompactionSpec defines parameters related to the compaction job configuration.
func (*SnapshotCompactionSpec) DeepCopy ¶ added in v0.32.0
func (in *SnapshotCompactionSpec) DeepCopy() *SnapshotCompactionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotCompactionSpec.
func (*SnapshotCompactionSpec) DeepCopyInto ¶ added in v0.32.0
func (in *SnapshotCompactionSpec) DeepCopyInto(out *SnapshotCompactionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageProvider ¶
type StorageProvider string
StorageProvider defines the type of object store provider for storing backups.
type StoreSpec ¶
type StoreSpec struct {
// Container is the name of the container the backup is stored at.
// +optional
Container *string `json:"container,omitempty"`
// EndpointOverride denotes the storage endpoint that will be used to override the storage provider's default endpoint.
// +optional
// +kubebuilder:validation:XValidation:message="endpoint override must be a valid URL.",rule="isURL(self)"
EndpointOverride *string `json:"endpointOverride,omitempty"`
// Prefix is the prefix used for the store.
// +required
Prefix string `json:"prefix"`
// Provider is the name of the backup provider.
// +optional
Provider *StorageProvider `json:"provider,omitempty"`
// SecretRef is the reference to the secret which used to connect to the backup store.
// +optional
SecretRef *corev1.SecretReference `json:"secretRef,omitempty"`
}
StoreSpec defines parameters related to ObjectStore persisting backups
func (*StoreSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StoreSpec.
func (*StoreSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSConfig ¶
type TLSConfig struct {
// +required
TLSCASecretRef SecretReference `json:"tlsCASecretRef"`
// +required
ServerTLSSecretRef corev1.SecretReference `json:"serverTLSSecretRef"`
// +optional
ClientTLSSecretRef corev1.SecretReference `json:"clientTLSSecretRef"`
}
TLSConfig hold the TLS configuration details.
func (*TLSConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.
func (*TLSConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TaskState ¶ added in v0.34.0
type TaskState string
TaskState represents the current state of an EtcdOpsTask. +kubebuilder:validation:Enum=Pending;InProgress;Succeeded;Failed;Rejected
Transitions (irreversible):
Pending → InProgress → Succeeded
↘ ↘ Failed
└────────────────→ Rejected
const ( // TaskStatePending indicates that the task has been accepted but not yet acted upon. TaskStatePending TaskState = "Pending" // TaskStateInProgress indicates that the task is currently being executed. TaskStateInProgress TaskState = "InProgress" // TaskStateSucceeded indicates that the task has been completed successfully. TaskStateSucceeded TaskState = "Succeeded" // TaskStateFailed indicates that the task has failed. TaskStateFailed TaskState = "Failed" // TaskStateRejected indicates that the task has been rejected as it failed to fulfill required preconditions. TaskStateRejected TaskState = "Rejected" )
type WaitForFinalSnapshotSpec ¶
type WaitForFinalSnapshotSpec struct {
// Enabled specifies whether to wait for a final full snapshot before copying backups.
Enabled bool `json:"enabled"`
// Timeout is the timeout for waiting for a final full snapshot. When this timeout expires, the copying of backups
// will be performed anyway. No timeout or 0 means wait forever.
// +optional
// +kubebuilder:validation:Type=string
// +kubebuilder:validation:Pattern="^(0|([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+)$"
Timeout *metav1.Duration `json:"timeout,omitempty"`
}
WaitForFinalSnapshotSpec defines the parameters for waiting for a final full snapshot before copying backups.
func (*WaitForFinalSnapshotSpec) DeepCopy ¶
func (in *WaitForFinalSnapshotSpec) DeepCopy() *WaitForFinalSnapshotSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WaitForFinalSnapshotSpec.
func (*WaitForFinalSnapshotSpec) DeepCopyInto ¶
func (in *WaitForFinalSnapshotSpec) DeepCopyInto(out *WaitForFinalSnapshotSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.