mirror of https://github.com/Mai-with-u/MaiBot.git
feat: 部署后自动重启core容器,重载配置
parent
327cd6be9c
commit
ecbf06b8a6
|
|
@ -44,7 +44,7 @@ except client.exceptions.ApiException as e:
|
|||
else:
|
||||
raise
|
||||
|
||||
# 重启adapter的statefulset
|
||||
# 重启adapter和core的statefulset
|
||||
now = datetime.now(timezone.utc).isoformat()
|
||||
body = {
|
||||
"spec": {
|
||||
|
|
@ -57,11 +57,16 @@ body = {
|
|||
}
|
||||
}
|
||||
}
|
||||
resp = apps_api.patch_namespaced_stateful_set(
|
||||
apps_api.patch_namespaced_stateful_set(
|
||||
name=f'{release_name}-maibot-adapter',
|
||||
namespace=namespace,
|
||||
body=body,
|
||||
)
|
||||
apps_api.patch_namespaced_stateful_set(
|
||||
name=f'{release_name}-maibot-core',
|
||||
namespace=namespace,
|
||||
body=body,
|
||||
)
|
||||
print(f"StatefulSet `{release_name}-maibot-adapter` restarted successfully")
|
||||
|
||||
print('Job succeed.')
|
||||
|
|
|
|||
Loading…
Reference in New Issue