k8s

package
v0.0.0-...-16e85e8 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	k8s.Client
	Host string
}

Client is a k8s client.

func NewClient

func NewClient(kubeConfig []byte) (client *Client, err error)

NewClient builds new k8s client.

func (*Client) GetResourceURI

func (r *Client) GetResourceURI(group, version, kind, namespace, name string) (u uri.URI, err error)

GetResourceURI for a given GVK, namespace, and name.

type UnstructuredResources

type UnstructuredResources struct {
	NamespacedLists map[string][]unstructured.UnstructuredList `json:"namespaces"`
	// contains filtered or unexported fields
}

UnstructuredResources is a namespace-separated cache of unstructured k8s resources.

func NewUnstructuredResources

func NewUnstructuredResources(client k8s.Client) (ur *UnstructuredResources)

func (*UnstructuredResources) Gather

func (r *UnstructuredResources) Gather(namespace string, gvks []schema.GroupVersionKind) (err error)

Gather unstructured resources that match the provided GVK and namespace.

Jump to

Keyboard shortcuts

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