Documentation ¶
Index ¶
- Variables
- func AddCommands()
- func Execute()
- func LoadConfig(cfgFile string) (*viper.Viper, error)
- type Config
- func (c *Config) ClustersDir() string
- func (c *Config) Dir() string
- func (c *Config) JSON(pp bool) (string, error)
- func (c *Config) PKIDir() string
- func (c *Config) String() string
- func (c *Config) Stringf(format string, pp bool) (string, error)
- func (c *Config) TOML() (string, error)
- func (c *Config) TemplatesDir() string
- func (c *Config) Text(pp bool) (string, error)
- func (c *Config) UpdateViper(v *viper.Viper)
- func (c *Config) YAML() (string, error)
Constants ¶
This section is empty.
Variables ¶
var RootCmd = &cobra.Command{ Use: "kubekit", Short: "KubeKit is a Kubernetes toolkit", Long: `KubeKit is a toolkit for setting up a Kubernetes-powered cluster. It's the easiest way to get a Kubernetes cluster on different platforms.`, Run: func(cmd *cobra.Command, args []string) { longVersion := cmd.Flags().Lookup("verbose").Changed if versionFlag { printVersion(longVersion) return } cmd.HelpFunc()(cmd, args) }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
type Config ¶
type Config struct { UI *ui.UI `json:"-" yaml:"-" toml:"-" mapstructure:"-"` Scroll bool `json:"scroll" yaml:"scroll" toml:"scroll" mapstructure:"scroll"` Verbose bool `json:"verbose" yaml:"verbose" toml:"verbose" mapstructure:"verbose"` Quiet bool `json:"quiet" yaml:"quiet" toml:"quiet" mapstructure:"quiet"` Debug bool `json:"debug" yaml:"debug" toml:"debug" mapstructure:"debug"` LogLevel string `json:"log_level" yaml:"log_level" toml:"log_level" mapstructure:"log_level"` LogForceColors bool `json:"log_color" yaml:"log_color" toml:"log_color" mapstructure:"log_color"` LogFile string `json:"log" yaml:"log" toml:"log" mapstructure:"log"` ClustersPath string `json:"clusters_path" yaml:"clusters_path" toml:"clusters_path" mapstructure:"clusters_path"` TemplatesPath string `json:"templates_path" yaml:"templates_path" toml:"templates_path" mapstructure:"templates_path"` PKIPath string `json:"pki_path" yaml:"pki_path" toml:"pki_path" mapstructure:"pki_path"` // contains filtered or unexported fields }
Config is the KubeKit configuration that are obtained from all the sub-commands
func (*Config) ClustersDir ¶
ClustersDir returns the absolute directory path where the clusters config are
func (*Config) PKIDir ¶
PKIDir returns the KubeKit PKI directory. Here is where the server store the certificates
func (*Config) String ¶
Stringf returns the configuration in the format defined in cfgShowFormat and pretty print if it's JSON
func (*Config) Stringf ¶
Stringf returns the configuration in the requested format and alows to choose pretty print if it's JSON. If no format is provided will return it in the format defined in cfgShowFormat or JSON
func (*Config) TemplatesDir ¶
TemplatesDir returns the absolute directory path where the templates are
func (*Config) Text ¶
Text return the configuration in human readable format with more information and even more if debug flag is set
func (*Config) UpdateViper ¶
UpdateViper refresh all the config settings from viper keys