Documentation ¶
Index ¶
- type Core
- func (c *Core) ConnectToKubernetes() error
- func (c *Core) GetControlPlaneCertificatesAndKeys() (map[string][]byte, error)
- func (c *Core) GetJoinToken(ttl time.Duration) (*kubeadm.BootstrapTokenDiscovery, error)
- func (c *Core) IsInReadyState() bool
- func (c *Core) IsReadyForInit() bool
- func (c *Core) JoinCluster(ctx context.Context) error
- func (c *Core) SetInitialized()
- func (c *Core) SetJoiningCluster()
- func (c *Core) TryJoinCluster(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Core ¶
Core is responsible for maintaining state information of the VM-agent. Currently we do not need any state.
func (*Core) ConnectToKubernetes ¶
ConnectToKubernetes connects to the Kubernetes API server.
func (*Core) GetControlPlaneCertificatesAndKeys ¶
GetControlPlaneCertificatesAndKeys loads the Kubernetes CA certificates and keys.
func (*Core) GetJoinToken ¶
GetJoinToken creates a new bootstrap (join) token, which a node can use to join the cluster.
func (*Core) IsInReadyState ¶
IsInReadyState returns true if the Core is in a ready state.
func (*Core) IsReadyForInit ¶
IsReadyForInit returns true if the Core is in a ready state.
func (*Core) JoinCluster ¶
JoinCluster joins the Kube Cluster. TODO: Authentication checks.
func (*Core) SetInitialized ¶
func (c *Core) SetInitialized()
func (*Core) SetJoiningCluster ¶
func (c *Core) SetJoiningCluster()
SetJoiningCluster returns true if the Core is in a ready state.
func (*Core) TryJoinCluster ¶
TryJoinCluster tries to join the cluster every 5 seconds until it succeeds.