cluster

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseResources

func ParseResources(data []byte) ([]*unstructured.Unstructured, error)

ParseResources parses YAML bytes into a slice of Unstructured objects.

Types

type Client

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

Client wraps the dynamic client and REST mapper for interacting with the cluster.

func NewClient

func NewClient(kubeContext string) (*Client, error)

NewClient creates a new Client using the default kubeconfig loading rules.

func (*Client) GetResource

func (c *Client) GetResource(apiVersion, kind, name, namespace string) (*unstructured.Unstructured, error)

GetResource fetches a resource from the cluster given its GVK, name, and namespace. If namespace is empty, it uses the client's default namespace (from context).

func (*Client) ServerSideApplyDryRun

func (c *Client) ServerSideApplyDryRun(local *unstructured.Unstructured) (*unstructured.Unstructured, error)

ServerSideApplyDryRun performs a server-side apply in dry-run mode to calculate the "future state" of the resource.

Jump to

Keyboard shortcuts

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