Documentation ¶
Overview ¶
Package management provides client for Omni management API.
Index ¶
- type Client
- func (client *Client) CreateSchematic(ctx context.Context, req *management.CreateSchematicRequest) (*management.CreateSchematicResponse, error)
- func (client *Client) CreateServiceAccount(ctx context.Context, name, armoredPGPPublicKey, role string, useUserRole bool) (string, error)
- func (client *Client) DestroyServiceAccount(ctx context.Context, name string) error
- func (client *Client) GetSupportBundle(ctx context.Context, cluster string, ...) ([]byte, error)
- func (client *Client) ListServiceAccounts(ctx context.Context) ([]*management.ListServiceAccountsResponse_ServiceAccount, error)
- func (client *Client) LogsReader(ctx context.Context, machineID string, follow bool, tailLines int32) (io.Reader, error)
- func (client *Client) Omniconfig(ctx context.Context) ([]byte, error)
- func (client *Client) RenewServiceAccount(ctx context.Context, name, armoredPGPPublicKey string) (string, error)
- func (client *Client) Talosconfig(ctx context.Context, opts ...TalosconfigOption) ([]byte, error)
- func (client *Client) WithCluster(clusterName string) *ClusterClient
- type ClusterClient
- func (client *ClusterClient) Kubeconfig(ctx context.Context, opts ...KubeconfigOption) ([]byte, error)
- func (client *ClusterClient) KubernetesSyncManifests(ctx context.Context, dryRun bool, handler KubernetesSyncManifestHandler) error
- func (client *ClusterClient) KubernetesUpgradePreChecks(ctx context.Context, newVersion string) error
- func (client *ClusterClient) Talosconfig(ctx context.Context, opts ...TalosconfigOption) ([]byte, error)
- type KubeconfigOption
- type KubernetesSyncManifestHandler
- type LogReader
- type TalosconfigOption
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 ¶
func (client *Client) CreateSchematic(ctx context.Context, req *management.CreateSchematicRequest) (*management.CreateSchematicResponse, error)
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 ¶
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 ¶
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 ¶
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.
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.