-
Notifications
You must be signed in to change notification settings - Fork 101
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
[Feature] Make etcd-backup-restore Kubernetes-aware keep member and backup status up-to-date #333
Comments
Please see gardener/gardener#4083. As soon as we only have seeds running 1.18 and the support of Etcd-Druid, we can use Server-Side Apply to let each This will spare us potential conflicts, saves time and network costs. Here is a simple example of how to use SSA: etcd := &druidv1alpha1.Etcd{
TypeMeta: metav1.TypeMeta{
APIVersion: "druid.gardener.cloud/v1alpha1",
Kind: "Etcd",
},
ObjectMeta: metav1.ObjectMeta{
Name: <name>,
Namespace: <namespace>,
},
Status: druidv1alpha1.EtcdStatus{
Members: []druidv1alpha1.EtcdMemberStatus{
{
ID: "1",
Name: "member1",
Role: druidv1alpha1.EtcdRoleMember,
Status: druidv1alpha1.EtcdMemeberStatusReady,
Reason: "up and running",
LastUpdateTime: metav1.NewTime(time.Now()),
LastTransitionTime: metav1.NewTime(time.Now()),
},
},
},
}
if err := ec.Status().Patch(ctx, etcd, client.Apply, client.FieldOwner("etcdbr1"), client.ForceOwnership); err != nil {
return err
} |
Backup sidecar will now have to adhere to gardener/etcd-druid#206, by creating and maintaining the |
Whoever was responsible for removing the member entry in the status in the earlier design with SSA. Basically, the There is still the case of superfluous member entries in etcd cluster which is to be cleaned up by the leading sidecar. |
Given the limitations in Server-Side Apply (please see gardener/etcd-druid#179), gardener/etcd-druid#207 describes the alternative of |
🎉 ❤️ |
Feature (What you would like to be added):
Make etcd-backup-restore Kubernetes-aware keep the corresponding member status and
BackupReady
condition up-to-date in theEtcd
resource status.Motivation (Why is this needed?):
etcd-backup-restore
is the closest to the source of this information and making it responsible to update these status sections will be a solution at the lowest viable level and avoidetcd-druid
becoming a bottleneck.Approach/Hint to the implement solution (optional):
BackupReady
status could be determined based on whether latest backup upload (full or incremental) successful.Also, it would be preferable to use
StatusWriter.Patch()
to avoid race-conditions.The text was updated successfully, but these errors were encountered: