Files
charts/clustertool/cmd/flux_bootstrap.go
Kjeld Schouten 1c28a12789 chore: fix links
2025-09-07 14:26:19 +02:00

37 lines
845 B
Go

package cmd
import (
"context"
"strings"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/trueforge-org/truecharts/clustertool/pkg/fluxhandler"
"github.com/trueforge-org/truecharts/clustertool/pkg/initfiles"
"github.com/trueforge-org/truecharts/clustertool/pkg/sops"
)
var fluxBootstrapLongHelp = strings.TrimSpace(`
`)
var fluxbootstrap = &cobra.Command{
Use: "bootstrap",
Short: "Manually bootstrap fluxcd on existing cluster",
Example: "clustertool flux bootstrap",
Long: fluxBootstrapLongHelp,
Run: func(cmd *cobra.Command, args []string) {
ctx := context.Background()
if err := sops.DecryptFiles(); err != nil {
log.Info().Msgf("Error decrypting files: %v\n", err)
}
initfiles.LoadTalEnv(false)
fluxhandler.FluxBootstrap(ctx)
},
}
func init() {
fluxCmd.AddCommand(fluxbootstrap)
}