Documentation ¶
Index ¶
- func Boundbox(points [][]float64) []float64
- func CompareIPAddresses(oldObj *corev1.Node, newObj *corev1.Node) bool
- func GeoFence(boundbox []float64, polygon [][]float64, x float64, y float64) bool
- func GetConditionReadyStatus(node *corev1.Node) string
- func GetNodeIPAddresses(obj *corev1.Node) (string, string)
- func GetRecordType(ip string) string
- func SetHostnameNamecheap(hostRecord namecheap.DomainDNSHost) (bool, string)
- func SetHostnameRoute53(id, key []byte, hostedZone, hostname, address, recordType string) (bool, string)
- type Manager
- func (m *Manager) CreateJoinToken(ttl string, hostname string) string
- func (m *Manager) GetGeolocationByIP(maxmindURL string, maxmindAccountID string, maxmindLicenseKey string, ...) bool
- func (m *Manager) SetNodeScheduling(hostname string, unschedulable bool) error
- func (m *Manager) SetOwnerReferences(hostname string, ownerReferences []metav1.OwnerReference) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 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 GetNodeIPAddresses ¶
GetNodeIPAddresses picks up the internal and external IP addresses of the Node
func GetRecordType ¶
GetRecordType determines if the IP string is in the form of IPv4 or IPv6 and returns the record type
func SetHostnameNamecheap ¶
func SetHostnameNamecheap(hostRecord namecheap.DomainDNSHost) (bool, string)
SetHostnameNamecheap generates token to be used on adding a node onto the cluster
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the implementation to set up multitenancy.
func NewManager ¶
func NewManager(kubeclientset kubernetes.Interface) *Manager
NewManager returns a new multitenancy manager
func (*Manager) CreateJoinToken ¶
CreateJoinToken generates token to be used on adding a node onto the cluster
func (*Manager) GetGeolocationByIP ¶
func (m *Manager) GetGeolocationByIP( maxmindURL string, maxmindAccountID string, maxmindLicenseKey string, hostname string, address string, ) bool
GetGeolocationByIP returns geolabels from the MaxMind GeoIP2 precision service
func (*Manager) SetNodeScheduling ¶
SetNodeScheduling syncs the node with the node contribution
func (*Manager) SetOwnerReferences ¶
func (m *Manager) SetOwnerReferences(hostname string, ownerReferences []metav1.OwnerReference) error
SetOwnerReferences make the references owner of the node