Repository navigation
Commit 58e6c83
committed
Add kubectl dba adopt milvus: adopt a running Milvus in place
Adopting a Distributed Milvus 2.6 that runs from a Helm chart was a manual
procedure: gather the effective config, write three Secrets and a staged
Milvus, diff the rendered config, then scale each role by hand. The new
command group does it:
- plan RELEASE: read-only. Finds the release's workloads (by
app.kubernetes.io/instance and the component label, or --workload), merges
the mounted config files in Milvus' load order, finds the client Service
and the MilvusVersion for the running image, and checks the WAL
(Woodpecker on object storage), etcd, object storage and the root
password, logging in to a running proxy through a port-forward (Milvus
applies a root password only on first start). --output-dir writes the
objects for review.
- run RELEASE: creates the Secrets, a state ConfigMap <name>-adopt and the
Milvus with every role at 0 (orphan-on-delete, DoNotTerminate, external
etcd with the current root path, autoOps off, write check off), removes a
chart Service on a name KubeDB needs headless, and stops if the config the
operator rendered differs from the running one on storage, etcd root path,
WAL, security or ports. Then hands the roles over, overlap (default; one
QueryNode at a time) or stop-start, recording each one; re-running resumes.
- status RELEASE: where each role runs.
- rollback RELEASE: deletes the Milvus with orphan-on-delete, moves each
role back to the chart starting the chart's pods first, restores the
client Service's selector, labels and ports, and with --cleanup deletes
what KubeDB left and recreates the removed chart Services. --name covers a
Milvus adopted by hand.
Several workloads of one role become node groups (e.g. QueryNodes on two
GPU pools). Tested end to end on a cluster running the upstream chart 5.0.19
(Milvus 2.6.15): hand-adoption rollback, plan, overlap run, state rollback,
stop-start run killed and resumed; data bit-exact after each.
Signed-off-by: sabnaj <sabnaj@appscode.com>1 parent 2fea701 commit 58e6c83
13 files changed
Lines changed: 3691 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
0 commit comments