k8s

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 14 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 {
	// contains filtered or unexported fields
}

A client to get resources and namespaces from a Kubernetes cluster

func NewClient

func NewClient(dynamicClient dynamic.Interface, clientset kubernetes.Interface, kubewardenNamespace string, skippedNs []string) (*Client, error)

NewClient returns a new client

func (*Client) GetAuditedNamespaces

func (f *Client) GetAuditedNamespaces(ctx context.Context) (*corev1.NamespaceList, error)

GetAuditedNamespaces gets all namespaces besides the ones in skippedNs

func (*Client) GetNamespace

func (f *Client) GetNamespace(ctx context.Context, nsName string) (*corev1.Namespace, error)

func (*Client) GetResources

func (f *Client) GetResources(gvr schema.GroupVersionResource, nsName string) (*pager.ListPager, error)

Jump to

Keyboard shortcuts

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