Documentation ¶
Index ¶
Constants ¶
const ( UserAgentName = "Cluster-Controller" // Following labels come from k8s.io/kubernetes/pkg/kubelet/apis LabelZoneFailureDomain = "failure-domain.beta.kubernetes.io/zone" LabelZoneRegion = "failure-domain.beta.kubernetes.io/region" // Common ClusterConditions for KubeFedClusterStatus ClusterReady = "ClusterReady" HealthzOk = "/healthz responded with ok" ClusterNotReady = "ClusterNotReady" HealthzNotOk = "/healthz responded without ok" ClusterNotReachableReason = "ClusterNotReachable" ClusterNotReachableMsg = "cluster is not reachable" ClusterReachableReason = "ClusterReachable" ClusterReachableMsg = "cluster is reachable" ClusterConfigMalformedReason = "ClusterConfigMalformed" ClusterConfigMalformedMsg = "cluster's configuration may be malformed" )
Variables ¶
This section is empty.
Functions ¶
func StartClusterController ¶
func StartClusterController(config *util.ControllerConfig, clusterHealthCheckConfig *util.ClusterHealthCheckConfig, stopChan <-chan struct{}) error
StartClusterController starts a new cluster controller.
Types ¶
type ClusterClient ¶
type ClusterClient struct {
// contains filtered or unexported fields
}
ClusterClient provides methods for determining the status and zones of a particular KubeFedCluster.
func NewClusterClientSet ¶
func NewClusterClientSet(c *fedv1b1.KubeFedCluster, client generic.Client, fedNamespace string, timeout time.Duration) (*ClusterClient, error)
NewClusterClientSet returns a ClusterClient for the given KubeFedCluster. The kubeClient is used to configure the ClusterClient's internal client with information from a kubeconfig stored in a kubernetes secret.
func (*ClusterClient) GetClusterStatus ¶ added in v0.9.2
func (c *ClusterClient) GetClusterStatus() (*fedv1b1.KubeFedClusterStatus, error)
GetClusterStatus gets the kubernetes cluster's health and version status
func (*ClusterClient) GetClusterZones ¶
func (c *ClusterClient) GetClusterZones() ([]string, string, error)
GetClusterZones gets the kubernetes cluster zones and region by inspecting labels on nodes in the cluster.
type ClusterController ¶
type ClusterController struct {
// contains filtered or unexported fields
}
ClusterController is responsible for maintaining the health status of each KubeFedCluster in a particular namespace.
func (*ClusterController) RecordError ¶
func (cc *ClusterController) RecordError(cluster runtimeclient.Object, errorCode string, err error)
func (*ClusterController) Run ¶
func (cc *ClusterController) Run(stopChan <-chan struct{})
Run begins watching and syncing.
type ClusterData ¶
type ClusterData struct {
// contains filtered or unexported fields
}
ClusterData stores cluster client and previous health check probe results of individual cluster.