mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
Add a flag to change the image tag for meta migration pod (#20080)
Signed-off-by: Edward Zeng <jie.zeng@zilliz.com> Signed-off-by: Edward Zeng <jie.zeng@zilliz.com>
This commit is contained in:
parent
5bb2626466
commit
e91e68c286
@ -19,6 +19,7 @@ Milvus 2.2 has changed the meta structure for segment index. To upgrade a Milvus
|
|||||||
| `t` | The target Milvus version. | `None` | True |
|
| `t` | The target Milvus version. | `None` | True |
|
||||||
| `r` | The root path of Milvus meta. | `by-dev` | False |
|
| `r` | The root path of Milvus meta. | `by-dev` | False |
|
||||||
| `w` | The new Milvus image tag. | `milvusdb/milvus:v2.2.0` | False |
|
| `w` | The new Milvus image tag. | `milvusdb/milvus:v2.2.0` | False |
|
||||||
|
| `m` | The meta migration image tag. | `harbor.milvus.io/milvus/meta-migration:20221025-e54b6181b` | False |
|
||||||
| `o` | The meta migration operation. | `migrate` | False |
|
| `o` | The meta migration operation. | `migrate` | False |
|
||||||
| `d` | Whether to delete migration pod after the migration is completed. | `false` | False |
|
| `d` | Whether to delete migration pod after the migration is completed. | `false` | False |
|
||||||
> By default, the script only applies to migration from v2.1.x to v2.2.x. Rollback to the older version with the `rollback` operation first if an error occurs.
|
> By default, the script only applies to migration from v2.1.x to v2.2.x. Rollback to the older version with the `rollback` operation first if an error occurs.
|
||||||
|
|||||||
@ -4,6 +4,7 @@ namespace="default"
|
|||||||
root_path="by-dev"
|
root_path="by-dev"
|
||||||
operation="migrate"
|
operation="migrate"
|
||||||
image_tag="milvusdb/milvus:v2.2.0"
|
image_tag="milvusdb/milvus:v2.2.0"
|
||||||
|
meta_migration_pod_tag="harbor.milvus.io/milvus/meta-migration:20221025-e54b6181b"
|
||||||
remove_migrate_pod_after_migrate="false"
|
remove_migrate_pod_after_migrate="false"
|
||||||
|
|
||||||
#-n namespace: The namespace that Milvus is installed in.
|
#-n namespace: The namespace that Milvus is installed in.
|
||||||
@ -14,7 +15,7 @@ remove_migrate_pod_after_migrate="false"
|
|||||||
#-w image_tag: The new milvus image tag.
|
#-w image_tag: The new milvus image tag.
|
||||||
#-o operation: The operation: migrate/rollback.
|
#-o operation: The operation: migrate/rollback.
|
||||||
#-d remove_migrate_pod_after_migrate: Remove migration pod after successful migration.
|
#-d remove_migrate_pod_after_migrate: Remove migration pod after successful migration.
|
||||||
while getopts "n:i:s:t:r:w:o:d" opt_name
|
while getopts "n:i:s:t:r:w:o:d:m" opt_name
|
||||||
do
|
do
|
||||||
case $opt_name in
|
case $opt_name in
|
||||||
n) namespace=$OPTARG;;
|
n) namespace=$OPTARG;;
|
||||||
@ -24,6 +25,7 @@ do
|
|||||||
r) root_path=$OPTARG;;
|
r) root_path=$OPTARG;;
|
||||||
w) image_tag=$OPTARG;;
|
w) image_tag=$OPTARG;;
|
||||||
o) operation=$OPTARG;;
|
o) operation=$OPTARG;;
|
||||||
|
m) meta_migration_pod_tag=$OPTARG;;
|
||||||
d) remove_migrate_pod_after_migrate="true";;
|
d) remove_migrate_pod_after_migrate="true";;
|
||||||
*) echo "Unkonwen parameters";;
|
*) echo "Unkonwen parameters";;
|
||||||
esac
|
esac
|
||||||
@ -261,7 +263,7 @@ function backup_meta(){
|
|||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
containers:
|
containers:
|
||||||
- name: meta-migration
|
- name: meta-migration
|
||||||
image: harbor.milvus.io/milvus/meta-migration:20221019-b79687687
|
image: $meta_migration_pod_tag
|
||||||
command: ["/bin/sh"]
|
command: ["/bin/sh"]
|
||||||
args:
|
args:
|
||||||
- -c
|
- -c
|
||||||
@ -298,7 +300,7 @@ function rollback_meta(){
|
|||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
containers:
|
containers:
|
||||||
- name: meta-migration
|
- name: meta-migration
|
||||||
image: harbor.milvus.io/milvus/meta-migration:20221019-b79687687
|
image: $meta_migration_pod_tag
|
||||||
command: ["/bin/sh"]
|
command: ["/bin/sh"]
|
||||||
args:
|
args:
|
||||||
- -c
|
- -c
|
||||||
@ -337,7 +339,7 @@ function migrate_meta(){
|
|||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
containers:
|
containers:
|
||||||
- name: meta-migration
|
- name: meta-migration
|
||||||
image: harbor.milvus.io/milvus/meta-migration:20221019-b79687687
|
image: $meta_migration_pod_tag
|
||||||
command: ["/bin/sh"]
|
command: ["/bin/sh"]
|
||||||
args:
|
args:
|
||||||
- -c
|
- -c
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user