Skip to content

Commit

Permalink
backup:fix s3 backup empty env
Browse files Browse the repository at this point in the history
  • Loading branch information
zhl003 committed Apr 28, 2023
1 parent df6312b commit e3b9004
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/backup/backup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,10 @@ func generateBackupJobSpec(backup *v1beta1.Backup, cluster *v1beta1.MysqlCluster
getEnvVarFromSecret(clusterAuthsctName, "BACKUP_USER", "backup-user", true),
getEnvVarFromSecret(clusterAuthsctName, "BACKUP_PASSWORD", "backup-password", true),
)
if NFSBackupEnv != nil && S3BackuptEnv != nil {
if NFSBackupEnv != nil {
container.Env = append(container.Env, *NFSBackupEnv)
}
if len(S3BackuptEnv) != 0 {
container.Env = append(container.Env, S3BackuptEnv...)
}

Expand Down

0 comments on commit e3b9004

Please sign in to comment.