Skip to content

Commit

Permalink
change order to create bucket
Browse files Browse the repository at this point in the history
Signed-off-by: Thiago Pagotto <pagottoo@gmail.com>
  • Loading branch information
pagottoo committed Aug 5, 2022
1 parent 0a90335 commit 0afee7f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/ssl/ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ func getItemsToBackup(apiGroup string, apiVersion string, resourceType string, n

// GetBackupCertificates create a backup of Certificates on AWS S3 in yaml files
func GetBackupCertificates() (string, error) {
config := configs.ReadConfig()
namespaces := getNamespacesToBackupSSL()
log.Println("GetBackupCertificates called")

bucketName := fmt.Sprintf("k1-%s", viper.GetString("aws.hostedzonename"))
//path := "cert-manager"
aws.CreateBucket(false, bucketName)

config := configs.ReadConfig()
namespaces := getNamespacesToBackupSSL()

log.Println("getting certificates")
certificates, err := getItemsToBackup("cert-manager.io", "v1", "certificates", namespaces, "")
if err != nil {
Expand Down

0 comments on commit 0afee7f

Please sign in to comment.