client

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 16 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

This section is empty.

Types

type GenericClientSet

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

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

GenericClientSet defines a generic client contains clients that are needed

func BuildGenericClient added in v0.2.0

func BuildGenericClient(config componentbaseconfig.ClientConnectionConfiguration, masterURL, kubeConfig, name string) (*GenericClientSet, error)

BuildGenericClient returns KubeConfig for given master and KubeConfig raw string

func (*GenericClientSet) BuildMetricClient

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

BuildMetricClient builds kubernetes native metrics-clients; and metrics-clients can't be build in init process, since discovery mapper will be initialized at the same time, which is usually not needed for agents (to avoid too many connections).

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