fix: respect RUN_MYSQL on k8s maple upgrade
During the maple -> nutmeg upgrade on k8s, only wait for mysql when RUN_MYSQL is true.
This commit is contained in:
parent
d7bc3370df
commit
b903c69fac
|
@ -0,0 +1 @@
|
||||||
|
[Bugfix] Running `tutor k8s upgrade --from=maple` won't apply and won't wait for the MySQL deployment to be ready if `RUN_MYSQL: false` (When you host your MySQL somewhere else like RDS) (by @CodeWithEmad)
|
|
@ -120,13 +120,14 @@ def upgrade_from_maple(context: Context, config: Config) -> None:
|
||||||
# The environment needs to be updated because the backpopulate/backfill commands are from Nutmeg
|
# The environment needs to be updated because the backpopulate/backfill commands are from Nutmeg
|
||||||
tutor_env.save(context.root, config)
|
tutor_env.save(context.root, config)
|
||||||
|
|
||||||
# Start mysql
|
if config["RUN_MYSQL"]:
|
||||||
k8s.kubectl_apply(
|
# Start mysql
|
||||||
context.root,
|
k8s.kubectl_apply(
|
||||||
"--selector",
|
context.root,
|
||||||
"app.kubernetes.io/name=mysql",
|
"--selector",
|
||||||
)
|
"app.kubernetes.io/name=mysql",
|
||||||
k8s.wait_for_deployment_ready(config, "mysql")
|
)
|
||||||
|
k8s.wait_for_deployment_ready(config, "mysql")
|
||||||
|
|
||||||
# lms upgrade
|
# lms upgrade
|
||||||
k8s.kubectl_apply(
|
k8s.kubectl_apply(
|
||||||
|
|
Loading…
Reference in New Issue