Documentation ¶
Index ¶
- Constants
- func GetClusterPods(client *clientset.Clientset) (allocatablePods int64, capacityPods int64, err error)
- type ClusterClient
- type ClusterController
- func (cc *ClusterController) GetCluster(clusterName string) (*v1beta1.Cluster, error)
- func (cc *ClusterController) GetClusterClient(cluster *v1beta1.Cluster) (*ClusterClient, error)
- func (cc *ClusterController) GetClusterDeployment(cluster *v1beta1.Cluster, namespace string, name string) (*extensions.Deployment, error)
- func (cc *ClusterController) GetReadyClusters() ([]*v1beta1.Cluster, error)
- func (cc *ClusterController) GetUnreadyClusters() ([]*v1beta1.Cluster, error)
- func (cc *ClusterController) IsCapacityDataPresent(cluster *v1beta1.Cluster) bool
- func (cc *ClusterController) IsClusterScaling(cluster *v1beta1.Cluster) bool
- func (cc *ClusterController) IsSynced() bool
- func (cc *ClusterController) Run(stopChan <-chan struct{})
- func (cc *ClusterController) UpdateCluster(cluster *v1beta1.Cluster) error
- func (cc *ClusterController) UpdateClusterStatus() error
- type ReconcileOnClusterChange
Constants ¶
const (
//user agent for client
UserAgentName = "Navarkos-Cluster-Controller"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClusterClient ¶
type ClusterClient struct {
// contains filtered or unexported fields
}
ClusterClient holds cluster specific clients
func NewClusterClientSet ¶
func NewClusterClientSet(c *federation_v1beta1.Cluster) (*ClusterClient, error)
NewClusterClientSet initializes ClusterClient based on provided or default values
func (*ClusterClient) GetClusterHealthStatus ¶
func (self *ClusterClient) GetClusterHealthStatus() *federation_v1beta1.ClusterStatus
GetClusterHealthStatus retrieves and return current health state of given cluster
func (*ClusterClient) GetClusterPods ¶
func (self *ClusterClient) GetClusterPods() (allocatablePods int64, capacityPods int64, err error)
GetClusterPods gets the number of pods in a given kubernetes cluster.
func (*ClusterClient) GetClusterZones ¶
func (self *ClusterClient) GetClusterZones() (zones []string, region string, err error)
GetClusterZones gets the kubernetes cluster zones and region by inspecting labels on nodes in the cluster.
type ClusterController ¶
type ClusterController struct { //call back to dpmt controller reconcile OnClusterChange ReconcileOnClusterChange // contains filtered or unexported fields }
ClusterController provides for management of cluster
func StartClusterController ¶
func StartClusterController(config *restclient.Config, stopChan <-chan struct{}, clusterMonitorPeriod time.Duration) *ClusterController
StartClusterController starts a new cluster controller
func (*ClusterController) GetCluster ¶
func (cc *ClusterController) GetCluster(clusterName string) (*v1beta1.Cluster, error)
GetCluster retrieves the cluster from federation store
func (*ClusterController) GetClusterClient ¶
func (cc *ClusterController) GetClusterClient(cluster *v1beta1.Cluster) (*ClusterClient, error)
GetClusterClient retrieves the client for given cluster based on config
func (*ClusterController) GetClusterDeployment ¶
func (cc *ClusterController) GetClusterDeployment(cluster *v1beta1.Cluster, namespace string, name string) (*extensions.Deployment, error)
GetClusterDeployment looks for specified deployment in given cluster
func (*ClusterController) GetReadyClusters ¶
func (cc *ClusterController) GetReadyClusters() ([]*v1beta1.Cluster, error)
GetReadyClusters returns all clusters for which the sub-informers are run.
func (*ClusterController) GetUnreadyClusters ¶
func (cc *ClusterController) GetUnreadyClusters() ([]*v1beta1.Cluster, error)
GetUnreadyClusters returns all clusters for which the sub-informers are not run.
func (*ClusterController) IsCapacityDataPresent ¶
func (cc *ClusterController) IsCapacityDataPresent(cluster *v1beta1.Cluster) bool
IsCapacityDataPresent retrieves the capacity info from cluster annotations
func (*ClusterController) IsClusterScaling ¶
func (cc *ClusterController) IsClusterScaling(cluster *v1beta1.Cluster) bool
IsClusterScaling confirm scalability based on cluster annotations
func (*ClusterController) IsSynced ¶
func (cc *ClusterController) IsSynced() bool
IsSynced returns if clusterController HasSynced or not
func (*ClusterController) Run ¶
func (cc *ClusterController) Run(stopChan <-chan struct{})
Run begins watching and syncing.
func (*ClusterController) UpdateCluster ¶
func (cc *ClusterController) UpdateCluster(cluster *v1beta1.Cluster) error
UpdateCluster updates the cluster in federation store
func (*ClusterController) UpdateClusterStatus ¶
func (cc *ClusterController) UpdateClusterStatus() error
UpdateClusterStatus checks cluster status and get the metrics from cluster's restapi
type ReconcileOnClusterChange ¶
type ReconcileOnClusterChange func()
ReconcileOnClusterChange defines callback to DeploymentController