management

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 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) CreateSchematic

CreateSchematic using the image factory.

func (*Client) CreateServiceAccount

func (client *Client) CreateServiceAccount(ctx context.Context, name, armoredPGPPublicKey, 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) GetSupportBundle added in v0.32.0

func (client *Client) GetSupportBundle(ctx context.Context, cluster string, progress chan *management.GetSupportBundleResponse_Progress) ([]byte, error)

GetSupportBundle generates support bundle on Omni server and returns it to the client.

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 WithBreakGlassKubeconfig added in v0.38.0

func WithBreakGlassKubeconfig(value bool) KubeconfigOption

WithBreakGlassKubeconfig sets whether the Kubeconfig request should return an admin Kubeconfig.

func WithGrantType added in v0.38.0

func WithGrantType(grantType string) KubeconfigOption

WithGrantType sets --grant-type in the generated 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 WithBreakGlassTalosconfig added in v0.38.0

func WithBreakGlassTalosconfig(value bool) TalosconfigOption

WithBreakGlassTalosconfig sets whether the Talosconfig request should return an operator Talosconfig which bypasses Omni.

func WithRawTalosconfig added in v0.38.0

func WithRawTalosconfig(value bool) TalosconfigOption

WithRawTalosconfig sets whether the Talosconfig request should return a raw Talosconfig.

Jump to

Keyboard shortcuts

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