From 43a8e3cc9fd60457c4b833e6c158a5897d815da2 Mon Sep 17 00:00:00 2001 From: ilovintit Date: Sun, 15 Jun 2025 21:11:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=831.0.5=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main.ts b/src/main.ts index f69bb40..96aa972 100644 --- a/src/main.ts +++ b/src/main.ts @@ -46,13 +46,14 @@ export async function run(): Promise { kc.loadFromFile( path.join(workspace, clusterPath + deployConfig.cluster + '.yaml') ) - await kc.applyToHTTPSOptions({ + const applyHttps = await kc.applyToHTTPSOptions({ httpsAgent: new Agent({ rejectUnauthorized: false, + servername: '127.0.0.1', checkServerIdentity: () => undefined }) }) - console.log('disable ssl') + console.log('disable ssl:', applyHttps) const k8sApi = kc.makeApiClient(k8s.AppsV1Api) const nowDeployment = await k8sApi.readNamespacedDeployment({ name: deployConfig.deployment, @@ -75,13 +76,6 @@ export async function run(): Promise { deployment.spec.template.spec.containers[0].image = deployImage const deployRes = await k8s.KubernetesObjectApi.makeApiClient(kc).patch(nowDeployment) - // const deployRes = await k8sApi.patchNamespacedDeployment({ - // name: deployConfig.deployment, - // namespace: deployConfig.namespace, - // body: { - // spec: { template: { spec: { containers: [{ image: deployImage }] } } } - // } - // }) console.log('deployRes:', deployRes) } } catch (error) {