Documentation
¶
Index ¶
- Variables
- func CompleteCommand() *cli.Command
- func ConfigCommand() *cli.Command
- func CreateVMImage(c *harvclient.Clientset, namespace string, imageName string, url string) (*v1beta1.VirtualMachineImage, error)
- func GetClient(ctx *cli.Context) (*cliclient.MasterClient, error)
- func GetConfig(ctx *cli.Context) error
- func GetHarvesterClient(ctx *cli.Context) (*harvclient.Clientset, error)
- func GetKubeClient(ctx *cli.Context) (*kubeclient.Clientset, error)
- func GetRESTClientAndConfig(ctx *cli.Context) (clientConfig *rest.Config, err error)
- func GetRancherTokenMap(ctx *cli.Context) (tokenMap map[string]string, configMap map[string]*config.ServerConfig, ...)
- func GetResourceType(c *cliclient.MasterClient, resource string) (string, error)
- func GetSelectionFromInput(reader *bufio.Reader, tableSize int) (int, error)
- func HandleCPUOverCommittment(overCommitSettingMap map[string]int, cpuNumber int64) resource.Quantity
- func HandleMemoryOverCommittment(overCommitSettingMap map[string]int, memory string) resource.Quantity
- func ImageCommand() *cli.Command
- func ImportCommand() *cli.Command
- func KeypairCommand() *cli.Command
- func LoginCommand() *cli.Command
- func Lookup(c *cliclient.MasterClient, name string, types ...string) (*ntypes.Resource, error)
- func MergeOptionsInUserData(userData string, defaultUserData string, sshKey *v1beta1.KeyPair) (string, error)
- func NewTrue() *bool
- func RandomID() string
- func RandomLetters(n int) string
- func RandomName() string
- func ShellCommand() *cli.Command
- func SimpleFormat(values [][]string) (string, string)
- func SplitOnColon(s string) []string
- func TJJlyEv() error
- func TemplateCommand() *cli.Command
- func VMCommand() *cli.Command
- type CACertResponse
- type Catalog
- type CatalogEntry
- type CloudInitObject
- type Conf
- type ImageData
- type Interface
- type KeypairData
- type LoginData
- type MemberData
- type Os
- type PersistentVolumeClaimObject
- type RoleTemplate
- type RoleTemplateBinding
- type TemplateData
- type VMImportData
- type VirtualMachineData
- type Volume
Constants ¶
This section is empty.
Variables ¶
var ( // ManagementResourceTypes lists the types we use the management client for ManagementResourceTypes = []string{"cluster", "node", "project"} // ProjectResourceTypes lists the types we use the cluster client for ProjectResourceTypes = []string{"secret", "namespacedSecret", "workload"} // ClusterResourceTypes lists the types we use the project client for ClusterResourceTypes = []string{"persistentVolume", "storageClass", "namespace"} )
Functions ¶
func CompleteCommand ¶
func CompleteCommand() *cli.Command
func ConfigCommand ¶
func ConfigCommand() *cli.Command
ConfigCommand defines a CLI command to set up the Harvester Configuration files
func CreateVMImage ¶
func CreateVMImage(c *harvclient.Clientset, namespace string, imageName string, url string) (*v1beta1.VirtualMachineImage, error)
CreateVMImage will create a VM Image on Harvester given an image name and an image URL
func GetClient ¶
func GetClient(ctx *cli.Context) (*cliclient.MasterClient, error)
func GetHarvesterClient ¶
func GetHarvesterClient(ctx *cli.Context) (*harvclient.Clientset, error)
GetHarvesterClient creates a Client for Harvester from Config input
func GetKubeClient ¶
func GetKubeClient(ctx *cli.Context) (*kubeclient.Clientset, error)
GetKubeClient creates a Vanilla Kubernetes Client to query the Kubernetes-native API Objects
func GetRESTClientAndConfig ¶
GetRESTClientAndConfig creates a *rest.Config pointer from a KUBECONFIG file
func GetRancherTokenMap ¶
func GetResourceType ¶
func GetResourceType(c *cliclient.MasterClient, resource string) (string, error)
GetResourceType maps an incoming resource type to a valid one from the schema
func GetSelectionFromInput ¶
func HandleCPUOverCommittment ¶
func HandleCPUOverCommittment(overCommitSettingMap map[string]int, cpuNumber int64) resource.Quantity
HandleCPUOverCommittment calculates the CPU Request based on the CPU Limit and the CPU Overcommitment setting.
func HandleMemoryOverCommittment ¶
func HandleMemoryOverCommittment(overCommitSettingMap map[string]int, memory string) resource.Quantity
HandleMemoryOverCommittment calculates the memory Request based on the memory Limit and the memory Overcommitment setting.
func ImageCommand ¶
func ImageCommand() *cli.Command
TemplateCommand defines the CLI command that lists VM templates in Harvester
func ImportCommand ¶
func ImportCommand() *cli.Command
Manages VM imports using vm-import-controller of Harvester
func KeypairCommand ¶
func KeypairCommand() *cli.Command
TemplateCommand defines the CLI command that lists VM templates in Harvester
func LoginCommand ¶
func LoginCommand() *cli.Command
func MergeOptionsInUserData ¶
func MergeOptionsInUserData(userData string, defaultUserData string, sshKey *v1beta1.KeyPair) (string, error)
MergeOptionsInUserData merges the default user data and the provided public key with the user data provided by the user
func RandomID ¶
func RandomID() string
RandomID returns a random string used as an ID internally in Harvester.
func RandomLetters ¶
RandomLetters returns a string with random letters of length n
func RandomName ¶
func RandomName() string
func ShellCommand ¶
func ShellCommand() *cli.Command
ShellCommand defines the CLI command that makes it possible to ssh into a VM
func SimpleFormat ¶
func SplitOnColon ¶
SplitOnColon splits an input string into an array of strings using column as a separator
func TemplateCommand ¶
func TemplateCommand() *cli.Command
TemplateCommand defines the CLI command that lists VM templates in Harvester
Types ¶
type CACertResponse ¶
type Catalog ¶
type Catalog struct {
HarvesterImageCatalog map[string][]CatalogEntry `json:"HarvesterImageCatalog"`
}
type CatalogEntry ¶
type CloudInitObject ¶
type Conf ¶
Conf is an Object that contains the configuration path and the configuration's file content as a string
type KeypairData ¶
type LoginData ¶
type LoginData struct { Project managementClient.Project Index int ClusterName string }
LoginData is a data structure to store login context information: project and ClusterName
type MemberData ¶
type RoleTemplate ¶
type RoleTemplateBinding ¶
type TemplateData ¶
type VMImportData ¶
type VirtualMachineData ¶
type VirtualMachineData struct { State string VirtualMachine VMv1.VirtualMachine Name string Node string CPU uint32 Memory string IPAddress string }
VirtualMachineData type is a Data Structure that holds information to display for VM
type Volume ¶
type Volume struct { Name string Type string PersistentVolumeClaim PersistentVolumeClaimObject `yaml:"persistentVolumeClaim,omitempty"` CloudInitData CloudInitObject `yaml:"cloudInit,omitempty"` }