apiserver

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIServerProvider

func NewAPIServerProvider() (provider.Provider, error)

func NewAPIServerProviderWithConfig

func NewAPIServerProviderWithConfig(kubeConfig clientcmd.ClientConfig) (provider.Provider, error)

Add this method to create a provider with a specific kubeconfig

func NewAPIServerProviderWithOptions

func NewAPIServerProviderWithOptions(config *APIServerProviderConfig) (provider.Provider, error)

Types

type APIServerProvider

type APIServerProvider struct {
	// contains filtered or unexported fields
}

func (*APIServerProvider) CreateK8sResource

func (p *APIServerProvider) CreateK8sResource(kind, name, namespace string, body interface{}) error

func (*APIServerProvider) CreateProviderForContext

func (p *APIServerProvider) CreateProviderForContext(context string) (provider.Provider, error)

Add this method to implement the Provider interface

func (*APIServerProvider) DeleteK8sResources

func (p *APIServerProvider) DeleteK8sResources(kind, name, namespace string) error

Implement other Provider interface methods...

func (*APIServerProvider) FindGVR

Move the FindGVR implementation from k8s_client.go here

func (*APIServerProvider) GetClientset

func (p *APIServerProvider) GetClientset() (kubernetes.Interface, error)

func (*APIServerProvider) GetDiscoveryClient

func (p *APIServerProvider) GetDiscoveryClient() (discovery.DiscoveryInterface, error)

func (*APIServerProvider) GetDynamicClient

func (p *APIServerProvider) GetDynamicClient() (dynamic.Interface, error)

func (*APIServerProvider) GetGVRCacheSnapshot

func (p *APIServerProvider) GetGVRCacheSnapshot() map[string]schema.GroupVersionResource

Add this method to APIServerProvider

func (*APIServerProvider) GetGVRList

func (p *APIServerProvider) GetGVRList() (map[string]schema.GroupVersionResource, error)

func (*APIServerProvider) GetK8sResources

func (p *APIServerProvider) GetK8sResources(kind, fieldSelector, labelSelector, namespace string) (interface{}, error)

Implement Provider interface methods...

func (*APIServerProvider) GetOpenAPIResourceSpecs

func (p *APIServerProvider) GetOpenAPIResourceSpecs() (map[string][]string, error)

func (*APIServerProvider) PatchK8sResource

func (p *APIServerProvider) PatchK8sResource(kind, name, namespace string, body interface{}) error

type APIServerProviderConfig

type APIServerProviderConfig struct {
	Clientset     kubernetes.Interface
	DynamicClient dynamic.Interface
	DryRun        bool
}

type GroupVersion

type GroupVersion interface {
	Schema(contentType string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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