Documentation ¶
Overview ¶
Package cmd implements clusterctl commands.
Index ¶
Constants ¶
View Source
const ( // RepositoriesOutputYaml is an option used to print the repository list in yaml format. RepositoriesOutputYaml = "yaml" // RepositoriesOutputText is an option used to print the repository list in text format. RepositoriesOutputText = "text" )
Variables ¶
View Source
var ( // RepositoriesOutputs is a list of valid repository list outputs. RepositoriesOutputs = []string{RepositoriesOutputYaml, RepositoriesOutputText} )
View Source
var RootCmd = &cobra.Command{ Use: "clusterctl", SilenceUsage: true, Short: "clusterctl controls the lifecycle of a Cluster API management cluster", Long: templates.LongDesc(` Get started with Cluster API using clusterctl to create a management cluster, install providers, and create templates for your workload cluster.`), PersistentPostRunE: func(*cobra.Command, []string) error { ctx := context.Background() configClient, err := config.New(ctx, cfgFile) if err != nil { return err } disable, err := configClient.Variables().Get("CLUSTERCTL_DISABLE_VERSIONCHECK") if err == nil && disable == "true" { return nil } checker, err := newVersionChecker(ctx, configClient.Variables()) if err != nil { return err } output, err := checker.Check(ctx) if err != nil { return errors.Wrap(err, "unable to verify clusterctl version") } if output != "" { fmt.Fprintf(os.Stderr, "\033[33m%s\033[0m", output) } configDirectory, err := xdg.ConfigFile(config.ConfigFolderXDG) if err != nil { return err } downloadConfigFile := filepath.Join(configDirectory, config.DownloadConfigFile) if _, err := os.Stat(downloadConfigFile); err == nil { if verbosity != nil && *verbosity >= 5 { fmt.Fprintf(os.Stdout, "Removing downloaded clusterctl config file: %s\n", config.DownloadConfigFile) } _ = os.Remove(downloadConfigFile) } return nil }, }
RootCmd is clusterctl root CLI command.
Functions ¶
func GetSupportedShells ¶ added in v0.3.10
func GetSupportedShells() []string
GetSupportedShells returns a list of supported shells.
Types ¶
type ReleaseInfo ¶ added in v0.3.9
ReleaseInfo stores information about the release.
type VersionState ¶ added in v0.3.9
type VersionState struct { LastCheck time.Time LatestRelease ReleaseInfo }
VersionState stores the release info and the last time it was updated.
Source Files ¶
- alpha.go
- completion.go
- config.go
- config_repositories.go
- delete.go
- describe.go
- describe_cluster.go
- doc.go
- generate.go
- generate_cluster.go
- generate_provider.go
- generate_yaml.go
- get.go
- get_kubeconfig.go
- init.go
- init_list_images.go
- move.go
- rollout.go
- root.go
- topology.go
- topology_plan.go
- upgrade.go
- upgrade_apply.go
- upgrade_plan.go
- util.go
- version.go
- version_checker.go
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
templates
Package templates provides templates for descriptions and examples.
|
Package templates provides templates for descriptions and examples. |
Package rollout implements the clusterctl rollout command.
|
Package rollout implements the clusterctl rollout command. |
Click to show internal directories.
Click to hide internal directories.