Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoScalerServerConfig ¶
type AutoScalerServerConfig struct { UseExternalEtdc bool `json:"use-external-etcd"` ExtDestinationEtcdSslDir string `json:"src-etcd-ssl-dir"` ExtSourceEtcdSslDir string `json:"dst-etcd-ssl-dir"` 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 MaxPods int `json:"maxPods"` // Mandatory, Max kubelet pods MaxCreatedNodePerCycle int `json:"maxNode-per-cycle" default:"2"` // Optional, the max number VM to create in // NodeNamePrefix string `default:"autoscaled" json:"node-name-prefix"` // Optional, the created node name prefix 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 Optionals *AutoScalerServerOptionals `json:"optionals"` SSH *AutoScalerServerSSH `json:"ssh-infos"` CloudProvider string `json:"cloud-provider"` AwsInfos map[string]*aws.Configuration `json:"aws"` }
AutoScalerServerConfig is contains configuration
func (*AutoScalerServerConfig) GetAwsConfiguration ¶
func (conf *AutoScalerServerConfig) GetAwsConfiguration(name string) *aws.Configuration
GetAwsConfiguration returns the aws 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 ExtDestinationEtcdSslDir string ExtSourceEtcdSslDir string UseExternalEtdc *bool 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 { Price float64 `json:"price"` // VM price in USD Memory int `json:"memsize"` // VM Memory size in megabytes Vcpu int `json:"vcpus"` // VM number of cpus DiskType string `default:"gp2" json:"diskType"` // VM disk size type gp2, gp3..... DiskSize 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.