Skip to content

Commit 818452a

Browse files
stankevichAMecea
authored andcommitted
Fix rclone extra args in the backup job
1 parent 82ee047 commit 818452a

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1010
### Changed
1111
### Removed
1212
### Fixed
13+
* rclone extra arguments are now properly passed to the backup job.
1314

1415

1516
## [0.4.0] - TBD
@@ -60,7 +61,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6061
### Removed
6162
### Fixed
6263
* Update and fix e2e tests
63-
* Fix double date string in bakup path
64+
* Fix double date string in backup path
6465
* Copy the nodeSelector as-is in the statefulset (fixes #454)
6566
* Fix flakines in ReadOnly cluster condition (fixes #434)
6667
* Fix rounding in computing `innodb-buffer-pool-size` (fixes #501)

pkg/controller/mysqlbackup/internal/syncer/job.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package syncer
1818

1919
import (
2020
"fmt"
21+
"strings"
2122

2223
"github.com/presslabs/controller-util/syncer"
2324
batch "k8s.io/api/batch/v1"
@@ -169,6 +170,13 @@ func (s *jobSyncer) ensurePodSpec(in core.PodSpec) core.PodSpec {
169170
},
170171
}
171172

173+
if len(s.cluster.Spec.RcloneExtraArgs) > 0 {
174+
in.Containers[0].Env = append(in.Containers[0].Env, core.EnvVar{
175+
Name: "RCLONE_EXTRA_ARGS",
176+
Value: strings.Join(s.cluster.Spec.RcloneExtraArgs, " "),
177+
})
178+
}
179+
172180
if len(s.backup.Spec.BackupSecretName) != 0 {
173181
in.Containers[0].EnvFrom = []core.EnvFromSource{
174182
core.EnvFromSource{

0 commit comments

Comments
 (0)