Skip to content

Commit

Permalink
[cherry-pick] Update flags: --username, --password to `--username…
Browse files Browse the repository at this point in the history
…=`, `--password=` (#1436)

* Update flags: `--username`, `--password` to `--username=`, `--password=`

/cherry-pick

Signed-off-by: Emruz Hossain <emruz@appscode.com>

* Fix cherrypick

Signed-off-by: hmsayem <hmsayem@appscode.com>

Co-authored-by: Emruz Hossain <emruz@appscode.com>
Co-authored-by: hmsayem <hmsayem@appscode.com>
  • Loading branch information
3 people committed Feb 28, 2022
1 parent b7533ec commit 8d939ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/backup.go
Expand Up @@ -357,8 +357,8 @@ func (opt *mongoOptions) backupMongoDB(targetRef api_v1beta1.TargetRef) (*restic

} else {
userAuth := []interface{}{
"--username", string(appBindingSecret.Data[MongoUserKey]),
"--password", string(appBindingSecret.Data[MongoPasswordKey]),
fmt.Sprintf("--username=%s", appBindingSecret.Data[MongoUserKey]),
fmt.Sprintf("--password=%s", appBindingSecret.Data[MongoPasswordKey]),
"--authenticationDatabase", opt.authenticationDatabase,
}
mongoCreds = append(mongoCreds, userAuth...)
Expand Down
4 changes: 2 additions & 2 deletions pkg/restore.go
Expand Up @@ -288,8 +288,8 @@ func (opt *mongoOptions) restoreMongoDB(targetRef api_v1beta1.TargetRef) (*resti

} else {
userAuth := []interface{}{
"--username", string(appBindingSecret.Data[MongoUserKey]),
"--password", string(appBindingSecret.Data[MongoPasswordKey]),
fmt.Sprintf("--username=%s", appBindingSecret.Data[MongoUserKey]),
fmt.Sprintf("--password=%s", appBindingSecret.Data[MongoPasswordKey]),
"--authenticationDatabase", opt.authenticationDatabase,
}
mongoCreds = append(mongoCreds, userAuth...)
Expand Down

0 comments on commit 8d939ff

Please sign in to comment.