cluster

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeExternalIP corev1.NodeAddressType = "ExternalIP"
	NodeInternalIP corev1.NodeAddressType = "InternalIP"
)

Variables

This section is empty.

Functions

func GetNodeExternalIpList

func GetNodeExternalIpList() []string

func GetNodeIP

func GetNodeIP(client client.Client) (string, error)

Types

type Cluster

type Cluster struct {
	Client client.Client
	Name   string `json:"clusterName,omitempty"`
}

func (*Cluster) GetClusterInfo

func (c *Cluster) GetClusterInfo(ctx context.Context) (*ClusterInfo, error)

func (*Cluster) GetNsmExcludedPrefix

func (c *Cluster) GetNsmExcludedPrefix(ctx context.Context, configmap, namespace string) ([]string, error)

type ClusterInfo

type ClusterInfo struct {
	Name            string          `json:"clusterName,omitempty"`
	ClusterProperty ClusterProperty `json:"clusterProperty,omitempty"`
}

type ClusterInterface

type ClusterInterface interface {
	GetClusterInfo(ctx context.Context) (*ClusterInfo, error)
	GetNsmExcludedPrefix(ctx context.Context, configmap, namespace string) ([]string, error)
}

func NewCluster

func NewCluster(client client.Client, clusterName string) ClusterInterface

NewCluster returns ClusterInterface

type ClusterProperty

type ClusterProperty struct {
	//GeoLocation contains information regarding Geographical Location of the Cluster
	GeoLocation GeoLocation `json:"geoLocation,omitempty"`
}

type GeoLocation

type GeoLocation struct {
	//CloudProvider is the cloud service provider
	CloudProvider string `json:"cloudProvider,omitempty"`
	//CloudRegion is the region of the cloud
	CloudRegion string `json:"cloudRegion,omitempty"`
}

GeoLocation defines the field of ClusterSpec

type NodeInfo

type NodeInfo struct {
	Client     client.Client
	NodeIPList []string
	sync.Mutex
}

Node info structure. Protected by a mutex and contains information about the kubeslice gateway nodes in the cluster.

type NodeReconciler

type NodeReconciler struct {
	client.Client
	Log logr.Logger
}

func (*NodeReconciler) Reconcile

func (r *NodeReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile func

func (*NodeReconciler) SetupWithManager

func (r *NodeReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL