Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var InstanceCores = map[string]int{}/* 164 elements not displayed */
InstanceCores contains a mapping of instance types to the number of cores Based on info from https://aws.amazon.com/ec2/instance-types/ and https://aws.amazon.com/ec2/previous-generation/
var InstanceENIsAvailable = map[string]int{}/* 164 elements not displayed */
InstanceENIsAvailable contains a mapping of instance types to the number of ENIs available which is described at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI
var InstanceIPsAvailable = map[string]int{}/* 164 elements not displayed */
InstanceIPsAvailable contains a mapping of instance types to the number of IPs per ENI https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI
var InstanceMemory = map[string]int{}/* 164 elements not displayed */
InstanceMemory contains a mapping of instance types to the amount of memory Based on info from https://aws.amazon.com/ec2/instance-types/ and https://aws.amazon.com/ec2/previous-generation/
Functions ¶
This section is empty.
Types ¶
type Node ¶
Node represents and EC2 instance.
func New ¶
func New(e ec2iface.EC2API, m metadataClient, region *string, containerRuntime string) (*Node, error)
New returns a Node instance.
If the EC2 instance doesn't have the expected kubernetes tag, it will backoff and retry. If it isn't able to query EC2 or there are any other errors, an error will be returned.
func (*Node) ClusterDNS ¶ added in v0.0.5
ClusterDNS returns the in cluster IP address that kube-dns should avalible at
func (*Node) ClusterName ¶
ClusterName returns the cluster name.
It reads the cluster name from a tag on the EC2 instance.
func (*Node) Labels ¶ added in v0.0.10
Labels returns list of kubernetes labels for this node
If the node is a spot instance the node-role.kubernetes.io/spot-worker label will be set, otherwise the node-role.kubernetes.io/worker is set.
Other custom labels can be set using EC2 tags with the k8s.io/cluster-autoscaler/node-template/label/ prefix
func (*Node) MaxPods ¶ added in v0.0.3
MaxPods returns the maximum number of pods that can be scheduled to this node
see https://github.com/aws/amazon-vpc-cni-k8s#setup for more info
func (*Node) ReservedCPU ¶ added in v0.0.8
ReservedCPU returns the CPU in millicores that should be reserved for Kuberntes own use on this node
The calculation here is based on information found in the GKE documentation here: https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture I think that it should also apply to AWS
func (*Node) ReservedMemory ¶ added in v0.0.8
ReservedMemory returns the memory that should be reserved for Kuberntes own use on this node
The calculation here is based on information found in the GKE documentation here: https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture I think that it should also apply to AWS