Documentation ¶
Index ¶
- func Save(ctx context.Context, config *config.Control, etcdConfig endpoint.ETCDConfig, ...) error
- type Cluster
- func (c *Cluster) Bootstrap(ctx context.Context, snapshot bool) error
- func (c *Cluster) ReconcileBootstrapData(ctx context.Context, buf io.ReadSeeker, crb *config.ControlRuntimeBootstrap, ...) error
- func (c *Cluster) Snapshot(ctx context.Context, config *config.Control) error
- func (c *Cluster) Start(ctx context.Context) (<-chan struct{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Save ¶ added in v1.21.9
func Save(ctx context.Context, config *config.Control, etcdConfig endpoint.ETCDConfig, override bool) error
Save writes the current ControlRuntimeBootstrap data to the datastore. This contains a complete snapshot of the cluster's CA certs and keys, encryption passphrases, etc - encrypted with the join token. This is used when bootstrapping a cluster from a managed database or external etcd cluster. This is NOT used with embedded etcd, which bootstraps over HTTP.
Types ¶
type Cluster ¶
type Cluster struct { EtcdConfig endpoint.ETCDConfig // contains filtered or unexported fields }
func (*Cluster) Bootstrap ¶ added in v1.21.9
Bootstrap attempts to load a managed database driver, if one has been initialized or should be created/joined. It then checks to see if the cluster needs to load bootstrap data, and if so, loads data into the ControlRuntimeBoostrap struct, either via HTTP or from the datastore.
func (*Cluster) ReconcileBootstrapData ¶ added in v1.21.9
func (c *Cluster) ReconcileBootstrapData(ctx context.Context, buf io.ReadSeeker, crb *config.ControlRuntimeBootstrap, isHTTP bool, ec *endpoint.ETCDConfig) error
ReconcileBootstrapData is called before any data is saved to the datastore or locally. It checks to see if the contents of the bootstrap data in the datastore is newer than on disk or different and depending on where the difference is. If the datastore is newer, then the data will be written to disk. If the data on disk is newer, k3s will exit with an error.
func (*Cluster) Snapshot ¶ added in v1.21.9
Snapshot is a proxy method to call the snapshot method on the managedb interface for etcd clusters.