fake

package
v0.0.0-...-286b722 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddObjectToDynamicClient

func AddObjectToDynamicClient(scheme *runtime.Scheme, fc *dynfake.FakeDynamicClient, objs ...runtime.Object)

func Clients

func Clients(dir fs.FS) func(cluster string) (dynamic.Interface, watcher.Discovery, *rest.Config, error)

Clients returns a new fake kubernetes clientset for each directory at root in the given directory. Each yaml file in the directory will be created as a resource, where resources in a "teams" directory will be created in a namespace with the same name as the file.

func NewDynamicClient

func NewDynamicClient(scheme *runtime.Scheme) *dynfake.FakeDynamicClient

func ParseResource

func ParseResource(scheme *runtime.Scheme, b []byte, ns string) (v runtime.Object)

func ParseResources

func ParseResources(scheme *runtime.Scheme, dir fs.FS) (map[string][]runtime.Object, error)

Types

type DiscoveryClient

type DiscoveryClient struct{}

func (*DiscoveryClient) ServerResourcesForGroupVersion

func (d *DiscoveryClient) ServerResourcesForGroupVersion(groupVersion string) (*metav1.APIResourceList, error)

Jump to

Keyboard shortcuts

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