Documentation ¶
Index ¶
- Variables
- func Boundbox(points [][]float64) []float64
- func CompareIPAddresses(oldObj *corev1.Node, newObj *corev1.Node) bool
- func CreateJoinToken(ttl string, hostname string) string
- func GeoFence(boundbox []float64, polygon [][]float64, x float64, y float64) bool
- func GetConditionReadyStatus(node *corev1.Node) string
- func GetGeolocationByIP(hostname string, ipStr string) bool
- func GetKubeletVersion() string
- func GetList() []string
- func GetNodeIPAddresses(obj *corev1.Node) (string, string)
- func SetHostname(hostRecord namecheap.DomainDNSHost) (bool, string)
- func SetNodeScheduling(nodeName string, unschedulable bool) error
- func SetOwnerReferences(nodeName string, ownerReferences []metav1.OwnerReference) error
Constants ¶
This section is empty.
Variables ¶
var Clientset kubernetes.Interface
Clientset to be synced by the custom resources
Functions ¶
func Boundbox ¶
Boundbox returns a rectangle which created according to the points of the polygon given
func CompareIPAddresses ¶
CompareIPAddresses makes a comparison between old and new objects of the node to return the information of the match
func CreateJoinToken ¶
CreateJoinToken generates token to be used on adding a node onto the cluster
func GeoFence ¶
GeoFence function determines whether the point is inside a polygon by using the crossing number method. This method counts the number of times a ray starting at a point crosses a polygon boundary edge. The even numbers mean the point is outside and the odd ones mean the point is inside.
func GetConditionReadyStatus ¶
GetConditionReadyStatus picks the ready status of node
func GetGeolocationByIP ¶
GetGeolocationByIP return geolabels by taking advantage of GeoLite database
func GetKubeletVersion ¶
func GetKubeletVersion() string
GetKubeletVersion looks at the head node to decide which version of Kubernetes to install
func GetNodeIPAddresses ¶
GetNodeIPAddresses picks up the internal and external IP addresses of the Node
func SetHostname ¶
func SetHostname(hostRecord namecheap.DomainDNSHost) (bool, string)
SetHostname generates token to be used on adding a node onto the cluster
func SetNodeScheduling ¶
SetNodeScheduling syncs the node with the node contribution
func SetOwnerReferences ¶
func SetOwnerReferences(nodeName string, ownerReferences []metav1.OwnerReference) error
SetOwnerReferences make the references owner of the node
Types ¶
This section is empty.