Documentation ¶
Overview ¶
Package provision provides abstract definitions for Talos cluster provisioners.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster interface { TalosConfig() *config.Config Info() ClusterInfo }
Cluster describes the provisioned Cluster.
type ClusterAccess ¶
type ClusterAccess interface { Cluster // Client returns default Talos client. Client(endpoints ...string) (*client.Client, error) // K8sClient returns Kubernetes client. K8sClient(context.Context) (*kubernetes.Clientset, error) // Close shuts down all the clients. Close() error }
ClusterAccess extends Cluster interface to provide clients to the cluster.
type ClusterInfo ¶
type ClusterInfo struct { ClusterName string Network NetworkInfo Nodes []NodeInfo }
ClusterInfo describes the cluster.
type ClusterNameReflector ¶
type ClusterNameReflector interface {
Reflect(ctx context.Context, clusterName string) (Cluster, error)
}
ClusterNameReflector rebuilds Cluster information by cluster name.
type ClusterRequest ¶
type ClusterRequest struct { Name string Network NetworkRequest Nodes NodeRequests Image string KubernetesVersion string }
ClusterRequest is the root object describing cluster to be provisioned.
type NetworkInfo ¶
NetworkInfo describes cluster network.
type NetworkRequest ¶
NetworkRequest describe cluster network.
type NodeRequest ¶
type NodeRequest struct { Type generate.Type Name string IP net.IP // Share of CPUs, in 1e-9 fractions NanoCPUs int64 // Memory limit in bytes Memory int64 }
NodeRequest describes a request for a node.
type NodeRequests ¶
type NodeRequests []NodeRequest
NodeRequests is a list of NodeRequest.
func (NodeRequests) FindInitNode ¶
func (reqs NodeRequests) FindInitNode() (req NodeRequest, err error)
FindInitNode looks up init node, it returns an error if no init node is present or if it's duplicate.
func (NodeRequests) MasterNodes ¶
func (reqs NodeRequests) MasterNodes() (nodes []NodeRequest)
MasterNodes returns subset of nodes which are Init/ControlPlane type.
func (NodeRequests) WorkerNodes ¶
func (reqs NodeRequests) WorkerNodes() (nodes []NodeRequest)
WorkerNodes returns subset of nodes which are Init/ControlPlane type.
type Option ¶
Option controls Provisioner.
func WithEndpoint ¶
WithEndpoint specifies endpoint to use when acessing Talos cluster.
func WithForceInitNodeAsEndpoint ¶
func WithForceInitNodeAsEndpoint() Option
WithForceInitNodeAsEndpoint uses direct IP of init node as endpoint instead of (default) mode.
Directories ¶
Path | Synopsis |
---|---|
Package access provides methods to access provisioned Talos cluster.
|
Package access provides methods to access provisioned Talos cluster. |
Package check provides set of checks to verify cluster readiness.
|
Package check provides set of checks to verify cluster readiness. |
providers
|
|
docker
Package docker implements Provisioner via docker.
|
Package docker implements Provisioner via docker. |