Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoScalerServerConfig ¶
type AutoScalerServerConfig struct { Network string `default:"tcp" json:"network"` // Mandatory, Network to listen (see grpc doc) to listen Listen string `default:"0.0.0.0:5200" json:"listen"` // Mandatory, Address to listen ProviderID string `json:"secret"` // Mandatory, secret Identifier, client must match this MinNode int `json:"minNode"` // Mandatory, Min AutoScaler VM MaxNode int `json:"maxNode"` // Mandatory, Max AutoScaler VM NodePrice float64 `json:"nodePrice"` // Optional, The VM price PodPrice float64 `json:"podPrice"` // Optional, The pod price KubeAdm KubeJoinConfig `json:"kubeadm"` DefaultMachineType string `default:"{\"standard\": {}}" json:"default-machine"` Machines map[string]*MachineCharacteristic `default:"{\"standard\": {}}" json:"machines"` // Mandatory, Available machines CloudInit interface{} `json:"cloud-init"` // Optional, The cloud init conf file Optionals *AutoScalerServerOptionals `json:"optionals"` ResourceLimiter *ResourceLimiter `json:"limits"` SSH *AutoScalerServerSSH `json:"ssh-infos"` VMwareInfos map[string]*vsphere.Configuration `json:"vmware"` }
AutoScalerServerConfig is contains configuration
func (*AutoScalerServerConfig) GetVSphereConfiguration ¶
func (conf *AutoScalerServerConfig) GetVSphereConfiguration(name string) *vsphere.Configuration
GetVSphereConfiguration returns the vsphere named conf or default
type AutoScalerServerOptionals ¶
type AutoScalerServerOptionals struct { Pricing bool `json:"pricing"` GetAvailableMachineTypes bool `json:"getAvailableMachineTypes"` NewNodeGroup bool `json:"newNodeGroup"` TemplateNodeInfo bool `json:"templateNodeInfo"` Create bool `json:"create"` Delete bool `json:"delete"` }
AutoScalerServerOptionals declare wich features must be optional
type AutoScalerServerSSH ¶
type AutoScalerServerSSH struct { UserName string `json:"user"` Password string `json:"password"` AuthKeys string `json:"ssh-private-key"` }
AutoScalerServerSSH contains ssh client infos
func (*AutoScalerServerSSH) GetAuthKeys ¶
func (ssh *AutoScalerServerSSH) GetAuthKeys() string
GetAuthKeys returns the path to key file, subsistute ~
func (*AutoScalerServerSSH) GetUserName ¶
func (ssh *AutoScalerServerSSH) GetUserName() string
GetUserName returns user name from config or the real current username is empty or equal to ~
type ClientGenerator ¶ added in v1.20.5
type ClientGenerator interface { KubeClient() (kubernetes.Interface, error) PodList(nodeName string, podFilter PodFilterFunc) ([]apiv1.Pod, error) NodeList() (*apiv1.NodeList, error) SetProviderID(nodeName, providerID string) error UncordonNode(nodeName string) error CordonNode(nodeName string) error MarkDrainNode(nodeName string) error DrainNode(nodeName string, ignoreDaemonSet, deleteLocalData bool) error DeleteNode(nodeName string) error AnnoteNode(nodeName string, annotations map[string]string) error LabelNode(nodeName string, labels map[string]string) error WaitNodeToBeReady(nodeName string, timeToWaitInSeconds int) error }
ClientGenerator provides clients
type Config ¶ added in v1.20.5
type Config struct { APIServerURL string KubeConfig string RequestTimeout time.Duration DeletionTimeout time.Duration MaxGracePeriod time.Duration Config string SaveLocation string DisplayVersion bool LogFormat string LogLevel string MinCpus int64 MinMemory int64 MaxCpus int64 MaxMemory int64 }
func (*Config) GetResourceLimiter ¶ added in v1.20.5
func (c *Config) GetResourceLimiter() *ResourceLimiter
func (*Config) ParseFlags ¶ added in v1.20.5
type KubeJoinConfig ¶
type KubeJoinConfig struct { Address string `json:"address,omitempty"` Token string `json:"token,omitempty"` CACert string `json:"ca,omitempty"` ExtraArguments []string `json:"extras-args,omitempty"` }
KubeJoinConfig give element to join kube master
type MachineCharacteristic ¶
type MachineCharacteristic struct { Memory int `json:"memsize"` // VM Memory size in megabytes Vcpu int `json:"vcpus"` // VM number of cpus Disk int `json:"disksize"` // VM disk size in megabytes }
MachineCharacteristic defines VM kind
type PodFilterFunc ¶ added in v1.20.5
A PodFilterFunc returns true if the supplied pod passes the filter.
Click to show internal directories.
Click to hide internal directories.