From b7fcb189d0f0876c37ab8d66ac59f6e20caad177 Mon Sep 17 00:00:00 2001 From: Y-Rookie Date: Mon, 6 Jan 2025 11:02:14 +0800 Subject: [PATCH] set podService default false --- apis/apps/v1alpha1/cluster_types.go | 1 + config/crd/bases/apps.kubeblocks.io_clusters.yaml | 2 ++ config/crd/bases/apps.kubeblocks.io_opsrequests.yaml | 1 + controllers/apps/transformer_cluster_component.go | 4 ++++ deploy/helm/crds/apps.kubeblocks.io_clusters.yaml | 2 ++ deploy/helm/crds/apps.kubeblocks.io_opsrequests.yaml | 1 + 6 files changed, 11 insertions(+) diff --git a/apis/apps/v1alpha1/cluster_types.go b/apis/apps/v1alpha1/cluster_types.go index bf4884a6d70..2eae8e47942 100644 --- a/apis/apps/v1alpha1/cluster_types.go +++ b/apis/apps/v1alpha1/cluster_types.go @@ -1269,6 +1269,7 @@ type ClusterComponentService struct { // Indicates whether to generate individual Services for each Pod. // If set to true, a separate Service will be created for each Pod in the Cluster. // + // +kubebuilder:default=false // +optional PodService *bool `json:"podService,omitempty"` } diff --git a/config/crd/bases/apps.kubeblocks.io_clusters.yaml b/config/crd/bases/apps.kubeblocks.io_clusters.yaml index 433bf96f16c..d0b021f85a5 100644 --- a/config/crd/bases/apps.kubeblocks.io_clusters.yaml +++ b/config/crd/bases/apps.kubeblocks.io_clusters.yaml @@ -5144,6 +5144,7 @@ spec: maxLength: 25 type: string podService: + default: false description: |- Indicates whether to generate individual Services for each Pod. If set to true, a separate Service will be created for each Pod in the Cluster. @@ -13790,6 +13791,7 @@ spec: maxLength: 25 type: string podService: + default: false description: |- Indicates whether to generate individual Services for each Pod. If set to true, a separate Service will be created for each Pod in the Cluster. diff --git a/config/crd/bases/apps.kubeblocks.io_opsrequests.yaml b/config/crd/bases/apps.kubeblocks.io_opsrequests.yaml index d89b5b20fbb..a3ff9ff6af0 100644 --- a/config/crd/bases/apps.kubeblocks.io_opsrequests.yaml +++ b/config/crd/bases/apps.kubeblocks.io_opsrequests.yaml @@ -8640,6 +8640,7 @@ spec: maxLength: 25 type: string podService: + default: false description: |- Indicates whether to generate individual Services for each Pod. If set to true, a separate Service will be created for each Pod in the Cluster. diff --git a/controllers/apps/transformer_cluster_component.go b/controllers/apps/transformer_cluster_component.go index 8ad90211a6c..4aee9154907 100644 --- a/controllers/apps/transformer_cluster_component.go +++ b/controllers/apps/transformer_cluster_component.go @@ -479,10 +479,14 @@ func (c *compPhasePrecondition) match(transCtx *clusterTransformContext, dag *gr return false, client.IgnoreNotFound(err) } if comp.Generation != comp.Status.ObservedGeneration || !c.phaseExpectation(comp) { + transCtx.Logger.Info("component waiting: predecessor has generation mismatch or not in upWorking state", + "component", comp.Name, "predecessor", predecessor) return false, nil } // create or update if exists in DAG if dagGet(compKey) { + transCtx.Logger.Info("waiting for predecessor component in DAG", + "component", comp.Name, "predecessor", predecessor) return false, nil } } diff --git a/deploy/helm/crds/apps.kubeblocks.io_clusters.yaml b/deploy/helm/crds/apps.kubeblocks.io_clusters.yaml index 433bf96f16c..d0b021f85a5 100644 --- a/deploy/helm/crds/apps.kubeblocks.io_clusters.yaml +++ b/deploy/helm/crds/apps.kubeblocks.io_clusters.yaml @@ -5144,6 +5144,7 @@ spec: maxLength: 25 type: string podService: + default: false description: |- Indicates whether to generate individual Services for each Pod. If set to true, a separate Service will be created for each Pod in the Cluster. @@ -13790,6 +13791,7 @@ spec: maxLength: 25 type: string podService: + default: false description: |- Indicates whether to generate individual Services for each Pod. If set to true, a separate Service will be created for each Pod in the Cluster. diff --git a/deploy/helm/crds/apps.kubeblocks.io_opsrequests.yaml b/deploy/helm/crds/apps.kubeblocks.io_opsrequests.yaml index d89b5b20fbb..a3ff9ff6af0 100644 --- a/deploy/helm/crds/apps.kubeblocks.io_opsrequests.yaml +++ b/deploy/helm/crds/apps.kubeblocks.io_opsrequests.yaml @@ -8640,6 +8640,7 @@ spec: maxLength: 25 type: string podService: + default: false description: |- Indicates whether to generate individual Services for each Pod. If set to true, a separate Service will be created for each Pod in the Cluster.