mirror of
https://github.com/certd/certd.git
synced 2026-04-24 20:57:26 +08:00
perf: 创建k8s secret 时设置type为tls
This commit is contained in:
@@ -119,7 +119,13 @@ export class K8sClient {
|
|||||||
this.logger.warn(`secret ${secretName} 不存在`);
|
this.logger.warn(`secret ${secretName} 不存在`);
|
||||||
if (opts.createOnNotFound) {
|
if (opts.createOnNotFound) {
|
||||||
//没有找到,则创建
|
//没有找到,则创建
|
||||||
const res = await this.createSecret({ namespace, body: opts.body });
|
const body = merge(
|
||||||
|
{
|
||||||
|
type: "type: kubernetes.io/tls",
|
||||||
|
},
|
||||||
|
opts.body
|
||||||
|
);
|
||||||
|
const res = await this.createSecret({ namespace, body });
|
||||||
this.logger.info(`secret ${secretName} 已创建`);
|
this.logger.info(`secret ${secretName} 已创建`);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user