service

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const IstiodDeployment = "istiod"

IstiodDeployment is the Deployment name of istiod.

View Source
const ZadigMinioSVC = "zadig-minio"

ZadigMinioSVC is the service name of minio.

Variables

This section is empty.

Functions

func CheckEphemeralContainers added in v1.9.9

func CheckEphemeralContainers(ctx context.Context, clusterID string) (bool, error)

func CheckIstiod added in v1.9.9

func CheckIstiod(ctx context.Context, clusterID string) (bool, error)

func ClusterApplyUpgrade added in v1.9.9

func ClusterApplyUpgrade()

func CreateCluster

func CreateCluster(args *K8SCluster, logger *zap.SugaredLogger) (*commonmodels.K8SCluster, error)

func DeleteCluster

func DeleteCluster(username, clusterID string, logger *zap.SugaredLogger) error

func DisconnectCluster

func DisconnectCluster(username string, clusterID string, logger *zap.SugaredLogger) error

func GetBundleResources added in v1.7.1

func GetBundleResources() ([]*resourceSpec, error)

func GetCluster

func GetCluster(id string, logger *zap.SugaredLogger) (*commonmodels.K8SCluster, error)

func GetYaml

func GetYaml(id, hubURI string, useDeployment bool, logger *zap.SugaredLogger) ([]byte, error)

func ListStorageClasses added in v1.9.9

func ListStorageClasses(ctx context.Context, clusterID string, scType types.StorageClassType) ([]string, error)

func ProxyAgent

func ProxyAgent(writer gin.ResponseWriter, request *http.Request)

func ReconnectCluster

func ReconnectCluster(username string, clusterID string, logger *zap.SugaredLogger) error

func UpdateCluster

func UpdateCluster(id string, args *K8SCluster, logger *zap.SugaredLogger) (*commonmodels.K8SCluster, error)

func UpgradeAgent added in v1.9.9

func UpgradeAgent(id string, logger *zap.SugaredLogger) error

func UpgradeDind added in v1.9.9

func UpgradeDind(kclient client.Client, cluster *commonmodels.K8SCluster, ns string) error

Types

type AdvancedConfig added in v1.8.0

type AdvancedConfig struct {
	Strategy     string   `json:"strategy,omitempty"        bson:"strategy,omitempty"`
	NodeLabels   []string `json:"node_labels,omitempty"     bson:"node_labels,omitempty"`
	ProjectNames []string `json:"project_names"             bson:"project_names"`
}

type K8SCluster added in v1.7.1

type K8SCluster struct {
	ID                     string                   `json:"id,omitempty"`
	Name                   string                   `json:"name"`
	Description            string                   `json:"description"`
	AdvancedConfig         *AdvancedConfig          `json:"advanced_config,omitempty"`
	Status                 setting.K8SClusterStatus `json:"status"`
	Production             bool                     `json:"production"`
	CreatedAt              int64                    `json:"createdAt"`
	CreatedBy              string                   `json:"createdBy"`
	Provider               int8                     `json:"provider"`
	Local                  bool                     `json:"local"`
	Cache                  types.Cache              `json:"cache"`
	LastConnectionTime     int64                    `json:"last_connection_time"`
	UpdateHubagentErrorMsg string                   `json:"update_hubagent_error_msg"`
	DindCfg                *commonmodels.DindCfg    `json:"dind_cfg"`

	// new field in 1.14, intended to enable kubeconfig for cluster management
	Type       string `json:"type"` // either agent or kubeconfig supported
	KubeConfig string `json:"config"`
}

func ListClusters

func ListClusters(ids []string, projectName string, logger *zap.SugaredLogger) ([]*K8SCluster, error)

func (*K8SCluster) Clean added in v1.8.0

func (k *K8SCluster) Clean() error

type PVC added in v1.9.9

type PVC struct {
	Name               string `json:"name"`
	StorageSizeInBytes int64  `json:"storage_size_in_bytes"`
}

func ListPVCs added in v1.9.9

func ListPVCs(ctx context.Context, clusterID, namespace string) ([]PVC, error)

type StorageProvisioner added in v1.9.9

type StorageProvisioner string

StorageProvisioner is a storage type

const (
	// AliCloudNASProvisioner is the provisioner of NFS storage in AliCloud.
	AliCloudNASProvisioner StorageProvisioner = "nasplugin.csi.alibabacloud.com"

	// TencentCloudCFSProvisioner is the provisioner of NFS storage in TencentCloud.
	TencentCloudCFSProvisioner StorageProvisioner = "com.tencent.cloud.csi.cfs"

	// HuaweiCloudSFSProvisioner is the provisioner of SFS storage in HuaweiCloud.
	HuaweiCloudSFSProvisioner StorageProvisioner = "sfsturbo.csi.everest.io"

	// HuaweiCloudNASProvisioner is the provisioner of NAS storage in HuaweiCloud.
	HuaweiCloudNASProvisioner StorageProvisioner = "nas.csi.everest.io"

	// AWSEFSProvisioner is the provisioner of EFS storage in AWS.
	AWSEFSProvisioner StorageProvisioner = "efs.csi.aws.com"
)

func (StorageProvisioner) IsNFS added in v1.9.9

func (s StorageProvisioner) IsNFS() bool

Note: For the convenience of users, we filter the storage types for known cloud vendors to prevent users from mistakenly selecting storage types that do not support the “ReadWriteMany“ policy. If the user builds their own storage, it is not checked because there is no clear information to judge.

Jump to

Keyboard shortcuts

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