clusters

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: AGPL-3.0 Imports: 38 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	KubeconfigType = "KUBECONFIG"
	SAType         = "SERVICEACCOUNT"
	ProxyType      = "PROXY"

	ModuleClusterInit  = "cluster-init"
	ModuleClusterAgent = "cluster-agent"
	ClusterAgentSA     = ModuleClusterAgent
	ClusterAgentCR     = "cluster-agent-cr"
	ClusterAgentCRB    = "cluster-agent-crb"
)

Variables

View Source
var ProxyDeployTemplate = `` /* 2129-byte string literal not displayed */

Functions

func ParseKubeconfig

func ParseKubeconfig(kubeconfig []byte) (*apistructs.ManageConfig, error)

ParseKubeconfig parse kubeconfig to manage config

func ParseManageConfigFromCredential

func ParseManageConfigFromCredential(credentialType string, credential apistructs.ICCredential) (*apistructs.ManageConfig, error)

func ParseSecretes

func ParseSecretes(address string, secret []byte) (*apistructs.ManageConfig, error)

Types

type Clusters

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

func New

func New(db *dbclient.DBClient, bdl *bundle.Bundle) *Clusters

func (*Clusters) AddClusters

func (c *Clusters) AddClusters(req apistructs.CloudClusterRequest, userid string) (uint64, error)

func (*Clusters) BatchUpgradeEdgeCluster

func (c *Clusters) BatchUpgradeEdgeCluster(req apistructs.BatchUpgradeEdgeClusterRequest, userid string)

func (*Clusters) ClusterInfo

func (c *Clusters) ClusterInfo(ctx context.Context, orgID uint64, clusterNames []string) ([]map[string]map[string]apistructs.NameValue, error)

func (*Clusters) ClusterInitRetry

func (c *Clusters) ClusterInitRetry(orgID uint64, req *apistructs.ClusterInitRetry) error

func (*Clusters) ClusterPreview

func (*Clusters) GetOrgClusterInfo

func (*Clusters) GetOrgInfo

func (c *Clusters) GetOrgInfo(req *apistructs.OrgSearchRequest) (map[uint64]apistructs.OrgDTO, error)

func (*Clusters) Hook

func (c *Clusters) Hook(clusterEvent *apistructs.ClusterEvent) error

Hook deal k8sClient object in mem

func (*Clusters) ImportClusterWithRecord

func (c *Clusters) ImportClusterWithRecord(userID string, req *apistructs.ImportCluster) error

ImportClusterWithRecord import cluster with record

func (*Clusters) ListClusters

func (*Clusters) MonitorCloudCluster

func (c *Clusters) MonitorCloudCluster() (abort bool, err error)

func (*Clusters) OfflineEdgeCluster

func (c *Clusters) OfflineEdgeCluster(req apistructs.OfflineEdgeClusterRequest, userid string, orgid string) (uint64, error)

func (*Clusters) RenderInitCmd

func (c *Clusters) RenderInitCmd(orgName, clusterName string) (string, error)

func (*Clusters) RenderInitContent

func (c *Clusters) RenderInitContent(orgName, clusterName string, accessKey string) (string, error)

func (*Clusters) UpdateCluster

func (c *Clusters) UpdateCluster(req apistructs.CMPClusterUpdateRequest, header http.Header) error

func (*Clusters) UpdateClusterVersion

func (c *Clusters) UpdateClusterVersion(req []apistructs.OrgClusterInfoBasicData) error

func (*Clusters) UpgradeEdgeCluster

func (c *Clusters) UpgradeEdgeCluster(req apistructs.UpgradeEdgeClusterRequest, userid string, orgid string) (recordID uint64, status int, precheckHint string, err error)

status:

1 -- in processing, jump to check log
2 -- do precheck
3 -- invalid, do not support (non k8s cluster, central cluster, higher version ecluster)

type RenderDeploy

type RenderDeploy struct {
	ClusterName           string
	MasterClusterDomain   string // Master cluster domain, collector or openapi public
	MasterClusterProtocol string
	PlateFormVersion      string
	CustomDomain          string // Target cluster custom domain
	InitJobImage          string
	ClusterAgentImage     string
	ErdaHelmChartVersion  string
	DialerPublicAddr      string
	ErdaSystem            string
	OrgName               string
}

Jump to

Keyboard shortcuts

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