mirror of https://github.com/certd/certd
perf: k8s ack、tke 支持重启ingress
parent
b33ec201ac
commit
95715a007d
|
@ -4,7 +4,7 @@
|
|||
## 一、源码安装
|
||||
|
||||
### 环境要求
|
||||
- nodejs 20 及以上
|
||||
- nodejs 22 及以上
|
||||
### 源码启动
|
||||
```shell
|
||||
# 克隆代码
|
||||
|
|
|
@ -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}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue