Documentation ¶
Index ¶
- Constants
- Variables
- func Execute()
- func GetEtcdHostNames(cmd *cobra.Command, minimalDefaultHosts []string) ([]string, error)
- func GetHostNamesFromEnvUrls(envName string, minimalDefault []string) ([]string, error)
- func GetHostNamesFromUrls(urls string, minimalDefault []string) ([]string, error)
- func GetUrlsFromInitialClusterString(initialCluster string) (string, error)
Constants ¶
const EtcdCertsCmdName string = "etcdcerts"
EtcdCertsCmdName the command name to use to invoke kmm for generating etcd certs
const ExitOnCompletionFlagName string = "exit-on-completion"
ExitOnCompletionFlagName is the syntax for the flag
const MasterSubCommand string = "master"
MasterSubCommand is the sub command syntax
Variables ¶
var AddonsCmd = &cobra.Command{ Use: "addons", Short: "Will deploy cluster resources", Long: "Will deploy / redeploy essential cluster resources", Run: func(cmd *cobra.Command, args []string) { cfg, err := getKmmConfig(cmd) if err != nil { log.Fatal(err) } if err = cfg.Kmm.UpdateCloudCfg(); err != nil { log.Fatal(err) } if err = cfg.Kubeadm.Addons(); err != nil { log.Fatal(err) } }, }
AddonsCmd represents the addons command
var EtcdCertsCmd = &cobra.Command{ Use: EtcdCertsCmdName, Short: "Will generate etcd certs", Long: "Will generate etcd server, peer and client certs from a specified ca", Run: func(c *cobra.Command, args []string) { cfg, err := getConfig(c) if err == nil { err = etcd.GenCerts(cfg) } if err != nil { log.Fatal(err) os.Exit(-1) } }, }
EtcdCertsCmd represents the command for generating etcd certs
var ( // RootCmd represents the base command when called without any subcommands RootCmd = &cobra.Command{ Use: "kmm", Short: "Kubernetes multi-master", Long: "Kubernetes multi-master. Given CA's for etcd and Kubernetes, will automate starting kubernetes masters", RunE: func(c *cobra.Command, args []string) error { if c.Flags().Changed("version") { printVersion() return nil } return c.Usage() }, } )
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command sets flags appropriately. This is called by main(). It only needs to happen once to the rootCmd.
func GetEtcdHostNames ¶
GetEtcdHostNames will get the hosts names from command flags and environment variables and a minimal defaults
func GetHostNamesFromEnvUrls ¶
GetHostNamesFromEnvUrls - Will get host names from an environment variable and some defaults
func GetHostNamesFromUrls ¶
GetHostNamesFromUrls - Will parse host-names and adding specified additional extra minimal names...
func GetUrlsFromInitialClusterString ¶
GetUrlsFromInitialClusterString - Should return a , separated list of urls
Types ¶
This section is empty.