Skip to content

Commit

Permalink
set podService default false
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Rookie committed Jan 6, 2025
1 parent 4207df1 commit b7fcb18
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions apis/apps/v1alpha1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/apps.kubeblocks.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/apps.kubeblocks.io_opsrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions controllers/apps/transformer_cluster_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/crds/apps.kubeblocks.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions deploy/helm/crds/apps.kubeblocks.io_opsrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b7fcb18

Please sign in to comment.