k8sclient

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package k8sclient contains operations of k8s client, and operations of k8s crd defined by ote.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(kubeConfig string) (oteclient.Interface, error)

NewClient new a k8s client by k8s config file.

func NewK8sClient

func NewK8sClient(k8sOption K8sOption) (kubernetes.Interface, error)

Types

type ClusterCRD

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

ClusterCRD manipulates Cluster crd.

func NewClusterCRD

func NewClusterCRD(client oteclient.Interface) *ClusterCRD

NewClusterCRD new a ClusterCRD with k8s client.

func (*ClusterCRD) Create

func (c *ClusterCRD) Create(cluster *otev1.Cluster)

Create create a Cluster.

func (*ClusterCRD) Delete

func (c *ClusterCRD) Delete(cluster *otev1.Cluster)

Delete delete a Cluster.

func (*ClusterCRD) Get

func (c *ClusterCRD) Get(namespace, name string) *otev1.Cluster

Get get a Cluster by namespace and name.

func (*ClusterCRD) PatchStatus

func (c *ClusterCRD) PatchStatus(newcluster *otev1.Cluster) error

PatchStatus patches status of an existing cluster.

func (*ClusterCRD) Update

func (c *ClusterCRD) Update(cluster *otev1.Cluster)

Update updates a Cluster.

func (*ClusterCRD) UpdateStatus

func (c *ClusterCRD) UpdateStatus(newcluster *otev1.Cluster) error

UpdateStatus updates cluster status.

type ClusterControllerCRD

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

ClusterControllerCRD manipulates ClusterController crd.

func NewClusterControllerCRD

func NewClusterControllerCRD(client oteclient.Interface) *ClusterControllerCRD

NewClusterControllerCRD new a ClusterControllerCRD with k8s client.

func (*ClusterControllerCRD) Get

func (c *ClusterControllerCRD) Get(namespace, name string) *otev1.ClusterController

Get get a ClusterController by namespace and name.

func (*ClusterControllerCRD) Update

Update update a ClusterControllers.

type K8sOption

type K8sOption struct {
	// KubeConfig is k8s's config parameter.
	KubeConfig string
	// Burst is the number of request sent to kube-apiserver per second.
	Burst int
	// Qps indicates the maximum qps to the kube-apiserver from this client.
	Qps float32
}

K8sOption uses for creating a k8s client.

Directories

Path Synopsis
Package fake mocks clientset for ote.
Package fake mocks clientset for ote.

Jump to

Keyboard shortcuts

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