Files
warewulf/internal/app/wwctl/configure/tls/root.go
Jonathon Anderson a886b4958b Simplify and clarify configuration
- changed "secure port" to "tls port"
- removed the --create flag for "wwctl configure tls"; made it the default behavior
- fixed a TLS creation bug in "wwctl configure --all"
- added logging to "wwctl configure tls" and "wwctl configure --all" (for the tls case)

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2026-03-09 21:42:26 -06:00

34 lines
1.0 KiB
Go

package tls
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
)
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "tls [OPTIONS]",
Aliases: []string{"keys", "key", "cert", "crt"},
Short: "Manage and initialize x509 keys",
Long: `This application allows you to manage the x509 keys and certificates for Warewulf.`,
RunE: CobraRunE,
Args: cobra.NoArgs,
ValidArgsFunction: completions.None,
}
importPath string
exportPath string
force bool
)
func init() {
baseCmd.PersistentFlags().StringVar(&importPath, "import", "", "Import keys from directory")
baseCmd.PersistentFlags().StringVar(&exportPath, "export", "", "Export keys to directory")
baseCmd.PersistentFlags().BoolVarP(&force, "force", "f", false, "Enforce creation of keys even if they exist")
}
// GetCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}