-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proposal to support multi-node etcd clusters
- Loading branch information
Amshuman K R
committed
Nov 11, 2020
1 parent
eaf04a2
commit cd27726
Showing
7 changed files
with
694 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
docs/proposals/multi-node/etcd-backup-restore-work-flows-life-cycle.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// build: https://sequencediagram.org | ||
|
||
title etcd-backup-restore work-flow life-cycle | ||
|
||
|
||
participant etcd-backup-restore http server (initialize) | ||
participant health checker and staus updater | ||
participant etcd-backup-restore leader elector/detector | ||
participant snapshotter | ||
participant client request disconnector | ||
participant defragmenter | ||
|
||
activate etcd-backup-restore http server (initialize) | ||
activate health checker and staus updater | ||
activate etcd-backup-restore leader elector/detector | ||
|
||
etcd-backup-restore leader elector/detector->etcd-backup-restore leader elector/detector: OnLeaderStart | ||
etcd-backup-restore leader elector/detector->snapshotter: Start | ||
activate snapshotter | ||
etcd-backup-restore leader elector/detector->client request disconnector: Start | ||
activate client request disconnector | ||
etcd-backup-restore leader elector/detector->defragmenter: Start | ||
activate defragmenter | ||
|
||
etcd-backup-restore leader elector/detector->etcd-backup-restore leader elector/detector: OnLeaderStop | ||
OnLeaderStart | ||
etcd-backup-restore leader elector/detector->snapshotter: Stop | ||
deactivate snapshotter | ||
etcd-backup-restore leader elector/detector->client request disconnector: Start | ||
deactivate client request disconnector | ||
etcd-backup-restore leader elector/detector->defragmenter: Stop | ||
deactivate defragmenter |
38 changes: 38 additions & 0 deletions
38
docs/proposals/multi-node/etcd-member-initialization-sequence.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// build: https://sequencediagram.org | ||
|
||
title Etcd Member Initialization | ||
|
||
participant kubelet | ||
participant etcd container bootstrap script | ||
participant etcd-backup-restore sidecar container | ||
database etcd resource | ||
database etcd configuration template | ||
database backup | ||
database etcd client service | ||
participant etcd container etcd | ||
|
||
activate kubelet | ||
activate etcd resource | ||
activate etcd configuration template | ||
activate backup | ||
activate etcd client service | ||
kubelet->etcd container bootstrap script: (re)start | ||
activate etcd container bootstrap script | ||
kubelet->etcd-backup-restore sidecar container: (re)start | ||
activate etcd-backup-restore sidecar container | ||
etcd container bootstrap script->etcd-backup-restore sidecar container:initialize | ||
etcd-backup-restore sidecar container->etcd configuration template: Load | ||
etcd-backup-restore sidecar container->etcd resource: Get Status | ||
etcd-backup-restore sidecar container->etcd client service: List members | ||
etcd-backup-restore sidecar container->backup: Get latest backed up revision | ||
etcd-backup-restore sidecar container->etcd-backup-restore sidecar container: Check if WAL directory contains valid metadata | ||
etcd-backup-restore sidecar container->etcd client service: If necessary, remove old member and add new member | ||
etcd-backup-restore sidecar container->etcd resource: If necessary, remove old member and add new member | ||
etcd-backup-restore sidecar container->etcd-backup-restore sidecar container: Check if data directory contains valid | ||
etcd-backup-restore sidecar container->etcd-backup-restore sidecar container: If necessary restore latest full snapshot from backup | ||
etcd-backup-restore sidecar container->backup: If necessary, fetch latest full snapshot and restore the database from it | ||
etcd-backup-restore sidecar container->backup: If necessary, fetch and apply incremental snapshots on the restored database | ||
etcd-backup-restore sidecar container->backup: If necessary, take a fresh full snapshot and upload | ||
etcd container bootstrap script<--etcd-backup-restore sidecar container: If necessary, generate appropriate etcd configuration (based on the loaded template) and return success. | ||
etcd container bootstrap script->etcd container etcd: start using the generated configuration | ||
activate etcd container etcd |
Binary file added
BIN
+60.5 KB
docs/proposals/multi-node/images/etcd-backup-restore-work-flows-life-cycle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+172 KB
docs/proposals/multi-node/images/etcd-member-initialization-sequence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<mxfile host="app.diagrams.net" modified="2020-11-10T19:30:41.514Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36" etag="ZGOACWqTFRD_QPWywvvx" version="13.8.9-1" type="device"><diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">7Vxbe5s4EP01fnQ/c7cfYyfttpvdZJN0kz5ykW0abFEQjd1fXwkkDBI24ADGTfLgwCDrMjpzNDMSHiiz1eZTYPrLf6ADvIE8cjYD5XIgy5PxGH8SwTYRaMokESwC10lE0k5w7/4CVDii0sh1QJgriCD0kOvnhTZcr4GNcjIzCOBLvtgcevlWfXMBBMG9bXqi9NF10DKRjmVjJ/8LuIsla1nS6fhWJitMRxIuTQe+ZETK1UCZBRCi5Gq1mQGP6I7p5fHz9tG7ftY/ffkv/GF+nf798O//w6Syj3W+kg4hAGt0dNUX1vXH7ewFBsHTYnbzdH334/NiqCZV/zS9iOprIOsebmTqkxGjLVWj/iMiw5yuzGDhrgfKBX468jf4EwtjZRH5EEE/eaZnniGwQUPTcxf0ezYeBQh2deKrBf0ft2wxwdXDDDc9uoUOe4RHZ/HFscznZcuAlxw1HA/MUfJwTB7yHb5CNu7ZaAbXyHTX8ZD29qiN9lOFCaPtqgdT036OSMV3IEQwAOXakHO9kCksLpN2pvA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