generate

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AWSCmd = &cobra.Command{
	Use: "aws",

	Short: "Generate a sample KubeAid Bootstrap Script config file, for deploying an AWS based cluster",

	Run: func(cmd *cobra.Command, args []string) {
		config.GenerateSampleConfig(context.Background(), constants.CloudProviderAWS)
	},
}
View Source
var GenerateCmd = &cobra.Command{
	Use: "generate",

	PersistentPreRun: func(cmd *cobra.Command, args []string) {

		if _, err := os.Stat(constants.OutputPathGeneratedConfigsDirectory); err == nil {
			slog.ErrorContext(
				cmd.Context(),
				"Config files directory already exists",
				slog.String("path", constants.OutputPathGeneratedConfigsDirectory),
			)
			os.Exit(1)
		}
	},

	RunE: func(cmd *cobra.Command, args []string) error {
		return cmd.Help()
	},
}
View Source
var HetznerCmd = &cobra.Command{
	Use: "hetzner",

	Short: "Generate a sample KubeAid Bootstrap Script config file, for deploying a Hetzner based cluster",

	Run: func(cmd *cobra.Command, args []string) {
		config.GenerateSampleConfig(context.Background(), constants.CloudProviderHetzner)
	},
}
View Source
var LocalCmd = &cobra.Command{
	Use: "local",

	Short: "Generate a sample KubeAid Bootstrap Script config file, for deploying a local K3D based cluster (for testing purposes)",

	Run: func(cmd *cobra.Command, args []string) {
		config.GenerateSampleConfig(context.Background(), constants.CloudProviderLocal)
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL