From 56078a6199e3beb7eeba474178c8ddf97da0c6ff Mon Sep 17 00:00:00 2001 From: HanZiyao <49408466+h56983577@users.noreply.github.com> Date: Tue, 28 Nov 2023 12:39:03 +0800 Subject: [PATCH] =?UTF-8?q?bugfix=5F=E9=87=8D=E6=96=B0=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E8=B0=83=E5=BA=A6=E5=99=A8=20(#48)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/kotlin/cn/edu/buaa/scs/kube/KubeModule.kt | 7 ++++--- .../edu/buaa/scs/kube/crd/v1alpha1/VirtualMachine.kt | 12 ++++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/kube/KubeModule.kt b/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/kube/KubeModule.kt index 76633a52..533e2c56 100644 --- a/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/kube/KubeModule.kt +++ b/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/kube/KubeModule.kt @@ -1,5 +1,6 @@ package cn.edu.buaa.scs.kube +import cn.edu.buaa.scs.image.ImageBuildRoutine import cn.edu.buaa.scs.utils.getConfigString import cn.edu.buaa.scs.utils.logger import com.fasterxml.jackson.module.kotlin.kotlinModule @@ -33,7 +34,7 @@ fun Application.kubeModule() { Serialization.jsonMapper().registerModules(kotlinModule(), KtormModule()) logger("kube")().info { "connected to official kubernetes apiserver successfully: ${kubeClient.kubernetesVersion.gitVersion}" } -// registerVirtualMachineOperator() -// -// ImageBuildRoutine.run() + registerVirtualMachineOperator() + + ImageBuildRoutine.run() } diff --git a/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/kube/crd/v1alpha1/VirtualMachine.kt b/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/kube/crd/v1alpha1/VirtualMachine.kt index e2f41f25..5c9fd83a 100644 --- a/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/kube/crd/v1alpha1/VirtualMachine.kt +++ b/cloudapi-web/src/main/kotlin/cn/edu/buaa/scs/kube/crd/v1alpha1/VirtualMachine.kt @@ -132,10 +132,14 @@ class VirtualMachineReconciler(val client: KubernetesClient) : Reconciler