k8s

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnnotationsMergePatch added in v0.1.2

func AnnotationsMergePatch(annotations map[string]any) ([]byte, error)

AnnotationsMergePatch builds a merge patch for annotation updates.

func DecodeUnstructured added in v0.1.1

func DecodeUnstructured[T any](u *unstructured.Unstructured) (*T, error)

DecodeUnstructured converts an unstructured Kubernetes object into a typed value.

func LoadConfig

func LoadConfig() (*rest.Config, error)

LoadConfig returns a Kubernetes client config picked from the first matching source — there is no fallback if a chosen source errors:

  1. $KUBECONFIG, if set (returns whatever BuildConfigFromFlags reports, including errors when the path is missing or malformed).
  2. ~/.kube/config, if it exists.
  3. in-cluster service account config.

func StatusMergePatch added in v0.1.1

func StatusMergePatch(status any) ([]byte, error)

StatusMergePatch builds a merge patch for a status subresource update.

Types

This section is empty.

Jump to

Keyboard shortcuts

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