Documentation ¶
Index ¶
- Constants
- func CheckEphemeralContainers(ctx context.Context, projectName, envName string) (bool, error)
- func CheckIstiod(ctx context.Context, clusterID string) (bool, error)
- func ClusterApplyUpgrade()
- func CreateCluster(args *K8SCluster, logger *zap.SugaredLogger) (*commonmodels.K8SCluster, error)
- func DeleteCluster(username, clusterID string, logger *zap.SugaredLogger) error
- func DisconnectCluster(username string, clusterID string, logger *zap.SugaredLogger) error
- func GetBundleResources() ([]*resourceSpec, error)
- func GetCluster(id string, logger *zap.SugaredLogger) (*commonmodels.K8SCluster, error)
- func GetYaml(id, hubURI string, useDeployment bool, logger *zap.SugaredLogger) ([]byte, error)
- func ListStorageClasses(ctx context.Context, clusterID string, scType types.StorageClassType) ([]string, error)
- func ProxyAgent(writer gin.ResponseWriter, request *http.Request)
- func ReconnectCluster(username string, clusterID string, logger *zap.SugaredLogger) error
- func UpdateCluster(id string, args *K8SCluster, logger *zap.SugaredLogger) (*commonmodels.K8SCluster, error)
- func UpgradeAgent(id string, logger *zap.SugaredLogger) error
- func UpgradeDind(kclient client.Client, cluster *commonmodels.K8SCluster, ns string) error
- type AdvancedConfig
- type ContainerResp
- type DeploymentResp
- type IstioVirtualServiceResp
- type K8SCluster
- type PVC
- type StorageProvisioner
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 CheckIstiod ¶ added in v1.9.9
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 ListStorageClasses ¶ added in v1.9.9
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"` Tolerations string `json:"tolerations" bson:"tolerations"` }
type ContainerResp ¶ added in v1.9.9
type DeploymentResp ¶ added in v1.9.9
type DeploymentResp struct { Name string `json:"name"` Containers []*ContainerResp `json:"containers"` }
func ListDeployments ¶ added in v1.9.9
func ListDeployments(ctx context.Context, clusterID, namespace string) ([]*DeploymentResp, error)
type IstioVirtualServiceResp ¶ added in v1.9.9
func ListIstioVirtualServices ¶ added in v1.9.9
func ListIstioVirtualServices(ctx context.Context, clusterID, namespace string) ([]*IstioVirtualServiceResp, error)
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 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.
Click to show internal directories.
Click to hide internal directories.