mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +08:00
perf: k8s ack、tke 支持重启ingress
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
## 一、源码安装
|
## 一、源码安装
|
||||||
|
|
||||||
### 环境要求
|
### 环境要求
|
||||||
- nodejs 20 及以上
|
- nodejs 22 及以上
|
||||||
### 源码启动
|
### 源码启动
|
||||||
```shell
|
```shell
|
||||||
# 克隆代码
|
# 克隆代码
|
||||||
|
|||||||
@@ -150,4 +150,18 @@ export class K8sClient {
|
|||||||
this.logger.info("ingress patched", opts.body);
|
this.logger.info("ingress patched", opts.body);
|
||||||
return res;
|
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}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user