Skip to content
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
2 changes: 1 addition & 1 deletion api/v1alpha1/clickhousecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ type ClickHouseSettings struct {
// Supports only Replicated and integration databases.
// +optional
// +kubebuilder:default:=true
EnableDatabaseSync bool `json:"enableDatabaseSync,omitempty"`
EnableDatabaseSync *bool `json:"enableDatabaseSync,omitempty"`

// Additional ClickHouse configuration that will be merged with the default one.
// +nullable
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/controller/clickhouse/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ func (r *clickhouseReconciler) reconcileReplicaResources(ctx context.Context, lo
}

func (r *clickhouseReconciler) reconcileDatabaseSync(ctx context.Context, log ctrlutil.Logger) (chctrl.StepResult, error) {
if !r.Cluster.Spec.Settings.EnableDatabaseSync {
if enabled := r.Cluster.Spec.Settings.EnableDatabaseSync; enabled != nil && !*enabled {
log.Debug("database sync is disabled, skipping")
Comment thread
GrigoryPervakov marked this conversation as resolved.
r.SetCondition(metav1.Condition{
Type: v1.ClickHouseConditionTypeSchemaInSync,
Expand Down
Loading