Documentation ¶
Index ¶
- Variables
- func Execute()
- func FatalOnError(err error)
- func RunClusterCreate(cmd *cobra.Command, args []string)
- type AppConfig
- type AppSSHClient
- type HetznerConfig
- func (config *HetznerConfig) AddCluster(cluster clustermanager.Cluster)
- func (config *HetznerConfig) AddContext(context HetznerContext)
- func (config *HetznerConfig) AddSSHKey(key clustermanager.SSHKey)
- func (config *HetznerConfig) DeleteCluster(name string) error
- func (config *HetznerConfig) DeleteSSHKey(name string) error
- func (config *HetznerConfig) FindClusterByName(name string) (int, *clustermanager.Cluster)
- func (config *HetznerConfig) FindSSHKeyByName(name string) (int, error)
- func (config HetznerConfig) WriteCurrentConfig()
- type HetznerContext
- type SSHKey
Constants ¶
This section is empty.
Variables ¶
var DebugMode bool
var DefaultConfigPath string
DefaultConfigPath is the path where the default config is located
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func FatalOnError ¶
func FatalOnError(err error)
FatalOnError is an helper function to transform error to fatl
func RunClusterCreate ¶
RunClusterCreate executes the cluster creation
Types ¶
type AppConfig ¶
type AppConfig struct { Client *hcloud.Client Context context.Context CurrentContext *HetznerContext Config *HetznerConfig SSHClient clustermanager.NodeCommunicator }
AppConfig define the application configuration
var AppConf AppConfig
AppConf is the default configuration from the local system. var AppConf = NewAppConfig()
func NewAppConfig ¶
NewAppConfig creates a new AppConfig struct using the locally saved configuration file. If no local configuration file is found a new config will be created.
func (*AppConfig) DeleteContextByName ¶
DeleteContextByName deletes a context by name from the current config
func (*AppConfig) FindContextByName ¶
func (app *AppConfig) FindContextByName(name string) (*HetznerContext, error)
FindContextByName find a context using name
func (*AppConfig) SwitchContextByName ¶
SwitchContextByName switch to context with a specific name in app
type HetznerConfig ¶
type HetznerConfig struct { ActiveContextName string `json:"active_context_name"` Contexts []HetznerContext `json:"contexts"` SSHKeys []clustermanager.SSHKey `json:"ssh_keys"` Clusters []clustermanager.Cluster `json:"clusters"` }
HetznerConfig define the hetzner cloud provider config
func (*HetznerConfig) AddCluster ¶
func (config *HetznerConfig) AddCluster(cluster clustermanager.Cluster)
AddCluster add a cluster in config
func (*HetznerConfig) AddContext ¶
func (config *HetznerConfig) AddContext(context HetznerContext)
AddContext add context to config
func (*HetznerConfig) AddSSHKey ¶
func (config *HetznerConfig) AddSSHKey(key clustermanager.SSHKey)
AddSSHKey add a new SSH key to config
func (*HetznerConfig) DeleteCluster ¶
func (config *HetznerConfig) DeleteCluster(name string) error
DeleteCluster remove cluster from config
func (*HetznerConfig) DeleteSSHKey ¶
func (config *HetznerConfig) DeleteSSHKey(name string) error
DeleteSSHKey remove the SSH key from config
func (*HetznerConfig) FindClusterByName ¶
func (config *HetznerConfig) FindClusterByName(name string) (int, *clustermanager.Cluster)
FindClusterByName find a cluster by name in config
func (*HetznerConfig) FindSSHKeyByName ¶
func (config *HetznerConfig) FindSSHKeyByName(name string) (int, error)
FindSSHKeyByName find a SSH key in config by name
func (HetznerConfig) WriteCurrentConfig ¶
func (config HetznerConfig) WriteCurrentConfig()
WriteCurrentConfig write the configuration to file
type HetznerContext ¶
HetznerContext declare the hetzner cloud context
Source Files ¶
- cluster.go
- cluster_add_external_worker.go
- cluster_add_worker.go
- cluster_addon.go
- cluster_addon_install.go
- cluster_addon_list.go
- cluster_addon_uninstall.go
- cluster_create.go
- cluster_delete.go
- cluster_etcd.go
- cluster_etcd_backup.go
- cluster_etcd_restore.go
- cluster_kubeconfig.go
- cluster_list.go
- cluster_master_ip.go
- cluster_phase.go
- cluster_phase_etcd.go
- cluster_phase_install_masters.go
- cluster_phase_install_workers.go
- cluster_phase_network_setup.go
- cluster_phase_provision.go
- cluster_phase_restart.go
- cluster_phase_setup_ha.go
- cluster_remove_external_worker.go
- cluster_remove_worker.go
- completion.go
- config.go
- context.go
- context_add.go
- context_current.go
- context_delete.go
- context_list.go
- context_use.go
- root.go
- ssh_key.go
- ssh_key_add.go
- ssh_key_delete.go
- ssh_key_list.go
- types.go
- util.go
- version.go