resource

package
v0.5.1-0...-faa3f61 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kubernetes

type Kubernetes struct {
	runtime.TypeMeta
	metav1.ObjectMeta `json:"metadata"`
}

Kubernetes is a parent object used to generalize all k8s types

func FetchKubernetesResources

func FetchKubernetesResources(ctx context.Context, k *k8s.KubernetesAPI, options metav1.ListOptions) ([]Kubernetes, error)

FetchKubernetesResources returns a slice of all cluster scoped kubernetes resources which match the given ListOptions.

func FetchPrunableResources

func FetchPrunableResources(ctx context.Context, k *k8s.KubernetesAPI, namespace string, options metav1.ListOptions) ([]Kubernetes, error)

func New

func New(apiVersion, kind, name string) Kubernetes

New returns a kubernetes resource with the given data

func NewNamespaced

func NewNamespaced(apiVersion, kind, name, namespace string) Kubernetes

NewNamespaced returns a namespace scoped kubernetes resource with the given data

func (Kubernetes) RenderResource

func (r Kubernetes) RenderResource(w io.Writer) error

RenderResource renders a kubernetes object as a yaml object

func (Kubernetes) RenderResourceJSON

func (r Kubernetes) RenderResourceJSON(w io.Writer) error

RenderResource renders a kubernetes object as a json object

Jump to

Keyboard shortcuts

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