-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple backup ready condition for snapshot leases and remove support for deprecated fields in etcd status #820
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,11 +48,12 @@ const ( | |
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.ready` | ||
// +kubebuilder:printcolumn:name="Quorate",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status` | ||
// +kubebuilder:printcolumn:name="All Members Ready",type=string,JSONPath=`.status.conditions[?(@.type=="AllMembersReady")].status` | ||
// +kubebuilder:printcolumn:name="Backup Ready",type=string,JSONPath=`.status.conditions[?(@.type=="BackupReady")].status` | ||
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` | ||
// +kubebuilder:printcolumn:name="Cluster Size",type=integer,JSONPath=`.spec.replicas`,priority=1 | ||
// +kubebuilder:printcolumn:name="Current Replicas",type=integer,JSONPath=`.status.currentReplicas`,priority=1 | ||
// +kubebuilder:printcolumn:name="Ready Replicas",type=integer,JSONPath=`.status.readyReplicas`,priority=1 | ||
// +kubebuilder:printcolumn:name="Backup Ready",type=string,JSONPath=`.status.conditions[?(@.type=="BackupReady")].status` | ||
// +kubebuilder:printcolumn:name="Full Backup Ready",type=string,JSONPath=`.status.conditions[?(@.type=="FullSnapshotBackupReady")].status` | ||
// +kubebuilder:printcolumn:name="Delta Backup Ready",type=string,JSONPath=`.status.conditions[?(@.type=="DeltaSnapshotBackupReady")].status` | ||
|
||
// Etcd is the Schema for the etcds API | ||
type Etcd struct { | ||
|
@@ -320,6 +321,10 @@ const ( | |
ConditionTypeAllMembersReady ConditionType = "AllMembersReady" | ||
// ConditionTypeBackupReady is a constant for a condition type indicating that the etcd backup is ready. | ||
ConditionTypeBackupReady ConditionType = "BackupReady" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you still want |
||
// ConditionTypeFullSnapshotBackupReady is a constant for a condition type indicating that the full snapshot backup is ready. | ||
ConditionTypeFullSnapshotBackupReady ConditionType = "FullSnapshotBackupReady" | ||
// ConditionTypeDeltaSnapshotBackupReady is a constant for a condition type indicating that the delta snapshot backup is ready. | ||
ConditionTypeDeltaSnapshotBackupReady ConditionType = "DeltaSnapshotBackupReady" | ||
// ConditionTypeDataVolumesReady is a constant for a condition type indicating that the etcd data volumes are ready. | ||
ConditionTypeDataVolumesReady ConditionType = "DataVolumesReady" | ||
) | ||
|
@@ -374,10 +379,6 @@ type EtcdStatus struct { | |
// Conditions represents the latest available observations of an etcd's current state. | ||
// +optional | ||
Conditions []Condition `json:"conditions,omitempty"` | ||
// ServiceName is the name of the etcd service. | ||
// Deprecated: this field will be removed in the future. | ||
// +optional | ||
ServiceName *string `json:"serviceName,omitempty"` | ||
// LastError represents the last occurred error. | ||
// Deprecated: Use LastErrors instead. | ||
// +optional | ||
|
@@ -388,10 +389,6 @@ type EtcdStatus struct { | |
// LastOperation indicates the last operation performed on this resource. | ||
// +optional | ||
LastOperation *LastOperation `json:"lastOperation,omitempty"` | ||
// Cluster size is the current size of the etcd cluster. | ||
// Deprecated: this field will not be populated with any value and will be removed in the future. | ||
// +optional | ||
ClusterSize *int32 `json:"clusterSize,omitempty"` | ||
// CurrentReplicas is the current replica count for the etcd cluster. | ||
// +optional | ||
CurrentReplicas int32 `json:"currentReplicas,omitempty"` | ||
|
@@ -404,15 +401,6 @@ type EtcdStatus struct { | |
// Ready is `true` if all etcd replicas are ready. | ||
// +optional | ||
Ready *bool `json:"ready,omitempty"` | ||
// UpdatedReplicas is the count of updated replicas in the etcd cluster. | ||
// Deprecated: this field will be removed in the future. | ||
// +optional | ||
UpdatedReplicas int32 `json:"updatedReplicas,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"` | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,8 @@ Status fields related to the etcd cluster itself, such as `Members`, `PeerUrlTLS | |
- `AllMembersReady`: indicates readiness of all members of the etcd cluster. | ||
- `Ready`: indicates overall readiness of the etcd cluster in serving traffic. | ||
- `BackupReady`: indicates health of the etcd backups, i.e., whether etcd backups are being taken regularly as per schedule. This condition is applicable only when backups are enabled for the etcd cluster. | ||
- `FullSnapshotBackupReady`: indicates health of the full snapshot backups, i.e whether full snapshot backups are being taken regularly as per schedule. This condition is applicable only when backups are enabled for the etcd cluster. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in which situation will this be set to |
||
- `DeltaSnapshotBackupReady`: indicates health of the delta snapshot backups, i.e whether delta snapshot backups are being taken regularly as per schedule. This condition is applicable only when backups are enabled for the etcd cluster. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the criteria for this value to be false? |
||
- `DataVolumesReady`: indicates health of the persistent volumes containing the etcd data. | ||
|
||
## Compaction Controller | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -122,7 +122,7 @@ kubectl apply -f config/samples/druid_v1alpha1_etcd.yaml | |||||
|
||||||
### Verify the Etcd cluster | ||||||
|
||||||
To obtain information regarding the newly instantiated etcd cluster, perform the following step, which gives details such as the cluster size, readiness status of its members, and various other attributes. | ||||||
To obtain information regarding the newly instantiated etcd cluster, perform the following step, which gives details such as the current & ready replicas, readiness status of its members, Full and Delta backup status and various other attributes. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```sh | ||||||
kubectl get etcd -o=wide | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call them
Delta Backup Ready
orDelta Snapshot Backup Ready
? Similarly for full snapshot.