Documentation
¶
Overview ¶
Package cluster provides functions to access, check and inspect Talos clusters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APICrashDumper ¶
type APICrashDumper struct { ClientProvider Info }
APICrashDumper collects crash dump via Talos API.
type ClientProvider ¶
type ClientProvider interface { // Client returns Talos client instance for default (if no endpoints are given) or // specific endpoint. Client(endpoints ...string) (*client.Client, error) // Close client connections. Close() error }
ClientProvider builds Talos client by endpoint.
Client instance should be cached and closed when Close() is called.
type ConfigClientProvider ¶
type ConfigClientProvider struct { // DefaultClient to be used when using default endpoints. // // Not required, if missing client will be constructed from the config. DefaultClient *client.Client // TalosConfig is a client Talos configuration. TalosConfig *config.Config // contains filtered or unexported fields }
ConfigClientProvider builds Talos client from client config.
func (*ConfigClientProvider) Client ¶
func (c *ConfigClientProvider) Client(endpoints ...string) (*client.Client, error)
Client returns Talos client instance for default (if no endpoints are given) or specific endpoints.
Client implements ClientProvider interface.
func (*ConfigClientProvider) Close ¶
func (c *ConfigClientProvider) Close() error
Close all the client connections.
type CrashDumper ¶
CrashDumper captures Talos cluster state to the specified writer for debugging.
type Info ¶
type Info interface { // Nodes returns list of all node endpoints (IPs). Nodes() []string // NodesByType return list of node endpoints by type. NodesByType(runtime.MachineType) []string }
Info describes the Talos cluster.
type K8sProvider ¶
type K8sProvider interface {
K8sClient(ctx context.Context) (*kubernetes.Clientset, error)
}
K8sProvider builds Kubernetes client to access Talos cluster.
type KubernetesClient ¶
type KubernetesClient struct { // Base Talos client provider. ClientProvider // ForceEndpoint overrides default Kubernetes API endpoint. ForceEndpoint string // contains filtered or unexported fields }
KubernetesClient provides Kubernetes client built via Talos API Kubeconfig.
func (*KubernetesClient) K8sClient ¶
func (k *KubernetesClient) K8sClient(ctx context.Context) (*kubernetes.Clientset, error)
K8sClient builds Kubernetes client via Talos Kubeconfig API.
Kubernetes client instance is cached.