diff --git a/api/v1beta2/foundationdbcluster_types.go b/api/v1beta2/foundationdbcluster_types.go index 3bdf8c0ba..5cdf9b9ff 100644 --- a/api/v1beta2/foundationdbcluster_types.go +++ b/api/v1beta2/foundationdbcluster_types.go @@ -1042,6 +1042,7 @@ type FoundationDBClusterAutomationOptions struct { MaintenanceModeOptions MaintenanceModeOptions `json:"maintenanceModeOptions,omitempty"` // IgnoreLogGroupsForUpgrade defines the list of LogGroups that should be ignored during fdb version upgrade. + // The default is a list that includes "fdb-kubernetes-operator". // +kubebuilder:validation:MaxItems=10 IgnoreLogGroupsForUpgrade []LogGroup `json:"ignoreLogGroupsForUpgrade,omitempty"` } @@ -2638,3 +2639,14 @@ func (cluster *FoundationDBCluster) GetMaxZonesWithUnavailablePods() int { func (cluster *FoundationDBCluster) CacheDatabaseStatusForReconciliation(defaultValue bool) bool { return pointer.BoolDeref(cluster.Spec.AutomationOptions.CacheDatabaseStatusForReconciliation, defaultValue) } + +// GetIgnoreLogGroupsForUpgrade will return the IgnoreLogGroupsForUpgrade, if the value is not set it will include the default `fdb-kubernetes-operator` +// LogGroup. +func (cluster *FoundationDBCluster) GetIgnoreLogGroupsForUpgrade() []LogGroup { + if len(cluster.Spec.AutomationOptions.IgnoreLogGroupsForUpgrade) > 0 { + return cluster.Spec.AutomationOptions.IgnoreLogGroupsForUpgrade + } + + // Should we better read the FDB_NETWORK_OPTION_TRACE_LOG_GROUP env variable? + return []LogGroup{"fdb-kubernetes-operator"} +} diff --git a/controllers/check_client_compatibility.go b/controllers/check_client_compatibility.go index 37418049f..e51a95d7d 100644 --- a/controllers/check_client_compatibility.go +++ b/controllers/check_client_compatibility.go @@ -85,7 +85,7 @@ func (c checkClientCompatibility) reconcile(ctx context.Context, r *FoundationDB } ignoredLogGroups := make(map[fdbv1beta2.LogGroup]fdbv1beta2.None) - for _, logGroup := range cluster.Spec.AutomationOptions.IgnoreLogGroupsForUpgrade { + for _, logGroup := range cluster.GetIgnoreLogGroupsForUpgrade() { ignoredLogGroups[logGroup] = fdbv1beta2.None{} } unsupportedClients := getUnsupportedClients(status.Cluster.Clients.SupportedVersions, protocolVersion, ignoredLogGroups) diff --git a/docs/cluster_spec.md b/docs/cluster_spec.md index c80187116..4a56bb581 100644 --- a/docs/cluster_spec.md +++ b/docs/cluster_spec.md @@ -194,7 +194,7 @@ FoundationDBClusterAutomationOptions provides flags for enabling or disabling op | podUpdateStrategy | PodUpdateStrategy defines how Pod spec changes are rolled out either by replacing Pods or by deleting Pods. The default for this is ReplaceTransactionSystem. | [PodUpdateStrategy](#podupdatestrategy) | false | | useManagementAPI | UseManagementAPI defines if the operator should make use of the management API instead of using fdbcli to interact with the FoundationDB cluster. | *bool | false | | maintenanceModeOptions | MaintenanceModeOptions contains options for maintenance mode related settings. | [MaintenanceModeOptions](#maintenancemodeoptions) | false | -| ignoreLogGroupsForUpgrade | IgnoreLogGroupsForUpgrade defines the list of LogGroups that should be ignored during fdb version upgrade. | [][LogGroup](#loggroup) | false | +| ignoreLogGroupsForUpgrade | IgnoreLogGroupsForUpgrade defines the list of LogGroups that should be ignored during fdb version upgrade. The default is a list that includes \"fdb-kubernetes-operator\". | [][LogGroup](#loggroup) | false | [Back to TOC](#table-of-contents) diff --git a/docs/manual/operations.md b/docs/manual/operations.md index da973e925..64a583520 100644 --- a/docs/manual/operations.md +++ b/docs/manual/operations.md @@ -74,6 +74,27 @@ spec: version: 7.2.4 ``` +The supported versions of the operator are documented in the [compatibility](../compatibility.md) guide. +Downgrades of patch versions are supported, but not for major or minor versions. + +For version upgrades from 7.1+ to another major or minor versions the client compatibility check might requires some additional configuration: + +```yaml +apiVersion: apps.foundationdb.org/v1beta2 +kind: FoundationDBCluster +metadata: + name: sample-cluster +spec: + version: 7.2.4 + automationOptions: + ignoreLogGroupsForUpgrade: + - fdb-kubernetes-operator +``` + +The default value for the log group of the operator is `fdb-kubernetes-operator` but can be changed by setting the environment variable `FDB_NETWORK_OPTION_TRACE_LOG_GROUP`. +The operator version `v1.19.0` and never sets this value as a default and those changes are not required. + + The upgrade process is described in more detail in [upgrades](./upgrades.md). ## Renaming a Cluster