lib/backup/s3remote: fixed credsFilePath flag (#6488)

properly use credsFilePath flag value

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6353

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit e678a9aa51)
This commit is contained in:
Andrii Chubatiuk 2024-06-14 15:13:02 +03:00 committed by hagen1778
parent 8828c9de22
commit 6970b546bd
No known key found for this signature in database
GPG key ID: 3BF75F3741CA9640
2 changed files with 7 additions and 1 deletions

View file

@ -12,6 +12,7 @@ The following `tip` changes can be tested by building VictoriaMetrics components
## v1.93.x long-time support release (LTS)
*
* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert/): fix path for system links printed on default vmalert's UI page when `-http.pathPrefix` is set.
* BUGFIX: [vmbackup](https://docs.victoriametrics.com/vmbackup/): properly configure authentication when `-configFilePath` cmd-line flag is specified.
## [v1.93.15](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.93.15)

View file

@ -94,9 +94,14 @@ func (fs *FS) Init() error {
config.WithDefaultRegion("us-east-1"),
}
if len(fs.CredsFilePath) > 0 {
if len(fs.ConfigFilePath) > 0 {
configOpts = append(configOpts, config.WithSharedConfigFiles([]string{
fs.ConfigFilePath,
}))
}
if len(fs.CredsFilePath) > 0 {
configOpts = append(configOpts, config.WithSharedCredentialsFiles([]string{
fs.CredsFilePath,
}))
}