发布1.0.5版本

This commit is contained in:
ilovintit 2025-06-15 23:14:20 +08:00
parent e48a4ba491
commit ce41734b39
3 changed files with 28 additions and 3 deletions

14
dist/index.js generated vendored
View File

@ -198990,7 +198990,19 @@ async function run() {
console.log('deployConfig:', deployConfig); console.log('deployConfig:', deployConfig);
const kc = new KubeConfig(); const kc = new KubeConfig();
kc.loadFromFile(require$$1$2.join(workspace, clusterPath + deployConfig.cluster + '.yaml')); kc.loadFromFile(require$$1$2.join(workspace, clusterPath + deployConfig.cluster + '.yaml'));
console.log(kc.getCurrentCluster()); const currentCluster = kc.getCurrentCluster();
console.log('old_cluster', currentCluster);
if (currentCluster === null) {
continue;
}
kc.addCluster({
name: currentCluster.server,
server: currentCluster.server,
caData: currentCluster.caData,
skipTLSVerify: true,
tlsServerName: '127.0.0.1'
});
console.log('now_cluster', kc.getCurrentCluster());
const applyHttps = await kc.applyToHTTPSOptions({ const applyHttps = await kc.applyToHTTPSOptions({
checkServerIdentity: () => undefined, checkServerIdentity: () => undefined,
rejectUnauthorized: false, rejectUnauthorized: false,

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -3,6 +3,7 @@ import * as k8s from '@kubernetes/client-node'
import * as fs from 'fs' import * as fs from 'fs'
import * as path from 'path' import * as path from 'path'
import { filter, clone } from 'lodash' import { filter, clone } from 'lodash'
import { Cluster } from '@kubernetes/client-node'
interface Config { interface Config {
branch: string branch: string
@ -45,7 +46,19 @@ export async function run(): Promise<void> {
kc.loadFromFile( kc.loadFromFile(
path.join(workspace, clusterPath + deployConfig.cluster + '.yaml') path.join(workspace, clusterPath + deployConfig.cluster + '.yaml')
) )
console.log(kc.getCurrentCluster()) const currentCluster: Cluster | null = kc.getCurrentCluster()
console.log('old_cluster', currentCluster)
if (currentCluster === null) {
continue
}
kc.addCluster({
name: currentCluster.server,
server: currentCluster.server,
caData: currentCluster.caData,
skipTLSVerify: true,
tlsServerName: '127.0.0.1'
})
console.log('now_cluster', kc.getCurrentCluster())
const applyHttps = await kc.applyToHTTPSOptions({ const applyHttps = await kc.applyToHTTPSOptions({
checkServerIdentity: () => undefined, checkServerIdentity: () => undefined,
rejectUnauthorized: false, rejectUnauthorized: false,