ateclient

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIServiceEnv           = "ATE_API_SERVICE_NAME"
	ClientServiceAccountEnv = "ATE_CLIENT_SERVICE_ACCOUNT"
)

APIServiceEnv and ClientServiceAccountEnv override the ateapi Service and the ServiceAccount the client mints its token from. A deployment that prefixes resource names changes both, and the client has no way to discover that from outside the cluster.

View Source
const NamespaceEnv = "ATE_NAMESPACE"

NamespaceEnv overrides the namespace the client looks for substrate in. The client runs outside the cluster, so it has no downward API to read and no pod namespace to fall back on.

Variables

This section is empty.

Functions

func LoadKubeConfig

func LoadKubeConfig(kubeconfigPath, k8sContext string) (*rest.Config, error)

LoadKubeConfig loads a Kubernetes client configuration from the specified kubeconfig path and context.

func NewMetricsClientset

func NewMetricsClientset(kubeconfigPath, k8sContext string) (*metricsv1beta1.Clientset, error)

NewMetricsClientset creates a new Kubernetes Metrics Clientset using the provided kubeconfig path and context.

Types

type Client

type Client struct {
	ateapipb.ControlClient
	// contains filtered or unexported fields
}

Client wraps the gRPC ControlClient and ensures the port-forward connection is closed when done.

func NewClient

func NewClient(ctx context.Context, kubeconfigPath, k8sContext, endpoint, tokenFile string, traceEnabled bool) (*Client, error)

NewClient creates a new Ate API client. If endpoint is empty, it automatically port-forwards to the ate-api-server pod in substrate's system namespace.

func (*Client) Close

func (c *Client) Close()

Jump to

Keyboard shortcuts

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