Documentation
¶
Index ¶
- type Client
- func (c *Client) ApplyManifest(ctx context.Context, url string) error
- func (c *Client) ApplyManifestBytes(ctx context.Context, data []byte) error
- func (c *Client) ApplyManifestFromFile(ctx context.Context, filePath string) error
- func (c *Client) ApplyManifestsFromDirectory(ctx context.Context, dirPath string) error
- func (c *Client) GetClientset() kubernetes.Interface
- func (c *Client) GetConfig() *rest.Config
- func (c *Client) WaitForAPI(ctx context.Context) error
- func (c *Client) WaitForNodes(ctx context.Context, count int, timeout time.Duration) error
- func (c *Client) WaitForPod(ctx context.Context, namespace, podName string, timeout time.Duration) error
- func (c *Client) WaitForRollout(ctx context.Context, namespace, deployment string, timeout time.Duration) error
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 wraps Kubernetes client-go for type-safe operations
func NewClient ¶
NewClient creates a new Kubernetes client If kubeconfigPath is empty, it tries standard locations: 1. ~/.kube/config 2. /etc/rancher/k3s/k3s.yaml (k3s default)
func NewClientFromConfig ¶
NewClientFromConfig creates a client from rest.Config
func (*Client) ApplyManifest ¶
ApplyManifest applies a manifest from URL using server-side apply
func (*Client) ApplyManifestBytes ¶
ApplyManifestBytes applies a YAML/JSON manifest already in memory.
func (*Client) ApplyManifestFromFile ¶
ApplyManifestFromFile applies a manifest from a local file
func (*Client) ApplyManifestsFromDirectory ¶
ApplyManifestsFromDirectory applies all YAML files from a directory
func (*Client) GetClientset ¶
func (c *Client) GetClientset() kubernetes.Interface
GetClientset returns the underlying Kubernetes clientset
func (*Client) WaitForAPI ¶
WaitForAPI waits for Kubernetes API to be ready
func (*Client) WaitForNodes ¶
WaitForNodes waits for nodes to be ready