Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: set podService default false #8744

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
Loading