k8sclient

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRestConfig

func GetRestConfig(clusterName string) (*rest.Config, error)

GetRestConfig get rest config with clusterName

Types

type K8sClient

type K8sClient struct {
	ClientSet *kubernetes.Clientset
	CRClient  client.Client
}

func New

func New(clusterName string) (*K8sClient, error)

New new K8sClient with clusterName.

func NewForInCluster added in v1.5.0

func NewForInCluster() (*K8sClient, error)

NewForInCluster New client for in cluster

func NewForRestConfig

func NewForRestConfig(c *rest.Config, schemes ...func(scheme *runtime.Scheme) error) (*K8sClient, error)

NewForRestConfig new K8sClient with rest.Config, you can register your custom runtime.Scheme.

func NewWithTimeOut

func NewWithTimeOut(clusterName string, timeout time.Duration) (*K8sClient, error)

NewWithTimeOut new k8sClient with timeout

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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