client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 14 Imported by: 20

Documentation

Overview

Package client is the package that generate K8S kubeConfig and clientSet; and any new CRD and its corresponding clientSet should be added here. besides, this package is the only package that update/patch actions should happen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildKubeConfig

func BuildKubeConfig(masterURL, kubeConfig string) (*rest.Config, error)

BuildKubeConfig returns KubeConfig for given master and KubeConfig raw string

Types

type GenericClientSet

type GenericClientSet struct {
	MetaClient      metadata.Interface
	KubeClient      kubernetes.Interface
	InternalClient  clientset.Interface
	DynamicClient   dynamic.Interface
	DiscoveryClient discovery.DiscoveryInterface

	CustomClient   customclient.CustomMetricsClient
	ExternalClient externalclient.ExternalMetricsClient
	// contains filtered or unexported fields
}

GenericClientSet defines a generic client contains clients that are needed

func NewGenericClientWithName

func NewGenericClientWithName(name string, cfg *rest.Config) *GenericClientSet

NewGenericClientWithName returns clientSet with given name as user-agent.

func (*GenericClientSet) BuildMetricClient

func (g *GenericClientSet) BuildMetricClient(mapper *dynamicmapper.RegeneratingDiscoveryRESTMapper)

Directories

Path Synopsis
Package control is the package to perform the real update actions for K8S objects through APIServer; all clientSet actions should be arranged here to provide a unified behavior for dry-run and testing.
Package control is the package to perform the real update actions for K8S objects through APIServer; all clientSet actions should be arranged here to provide a unified behavior for dry-run and testing.

Jump to

Keyboard shortcuts

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