Documentation ¶
Overview ¶
Package k8sclient contains operations of k8s client, and operations of k8s crd defined by ote.
Index ¶
- func NewClient(kubeConfig string) (oteclient.Interface, error)
- func NewK8sClient(k8sOption K8sOption) (kubernetes.Interface, error)
- type ClusterCRD
- func (c *ClusterCRD) Create(cluster *otev1.Cluster)
- func (c *ClusterCRD) Delete(cluster *otev1.Cluster)
- func (c *ClusterCRD) Get(namespace, name string) *otev1.Cluster
- func (c *ClusterCRD) PatchStatus(newcluster *otev1.Cluster) error
- func (c *ClusterCRD) Update(cluster *otev1.Cluster)
- func (c *ClusterCRD) UpdateStatus(newcluster *otev1.Cluster) error
- type ClusterControllerCRD
- type K8sOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
func (c *ClusterControllerCRD) Update(cc *otev1.ClusterController)
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.
Click to show internal directories.
Click to hide internal directories.