Skip to content

Commit

Permalink
cmd to call backupssl directly
Browse files Browse the repository at this point in the history
Signed-off-by: Thiago Pagotto <pagottoo@gmail.com>
  • Loading branch information
pagottoo committed Jul 19, 2022
1 parent 348c227 commit 9061282
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions cmd/backupSsl.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package cmd

import (
"log"

"github.com/kubefirst/kubefirst/internal/ssl"
"github.com/spf13/cobra"
)

// backupSslCmd represents the backupSsl command
var backupSslCmd = &cobra.Command{
Use: "backupSSL",
Short: "Backup Secrets (cert-manager/certificates) to bucket kubefirst-<DOMAIN>",
Long: `This command create a backupt of secrets from certmanager certificates to bucket named kubefirst-<DOMAIN>
where can be used on provisioning phase with the flag --recycle-ssl`,

Run: func(cmd *cobra.Command, args []string) {
_, err := ssl.GetBackupCertificates()
if err != nil {
log.Panic(err)
}
},
}

func init() {
rootCmd.AddCommand(backupSslCmd)
}

0 comments on commit 9061282

Please sign in to comment.