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

Document upgrades for 7.1+ and add the default log group to the ignore list #1713

Merged
merged 2 commits into from
Jun 30, 2023
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
12 changes: 12 additions & 0 deletions api/v1beta2/foundationdbcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand Down Expand Up @@ -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"}
}
2 changes: 1 addition & 1 deletion controllers/check_client_compatibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/cluster_spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
21 changes: 21 additions & 0 deletions docs/manual/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down