Conversation
Add support for the new `spec.configuration.data.restoreAdditionalCommandArgs` field so operators can append flags (e.g. `--read-timeout`) to barman-cloud-restore invocations, mirroring the existing `wal.restoreAdditionalCommandArgs` behavior. The new field is consumed by `restoreDataDir` and applied after the cloud provider options and `--endpoint-url` but before the positional arguments, so the upstream append/dedup logic can filter attempts to override official options. Depends on the corresponding upstream `barman-cloud` change in PR #242, which introduces `DataBackupConfiguration.RestoreAdditionalCommandArgs` and `AppendRestoreAdditionalCommandArgs`. go.mod pins that dependency to the PR HEAD commit via a pseudo-version; bump it to a tagged release once barman-cloud cuts one containing #242. Closes #821 Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Extend the "Extra Options" section in `misc.md` to cover `barman-cloud-restore` alongside backup and WAL archiving, and add a usage example for `.spec.configuration.data.restoreAdditionalCommandArgs`. Refs #821 Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
The 'Extra Options' section enumerated every additionalCommandArgs knob except wal.restoreAdditionalCommandArgs, which already existed in the API. Add the missing bullet and example so the list is complete. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An
ObjectStorealready lets users tack extra command-line flags onto three of the fourbarman-cloud-*invocations:barman-cloud-backupviadata.additionalCommandArgs,barman-cloud-wal-archiveviawal.archiveAdditionalCommandArgs, andbarman-cloud-wal-restoreviawal.restoreAdditionalCommandArgs. The fourth —barman-cloud-restore, the actual data-restore step in PITR and recovery-from-object-store — has had noequivalent, which is exactly the gap reported in #821 (the asker wanted a longer
--read-timeoutfor slow restores from S3).This PR fills that gap by adding
spec.configuration.data.restoreAdditionalCommandArgsand wiring it into the recovery job hook. InrestoreDataDir,the user-supplied flags are appended after the cloud-provider options and
--endpoint-urlbut before the positional(destinationPath, serverName, backupID, pgdata)arguments — same shape as the other three knobs. The library's existing append/dedup logic still wins on conflicts, so users can'taccidentally override flags the plugin already sets (
--cloud-provider,--endpoint-url, etc.).Sister PR (must merge first)
The CRD field is generated from the
BarmanObjectStoreConfigurationGo type incloudnative-pg/barman-cloud, so the actual API change lives upstream:cloudnative-pg/barman-cloud#242 — which adds
DataBackupConfiguration.RestoreAdditionalCommandArgsand theAppendRestoreAdditionalCommandArgshelper. Once that PR merges and a
barman-cloudrelease is cut,controller-genhere picks up the new field automatically.go.modis temporarily pinned to cloudnative-pg/barman-cloud#242 HEAD commit via a pseudo-version (v0.5.2-0.20260513095406-dac43abc6cf6) so CI on this branch can runend-to-end against the unreleased upstream change. This pin must be replaced with a tagged
barman-cloudrelease before this PR can merge.Closes #821