management

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package management provides client for Omni management API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for Management API .

func NewClient

func NewClient(conn *grpc.ClientConn) *Client

NewClient builds a client out of gRPC connection.

func (*Client) CreateServiceAccount

func (client *Client) CreateServiceAccount(ctx context.Context, armoredPGPPublicKey string, role string, useUserRole bool) (string, error)

CreateServiceAccount creates a service account and returns the public key ID.

func (*Client) DestroyServiceAccount

func (client *Client) DestroyServiceAccount(ctx context.Context, name string) error

DestroyServiceAccount deletes a service account.

func (*Client) ListServiceAccounts

func (client *Client) ListServiceAccounts(ctx context.Context) ([]*management.ListServiceAccountsResponse_ServiceAccount, error)

ListServiceAccounts lists service accounts.

func (*Client) LogsReader

func (client *Client) LogsReader(ctx context.Context, machineID string, follow bool, tailLines int32) (io.Reader, error)

LogsReader returns the io.Reader for the logs with each message separated by '\n'.

func (*Client) Omniconfig

func (client *Client) Omniconfig(ctx context.Context) ([]byte, error)

Omniconfig retrieves Omni configuration for the clients.

func (*Client) RenewServiceAccount

func (client *Client) RenewServiceAccount(ctx context.Context, name, armoredPGPPublicKey string) (string, error)

RenewServiceAccount renews a service account and returns the public key ID.

func (*Client) Talosconfig

func (client *Client) Talosconfig(ctx context.Context, opts ...TalosconfigOption) ([]byte, error)

Talosconfig retrieves Talos client configuration for the whole instance.

func (*Client) WithCluster

func (client *Client) WithCluster(clusterName string) *ClusterClient

WithCluster sets the cluster name context.

type ClusterClient

type ClusterClient struct {
	// contains filtered or unexported fields
}

ClusterClient is a client for a specific cluster.

func (*ClusterClient) Kubeconfig

func (client *ClusterClient) Kubeconfig(ctx context.Context, opts ...KubeconfigOption) ([]byte, error)

Kubeconfig retrieves Kubernetes client configuration for the cluster.

func (*ClusterClient) KubernetesSyncManifests

func (client *ClusterClient) KubernetesSyncManifests(ctx context.Context, dryRun bool, handler KubernetesSyncManifestHandler) error

KubernetesSyncManifests syncs the bootstrap Kubernetes manifests.

func (*ClusterClient) KubernetesUpgradePreChecks

func (client *ClusterClient) KubernetesUpgradePreChecks(ctx context.Context, newVersion string) error

KubernetesUpgradePreChecks runs the pre-checks for an upgrade.

func (*ClusterClient) Talosconfig

func (client *ClusterClient) Talosconfig(ctx context.Context, opts ...TalosconfigOption) ([]byte, error)

Talosconfig retrieves Talos client configuration for the cluster.

type KubeconfigOption

type KubeconfigOption func(request *management.KubeconfigRequest)

KubeconfigOption is a functional option for Kubeconfig.

func WithServiceAccount

func WithServiceAccount(ttl time.Duration, user string, groups ...string) KubeconfigOption

WithServiceAccount sets whether the Kubeconfig request should return a user or service account type kubeconfig.

type KubernetesSyncManifestHandler

type KubernetesSyncManifestHandler func(*management.KubernetesSyncManifestResponse) error

KubernetesSyncManifestHandler is called for each sync event.

type LogReader

type LogReader struct {
	// contains filtered or unexported fields
}

LogReader is a log client reader which implements io.Reader.

func (*LogReader) Read

func (l *LogReader) Read(p []byte) (int, error)

Read reads from the log stream.

type TalosconfigOption

type TalosconfigOption func(*management.TalosconfigRequest)

TalosconfigOption is a functional option for Talosconfig.

func WithAdminTalosconfig

func WithAdminTalosconfig(adminConfig bool) TalosconfigOption

WithAdminTalosconfig sets whether the Talosconfig request should return an admin Talosconfig.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL