发布1.0.5版本
This commit is contained in:
parent
30d6e7cac2
commit
43a8e3cc9f
12
src/main.ts
12
src/main.ts
@ -46,13 +46,14 @@ export async function run(): Promise<void> {
|
|||||||
kc.loadFromFile(
|
kc.loadFromFile(
|
||||||
path.join(workspace, clusterPath + deployConfig.cluster + '.yaml')
|
path.join(workspace, clusterPath + deployConfig.cluster + '.yaml')
|
||||||
)
|
)
|
||||||
await kc.applyToHTTPSOptions({
|
const applyHttps = await kc.applyToHTTPSOptions({
|
||||||
httpsAgent: new Agent({
|
httpsAgent: new Agent({
|
||||||
rejectUnauthorized: false,
|
rejectUnauthorized: false,
|
||||||
|
servername: '127.0.0.1',
|
||||||
checkServerIdentity: () => undefined
|
checkServerIdentity: () => undefined
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
console.log('disable ssl')
|
console.log('disable ssl:', applyHttps)
|
||||||
const k8sApi = kc.makeApiClient(k8s.AppsV1Api)
|
const k8sApi = kc.makeApiClient(k8s.AppsV1Api)
|
||||||
const nowDeployment = await k8sApi.readNamespacedDeployment({
|
const nowDeployment = await k8sApi.readNamespacedDeployment({
|
||||||
name: deployConfig.deployment,
|
name: deployConfig.deployment,
|
||||||
@ -75,13 +76,6 @@ export async function run(): Promise<void> {
|
|||||||
deployment.spec.template.spec.containers[0].image = deployImage
|
deployment.spec.template.spec.containers[0].image = deployImage
|
||||||
const deployRes =
|
const deployRes =
|
||||||
await k8s.KubernetesObjectApi.makeApiClient(kc).patch(nowDeployment)
|
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)
|
console.log('deployRes:', deployRes)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user