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 1ede668 commit 2ed5254
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions apis/apps/v1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,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
1 change: 1 addition & 0 deletions apis/apps/v1alpha1/cluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,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
4 changes: 4 additions & 0 deletions config/crd/bases/apps.kubeblocks.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5233,6 +5233,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 @@ -13934,6 +13935,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 @@ -21611,6 +21613,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 @@ -30843,6 +30846,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/operations.kubeblocks.io_opsrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8530,6 +8530,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
8 changes: 8 additions & 0 deletions controllers/apps/transformer_cluster_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,10 +490,14 @@ func (c *phasePrecondition) compMatch(transCtx *clusterTransformContext, dag *gr
return false, client.IgnoreNotFound(err)
}
if !c.expected(comp) {
transCtx.Logger.Info("waiting for predecessor component in expected phase",
"component", comp.Name, "predecessor", name)
return false, nil
}
// create or update in DAG?
if dagGet() {
transCtx.Logger.Info("waiting for predecessor component in DAG",
"component", comp.Name, "predecessor", name)
return false, nil
}
return true, nil
Expand Down Expand Up @@ -524,11 +528,15 @@ func (c *phasePrecondition) shardingMatch(transCtx *clusterTransformContext, dag
}
for _, comp := range comps {
if !c.expected(&comp) {
transCtx.Logger.Info("waiting for predecessor sharding in expected phase",
"shard", comp.Name, "predecessor sharding", name)
return false, nil
}
}
// create or update in DAG?
if dagList() {
transCtx.Logger.Info("waiting for predecessor sharding in DAG",
"shards", comps, "predecessor sharding", name)
return false, nil
}
return true, nil
Expand Down
4 changes: 4 additions & 0 deletions deploy/helm/crds/apps.kubeblocks.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5233,6 +5233,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 @@ -13934,6 +13935,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 @@ -21611,6 +21613,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 @@ -30843,6 +30846,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/operations.kubeblocks.io_opsrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8530,6 +8530,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 2ed5254

Please sign in to comment.