Skip to content

Commit

Permalink
fix env
Browse files Browse the repository at this point in the history
  • Loading branch information
eumel8 committed Mar 9, 2024
1 parent e17662c commit 8a02572
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions vcluster-backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"log"
"os"
"os/signal"
"strconv"

"crypto/aes"
"crypto/cipher"
Expand Down Expand Up @@ -116,7 +117,7 @@ func parseEnv() (string, string, string, string, string, string, bool, int) {
region := os.Getenv("REGION")
enyKey := os.Getenv("ENC_KEY")
trace := os.Getenv("TRACE") == "false"
backupInterval := 2
backupInterval, _ := strconv.Atoi(os.Getenv("BACKUP_INTERVAL"))
return endpoint, bucketName, accessKey, secretKey, region, enyKey, trace, backupInterval
}

Expand Down Expand Up @@ -153,13 +154,13 @@ func main() {
log.Println("S3 endpoint: ", endpoint)
log.Println("S3 bucketName: ", bucketName)
log.Println("S3 accessKey: ", accessKey)
log.Println("S3 accessKey: ", secretKey[0:2])
log.Println("S3 secretKey: ", secretKey[0:2])
log.Println("S3 region: ", region)
log.Println("S3 encKey: ", encKey[0:2])
if trace {
log.Println("S3 trace: true")
}
log.Println("S3 backupInterval: ", backupFile)
log.Println("S3 backupInterval: ", backupInterval)

minioClient, err := minioClient(endpoint, accessKey, secretKey, region, trace)
if err != nil {
Expand Down

0 comments on commit 8a02572

Please sign in to comment.