发布1.0.5版本
This commit is contained in:
+14
-1
@@ -3,6 +3,7 @@ import * as k8s from '@kubernetes/client-node'
|
||||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
import { filter, clone } from 'lodash'
|
||||
import { Cluster } from '@kubernetes/client-node'
|
||||
|
||||
interface Config {
|
||||
branch: string
|
||||
@@ -45,7 +46,19 @@ export async function run(): Promise<void> {
|
||||
kc.loadFromFile(
|
||||
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({
|
||||
checkServerIdentity: () => undefined,
|
||||
rejectUnauthorized: false,
|
||||
|
||||
Reference in New Issue
Block a user