cluster

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterConfigInfo added in v0.4.0

func GetClusterConfigInfo(clusterName string) (*gf_cluster.KubernetesInfo, error)

GetClusterConfigInfo 根据集群名称获取集群配置信息

func GetClustersSummary

func GetClustersSummary(clusterId int64) (*gf_cluster.ClusterSummary, error)

GetClustersSummary 获得集群概述

func ListClusterNodeSummary

func ListClusterNodeSummary(clusterId int64) (gf_cluster.ClusterNodeSummaryArray, error)

ListClusterNodeSummary 获得集群下所有节点详情

func ListClusterPodsSummary

func ListClusterPodsSummary(clusterId int64) (gf_cluster.ClusterPodsSummaryArray, error)

ListClusterPodsSummary 获得集群下所有Pod详情

func ListClustersSummary

func ListClustersSummary(id string, name string, pageNumber int, pageSize int) ([]*gf_cluster.ClusterSummary, int, error)

ListClustersSummary 列出所有集群summary

func ListKubeSystemInstance

func ListKubeSystemInstance(info *gf_cluster.KubernetesInfo) (map[string]*PodResources, error)

ListKubeSystemInstance 列出kuber-system所占用资源

Types

type KubernetesClient

type KubernetesClient struct {
	ClientSet *kubernetes.Clientset
}

KubernetesClient 是k8s访问的client

func CreateKubernetesClusterClient

func CreateKubernetesClusterClient(data []byte) (*KubernetesClient, error)

CreateKubernetesClusterClient 通过k8s 配置信息创建client

func GetKubeClient

func GetKubeClient(kubernetesClusterId int64) (*KubernetesClient, error)

GetKubeClient 获取指定集群的client

type PodResources

type PodResources struct {
	Cpu     *resource.Quantity `json:"cpu"`
	Memory  *resource.Quantity `json:"memory"`
	Storage *resource.Quantity `json:"storage"`
}

Jump to

Keyboard shortcuts

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