perf: k8s ack、tke 支持重启ingress

v2-dev
xiaojunnuo 2025-07-24 16:22:07 +08:00
parent b33ec201ac
commit 95715a007d
2 changed files with 15 additions and 1 deletions

View File

@ -4,7 +4,7 @@
## 一、源码安装
### 环境要求
- nodejs 20 及以上
- nodejs 22 及以上
### 源码启动
```shell
# 克隆代码

View File

@ -150,4 +150,18 @@ export class K8sClient {
this.logger.info("ingress patched", opts.body);
return res;
}
async restartIngress(namespace: string, ingressNames: string[], labels: any) {
const body = {
metadata: {
labels: {
...labels,
},
},
};
for (const ingress of ingressNames) {
await this.patchIngress({ namespace, ingressName: ingress, body });
this.logger.info(`ingress已重启:${ingress}`);
}
}
}