diff --git a/server/odc-service/src/main/java/com/oceanbase/odc/service/resource/k8s/status/K8sDeploymentStatusDfa.java b/server/odc-service/src/main/java/com/oceanbase/odc/service/resource/k8s/status/K8sDeploymentStatusDfa.java index 1f8ff37c0f..e845f6fac0 100644 --- a/server/odc-service/src/main/java/com/oceanbase/odc/service/resource/k8s/status/K8sDeploymentStatusDfa.java +++ b/server/odc-service/src/main/java/com/oceanbase/odc/service/resource/k8s/status/K8sDeploymentStatusDfa.java @@ -60,6 +60,12 @@ public static K8sDeploymentStatusDfa buildInstance(ResourceState current) { .matchesK8sResource(Collections.singletonList(Objects::isNull)).to(ResourceState.DESTROYED).build()); transfers.addAll(new K8sResourceStatusTransferBuilder().from(ResourceState.DESTROYING) .matchesK8sResource(Collections.singletonList(Objects::nonNull)).to(ResourceState.DESTROYING).build()); + transfers.addAll(new K8sResourceStatusTransferBuilder().from(ResourceState.UNKNOWN) + .matchesK8sResource(getAvailableDeploymentMatchers(current)).to(ResourceState.AVAILABLE).build()); + transfers.addAll(new K8sResourceStatusTransferBuilder().from(ResourceState.UNKNOWN) + .matchesK8sResource(getErrorDeploymentMatchers(current)).to(ResourceState.ERROR_STATE).build()); + transfers.addAll(new K8sResourceStatusTransferBuilder().from(ResourceState.UNKNOWN) + .matchesK8sResource(Collections.singletonList(Objects::isNull)).to(ResourceState.DESTROYED).build()); return new K8sDeploymentStatusDfa(transfers); } diff --git a/server/odc-service/src/main/java/com/oceanbase/odc/service/resource/k8s/status/K8sServiceStatusDfa.java b/server/odc-service/src/main/java/com/oceanbase/odc/service/resource/k8s/status/K8sServiceStatusDfa.java index caac25839c..4cb840f282 100644 --- a/server/odc-service/src/main/java/com/oceanbase/odc/service/resource/k8s/status/K8sServiceStatusDfa.java +++ b/server/odc-service/src/main/java/com/oceanbase/odc/service/resource/k8s/status/K8sServiceStatusDfa.java @@ -58,6 +58,12 @@ public static K8sServiceStatusDfa buildInstance() { transfers.addAll(new K8sResourceStatusTransferBuilder() .from(ResourceState.DESTROYING) .matchesK8sResource(getNonNullMatchers()).to(ResourceState.DESTROYING).build()); + transfers.addAll(new K8sResourceStatusTransferBuilder() + .from(ResourceState.UNKNOWN) + .matchesK8sResource(getNonNullMatchers()).to(ResourceState.AVAILABLE).build()); + transfers.addAll(new K8sResourceStatusTransferBuilder() + .from(ResourceState.UNKNOWN) + .matchesK8sResource(getNullMatchers()).to(ResourceState.DESTROYED).build()); return new K8sServiceStatusDfa(transfers); }