models

package
v0.0.0-...-94e4715 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 111 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KUBE_SERVER_SERVICE    = "k8s"
	INTERNAL_ENDPOINT_TYPE = "internalURL"
)
View Source
const (
	SystemClusterName = "system-default"
	NamespaceOneCloud = "onecloud"
)
View Source
const (
	CephCSIConfigMapName = "ceph-csi-config"
	CephCSINamespace     = "ceph-csi"
)
View Source
const (
	MinioNamespace   = "onecloud-minio"
	MinioReleaseName = "minio"
)
View Source
const (
	MonitorNamespace                  = "onecloud-monitoring"
	MonitorReleaseName                = "monitor"
	ThanosObjectStoreConfigSecretName = "thanos-objstore-config"
	ThanosObjectStoreConfigSecretKey  = "thanos.yaml"

	GrafanaSystemFolder = "Cloud-System"
	InfluxdbTelegrafDS  = "Influxdb-Telegraf"
	InfluxdbSystemDS    = "InfluxDB-system"
)
View Source
const (
	K8S_SYNC_STATUS_QUEUED  = "queued"
	K8S_SYNC_STATUS_QUEUING = "queuing"
	K8S_SYNC_STATUS_SYNCING = "syncing"
	K8S_SYNC_STATUS_IDLE    = "idle"
	K8S_SYNC_STATUS_ERROR   = "error"
)
View Source
const (
	FluentBitReleaseName = "fluentbit"
)
View Source
const (
	IsDefaultStorageClassAnnotation = "storageclass.kubernetes.io/is-default-class"
)
View Source
const (
	MonitorMinioReleaseName = "monitor-minio"
)
View Source
const (
	ThanosReleaseName = "thanos"
)

Variables

View Source
var (
	ComponentManager = NewComponentManager(
		SComponent{},
		"kubecomponent",
		"kubecomponents")
)
View Source
var (

	// FailedReasonPartials  is an array of partial strings to correctly filter warning events.
	// Have to be lower case for correct case insensitive comparison.
	// Based on k8s official events reason file:
	// https://github.com/kubernetes/kubernetes/blob/886e04f1fffbb04faf8a9f9ee141143b2684ae68/pkg/kubelet/events/event.go
	// Partial strings that are not in event.go file are added in order to support
	// older versions of k8s which contained additional event reason messages.
	FailedReasonPartials = []string{"failed", "err", "exceeded", "invalid", "unhealthy",
		"mismatch", "insufficient", "conflict", "outof", "nil", "backoff"}
)

Functions

func CompareRemoteObjectSets

func CompareRemoteObjectSets(
	localObjs []IClusterModel,
	extObjs []interface{},
	getGlobalIdMethod func(remoteObj interface{}) string,
	removed interface{},
	localCommon interface{},
	extCommon interface{},
	added interface{}) error

func CompareSetsByFunc

func CompareSetsByFunc(
	localObjs []IClusterModel,
	getExternalIdMethod func(localObj interface{}) string,
	extObjs interface{},
	getGlobalIdMethod func(remoteObj interface{}) string,
	removed interface{},
	commonDB interface{},
	commonExt interface{},
	added interface{}) error

func ConvertRawToAPIObject

func ConvertRawToAPIObject(
	man model.IK8sModelManager,
	cluster model.ICluster,
	obj runtime.Object, target interface{}) error

func ConvertRawToAPIObjects

func ConvertRawToAPIObjects(
	man model.IK8sModelManager,
	cluster model.ICluster,
	objs interface{},
	targets interface{}) error

objs is: []*objs, e.g.: []*v1.Pod{} targets is: the pointer of []*v, e.g.: &[]*api.Pod{}

func CreateMinioHelmResource

func CreateMinioHelmResource(man HelmComponentManager, cluster *SCluster, setting *api.ComponentSettings, input *api.ComponentSettingMinio) error

func CreateRemoteObject

func CreateRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, man IClusterModelManager, model IClusterModel, data jsonutils.JSONObject) (interface{}, error)

func CreateService

func CreateService(cliMan *client.ClusterManager, svc *v1.Service) (*v1.Service, error)

func CreateServiceByOption

func CreateServiceByOption(cli *client.ClusterManager, objMeta *metav1.ObjectMeta, opt *api.ServiceCreateOption) (*v1.Service, error)

func CreateServiceIfNotExist

func CreateServiceIfNotExist(cli *client.ClusterManager, objMeta *metav1.ObjectMeta, opt *api.ServiceCreateOption) (*v1.Service, error)

func DeleteMinioHelmResource

func DeleteMinioHelmResource(man HelmComponentManager, cluster *SCluster) error

func DoDisableMinio

func DoDisableMinio(man IMinioComponentManager, cluster *SCluster, setting *api.ComponentSettings) error

func DoEnableMinio

func DoEnableMinio(man IMinioComponentManager, cluster *SCluster, setting *api.ComponentSettings) error

func DoUpdateMinio

func DoUpdateMinio(man IMinioComponentManager, cluster *SCluster, setting *api.ComponentSettings) error

func EnsureNamespace

func EnsureNamespace(cluster *SCluster, namespace string) error

func EqualIgnoreHash

func EqualIgnoreHash(template1, template2 v1.PodTemplateSpec) bool

EqualIgnoreHash returns true if two given podTemplateSpec are equal, ignoring the diff in value of Labels[pod-template-hash] We ignore pod-template-hash because the hash result would be different upon podTemplateSpec API changes (e.g. the addition of a new field will cause the hash code to change) Note that we assume input podTemplateSpecs contain non-empty labels

func ExtractFieldPathAsString

func ExtractFieldPathAsString(obj interface{}, fieldPath string) (string, error)

ExtractFieldPathAsString extracts the field from the given object and returns it as a string. The object must be a pointer to an API type.

func FetchClusterResourceCustomizeColumns

func FetchClusterResourceCustomizeColumns(
	baseGet func(obj interface{}) interface{},
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []interface{}

func FilterDeploymentPodsByOwnerReference

func FilterDeploymentPodsByOwnerReference(deployment *apps.Deployment, allRS []*apps.ReplicaSet,
	allPods []*v1.Pod) []*v1.Pod

FilterPodsByControllerResource returns a subset of pods controlled by given deployment.

func FilterPodsByControllerRef

func FilterPodsByControllerRef(owner metav1.Object, allPods []*v1.Pod) []*v1.Pod

FilterPodsByControllerRef returns a subset of pods controlled by given controller resource, excluding deployments.

func FindNewReplicaSet

func FindNewReplicaSet(deployment *apps.Deployment, rsList []*apps.ReplicaSet) (*apps.ReplicaSet, error)

FindNewReplicaSet returns the new RS this given deployment targets (the one with the same pod template).

func FormatMap

func FormatMap(m map[string]string) (fmtStr string)

FormatMap formats map[string]string to a string.

func GetAdminCred

func GetAdminCred() mcclient.TokenCredential

func GetAdminSession

func GetAdminSession() (*mcclient.ClientSession, error)

func GetChartRawFiles

func GetChartRawFiles(chObj *chart.Chart) []*chart.File

func GetClusterClient

func GetClusterClient(clsId string) (*client.ClusterManager, error)

func GetComponentImageRepository

func GetComponentImageRepository(cluster *SCluster, setting *api.ComponentSettings) (*api.ImageRepository, error)

func GetConfigMapsForPod

func GetConfigMapsForPod(pod *v1.Pod, cfgs []*v1.ConfigMap) []*v1.ConfigMap

func GetContainerImages

func GetContainerImages(podTemplate *v1.PodSpec) []api.ContainerImage

GetContainerImages returns container image strings from the given pod spec.

func GetDataDeployAction

func GetDataDeployAction(data *jsonutils.JSONDict) (api.ClusterDeployAction, error)

func GetDataDeployMachineIds

func GetDataDeployMachineIds(data *jsonutils.JSONDict) ([]string, error)

func GetDataDeploySkipDownloads

func GetDataDeploySkipDownloads(data *jsonutils.JSONDict) bool

func GetExternalEndpoints

func GetExternalEndpoints(service *v1.Service) []api.Endpoint

GetExternalEndpoints returns endpoints that are externally reachable for a service.

func GetInitContainerImages

func GetInitContainerImages(podTemplate *v1.PodSpec) []api.ContainerImage

GetInitContainerImages returns init container image strings from the given pod spec.

func GetInternalEndpoint

func GetInternalEndpoint(serviceName, namespace string, ports []v1.ServicePort) api.Endpoint

GetInternalEndpoint returns internal endpoint name for the given service properties, e.g., "my-service.namespace 80/TCP" or "my-service 53/TCP,53/UDP".

func GetK8SObjectTypeMeta

func GetK8SObjectTypeMeta(kObj runtime.Object) metav1.TypeMeta

func GetK8SResourceMetaDetail

func GetK8SResourceMetaDetail(k8sObj runtime.Object, detail api.ClusterResourceDetail) api.ClusterResourceDetail

func GetK8sModelManagerByKind

func GetK8sModelManagerByKind(kindName string) model.IK8sModelManager

func GetK8sObject

func GetK8sObject(res IClusterModel) (runtime.Object, error)

func GetK8sResourceManagerByKind

func GetK8sResourceManagerByKind(kindName string) manager.IK8sResourceManager

GetK8sResourceManagerByKind used by bidirect sync

func GetMinioHelmValues

func GetMinioHelmValues(cluster *SCluster, setting *api.ComponentSettings, input *api.ComponentSettingMinio) (map[string]interface{}, error)

func GetNewReplicaSetTemplate

func GetNewReplicaSetTemplate(deployment *apps.Deployment) v1.PodTemplateSpec

GetNewReplicaSetTemplate returns the desired PodTemplateSpec for the new ReplicaSet corresponding to the given ReplicaSet. Callers of this helper need to set the DefaultDeploymentUniqueLabelKey k/v pair.

func GetObjectPtr

func GetObjectPtr(obj interface{}) interface{}

GetObjectPtr wraps the given value with pointer: V => *V, *V => **V, etc.

func GetPodConfigMapVolumes

func GetPodConfigMapVolumes(pod *v1.Pod) []v1.Volume

func GetPodInfo

func GetPodInfo(current int32, desired *int32, pods []*v1.Pod) (*api.PodInfo, error)

func GetPodSecretVolumes

func GetPodSecretVolumes(pod *v1.Pod) []v1.Volume

func GetRawPodsByController

func GetRawPodsByController(cli *client.ClusterManager, obj metav1.Object) ([]*v1.Pod, error)

func GetReleasePods

func GetReleasePods(rel *release.Release, clusterMan model.ICluster) ([]v1.Pod, error)

func GetReleasePodsStatus

func GetReleasePodsStatus(rel *release.Release, clusterMan model.ICluster) (map[string]string, error)

func GetReleaseResources

func GetReleaseResources(
	cli *helm.Client, rel *release.Release,
	clusterMan model.ICluster,
) (map[string][]interface{}, error)

func GetResourcesByClusters

func GetResourcesByClusters(man IClusterModelManager, clusterIds []string, ret interface{}) error

func GetSecretsForPod

func GetSecretsForPod(pod *v1.Pod, ss []*v1.Secret) []*v1.Secret

func GetServiceFromOption

func GetServiceFromOption(objMeta *metav1.ObjectMeta, opt *api.ServiceCreateOption) *v1.Service

func GetServicePorts

func GetServicePorts(apiPorts []v1.ServicePort) []api.ServicePort

GetServicePorts returns human readable name for the given service ports list.

func GetServicePortsByMapping

func GetServicePortsByMapping(ps []api.PortMapping) []v1.ServicePort

func GetUserSession

func GetUserSession(ctx context.Context, userCred mcclient.TokenCredential) (*mcclient.ClientSession, error)

func GroupCreateMachineDatas

func GroupCreateMachineDatas(clusterId string, data []*api.CreateMachineData) ([]*api.CreateMachineData, []*api.CreateMachineData)

func InitDB

func InitDB() error

func IsObjectContains

func IsObjectContains(obj metav1.Object, objs interface{}) bool

func IsPodOwner

func IsPodOwner(owner IPodOwnerModel, pod *SPod) (bool, error)

func IsServiceOwner

func IsServiceOwner(owner IServiceOwnerModel, svc *SService) (bool, error)

func K8SObjectToJSONObject

func K8SObjectToJSONObject(obj runtime.Object) jsonutils.JSONObject

func LoadEmbedChart

func LoadEmbedChart(chartName string) (*chart.Chart, error)

func MergeValues

func MergeValues(yamlStr string, sets map[string]string) (map[string]interface{}, error)

func NewCheckIdOrNameError

func NewCheckIdOrNameError(res, resName string, err error) error

func NewFedJointManager

func NewFedJointManager(factory func() db.IJointModelManager) db.IJointModelManager

func NewFromRemoteObject

func NewFromRemoteObject(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	man IClusterModelManager,
	cluster *SCluster,
	obj interface{}) (db.IModel, error)

func NewHelmClient

func NewHelmClient(cluster *SCluster, namespace string) (*helm.Client, error)

func NewObjectMeta

func NewObjectMeta(res IClusterModel) (api.ObjectMeta, error)

func OnRemoteObjectDelete

func OnRemoteObjectDelete(resMan IClusterModelManager, ctx context.Context, userCred mcclient.TokenCredential, dbObj IClusterModel) error

func PodRequestsAndLimits

func PodRequestsAndLimits(pod *v1.Pod) (reqs map[v1.ResourceName]resource.Quantity, limits map[v1.ResourceName]resource.Quantity, err error)

PodRequestsAndLimits returns a dictionary of all defined resources summed up for all containers of the pod.

func RegisterClusterDriver

func RegisterClusterDriver(driver IClusterDriver)

func RegisterContainerRegistryDriver

func RegisterContainerRegistryDriver(driver IContainerRegistryDriver)

func RegisterFedJointClusterManager

func RegisterFedJointClusterManager(masterMan IFedModelManager, jointMan IFedJointClusterManager)

func RegisterK8sModelManager

func RegisterK8sModelManager(man IK8sModelManager)

func RegisterMachineDriver

func RegisterMachineDriver(driver IMachineDriver)

func RegisterRepoDriver

func RegisterRepoDriver(driver IRepoDriver)

func RegisterSerializable

func RegisterSerializable(objs ...gotypes.ISerializable)

func RunBatchTask

func RunBatchTask(
	ctx context.Context,
	items []db.IStandaloneModel,
	userCred mcclient.TokenCredential,
	data jsonutils.JSONObject,
	taskName, parentTaskId string,
) error

func RunSyncClusterTask

func RunSyncClusterTask(task appsrv.IWorkerTask)

func SetDataDeployAction

func SetDataDeployAction(data *jsonutils.JSONDict, action api.ClusterDeployAction)

func SetDataDeployMachineIds

func SetDataDeployMachineIds(data *jsonutils.JSONDict, ids ...string) error

func SetDataDeploySkipDownloads

func SetDataDeploySkipDownloads(data *jsonutils.JSONDict, skipDownloads bool)

func SetJSONDataDefault

func SetJSONDataDefault(data *jsonutils.JSONDict, key string, defVal string) string

func SortConditions

func SortConditions(conds []*api.Condition) []*api.Condition

func SyncClusterResources

func SyncClusterResources(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	cluster *SCluster,
	resMans ...ISyncableManager,
) error

func SyncRemovedClusterResource

func SyncRemovedClusterResource(ctx context.Context, userCred mcclient.TokenCredential, dbObj IClusterModel) error

func SyncUpdatedClusterResource

func SyncUpdatedClusterResource(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	man IClusterModelManager,
	dbObj IClusterModel, extObj interface{}) error

func TaskManager

func TaskManager() *appsrv.SWorkerManager

func ToRelease

func ToRelease(release *release.Release, clusterCli *client.ClusterManager) *api.Release

func ToResourceEventNote

func ToResourceEventNote(ctx context.Context,
	userCred mcclient.TokenCredential,
	res INamespaceModel,
	k8sObj interface{},
	resultF func(domainId string, nsLabels map[string]string, detailObj interface{}) interface{}) interface{}

func UpdateK8sObject

func UpdateK8sObject(res IClusterModel, data jsonutils.JSONObject) (runtime.Object, error)

func UpdateMinioHelmResource

func UpdateMinioHelmResource(man HelmComponentManager, cluster *SCluster, setting *api.ComponentSettings, input *api.ComponentSettingMinio) error

func UpdatePodTemplate

func UpdatePodTemplate(temp *v1.PodTemplateSpec, input api.PodTemplateUpdateInput) error

func UpdateRemoteObject

func UpdateRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, model IClusterModel, data jsonutils.JSONObject) (interface{}, error)

func ValidateAppCreateService

func ValidateAppCreateService(userCred mcclient.TokenCredential, nsInput api.NamespaceResourceCreateInput, opt *api.ServiceCreateOption, objMeta *metav1.ObjectMeta) error

func ValidateCreateK8sObject

func ValidateCreateK8sObject(versionObj runtime.Object, internalObj interface{}, validateFunc func(internalObj interface{}) field.ErrorList) error

func ValidateFederatedRoleRef

func ValidateFederatedRoleRef(ctx context.Context, userCred mcclient.TokenCredential, roleRef rbac.RoleRef) error

func ValidatePodTemplate

func ValidatePodTemplate(userCred mcclient.TokenCredential, clusterId string, namespaceId string, template *v1.PodTemplateSpec) error

func ValidateRole

func ValidateRole(role string) error

func ValidateUpdateClusterRoleBindingObject

func ValidateUpdateClusterRoleBindingObject(oldObj, newObj *rbacv1.ClusterRoleBinding) error

func ValidateUpdateClusterRoleObject

func ValidateUpdateClusterRoleObject(oldObj, newObj *rbacv1.ClusterRole) error

func ValidateUpdateFedClusterRoleBindingObject

func ValidateUpdateFedClusterRoleBindingObject(oldObj, newObj *rbacv1.ClusterRoleBinding) error

func ValidateUpdateFedClusterRoleObject

func ValidateUpdateFedClusterRoleObject(oldObj, newObj *rbacv1.ClusterRole) error

func ValidateUpdateFedRoleBindingObject

func ValidateUpdateFedRoleBindingObject(oldObj, newObj *rbacv1.RoleBinding) error

func ValidateUpdateFedRoleObject

func ValidateUpdateFedRoleObject(oldObj, newObj *rbacv1.Role) error

func ValidateUpdateK8sObject

func ValidateUpdateK8sObject(ovObj, nvObj runtime.Object, oObj, nObj interface{}, validateFunc func(newObj, oldObj interface{}) field.ErrorList) error

func ValidateUpdateRoleBindingObject

func ValidateUpdateRoleBindingObject(oldObj, newObj *rbacv1.RoleBinding) error

func ValidateUpdateRoleObject

func ValidateUpdateRoleObject(oldObj, newObj *rbacv1.Role) error

func ValueToJSONDict

func ValueToJSONDict(out reflect.Value) *jsonutils.JSONDict

func ValueToJSONObject

func ValueToJSONObject(out reflect.Value) jsonutils.JSONObject

func WaitMachineDelete

func WaitMachineDelete(ctx context.Context, machine *SMachine) error

func WaitMachineRunning

func WaitMachineRunning(machine *SMachine) error

Types

type CephCSIClusterConfig

type CephCSIClusterConfig struct {
	ClusterId string   `json:"clusterID"`
	Monitors  []string `json:"monitors"`
}

type ClusterHelmChartInstallOption

type ClusterHelmChartInstallOption struct {
	EmbedChartName string
	ReleaseName    string
	Namespace      string
	Values         map[string]interface{}
}

func (ClusterHelmChartInstallOption) Validate

func (o ClusterHelmChartInstallOption) Validate() error

type HelmComponentManager

type HelmComponentManager struct {
	K8SComponentManager
	// contains filtered or unexported fields
}

func NewHelmComponentManager

func NewHelmComponentManager(namespace string, releaseName string, embedChartName string) *HelmComponentManager

func (HelmComponentManager) CreateHelmResource

func (m HelmComponentManager) CreateHelmResource(
	cluster *SCluster,
	vals map[string]interface{},
) error

func (HelmComponentManager) DeleteHelmResource

func (m HelmComponentManager) DeleteHelmResource(cluster *SCluster) error

func (HelmComponentManager) HelmInstall

func (m HelmComponentManager) HelmInstall(
	cluster *SCluster,
	namespace string,
	chartName string,
	releaseName string,
	vals map[string]interface{}) (*release.Release, error)

func (HelmComponentManager) HelmUninstall

func (m HelmComponentManager) HelmUninstall(cluster *SCluster, namespace string, releaseName string) error

func (HelmComponentManager) HelmUpdate

func (m HelmComponentManager) HelmUpdate(
	cluster *SCluster,
	namespace string,
	chartName string,
	releaseName string,
	vals map[string]interface{},
) (*release.Release, error)

func (HelmComponentManager) NewHelmClient

func (m HelmComponentManager) NewHelmClient(cluster *SCluster, namespace string) (*helm.Client, error)

func (HelmComponentManager) UpdateHelmResource

func (m HelmComponentManager) UpdateHelmResource(cluster *SCluster, vals map[string]interface{}) error

type IClusterDriver

type IClusterDriver interface {
	GetMode() api.ModeType
	GetProvider() api.ProviderType
	GetResourceType() api.ClusterResourceType
	// GetK8sVersions return current cluster k8s versions supported
	GetK8sVersions() []string
	PreCheck(s *mcclient.ClientSession, data jsonutils.JSONObject) (*api.ClusterPreCheckResp, error)

	IClusterDriverMethods
}

func GetClusterDriver

func GetClusterDriver(mode api.ModeType, provider api.ProviderType, resType api.ClusterResourceType) IClusterDriver

func GetDriverWithError

func GetDriverWithError(
	mode api.ModeType,
	provider api.ProviderType,
	resType api.ClusterResourceType,
) (IClusterDriver, error)

type IClusterDriverMethods

type IClusterDriverMethods interface {
	// GetUsableInstances return usable instances for cluster
	GetUsableInstances(s *mcclient.ClientSession) ([]api.UsableInstance, error)

	NeedCreateMachines() bool

	ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *api.ClusterCreateInput) error
	// RequestDeployMachines run ansible deploy machines as kubernetes nodes
	RequestDeployMachines(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, action api.ClusterDeployAction, machines []manager.IMachine, skipDownloads bool, task taskman.ITask) error
	GetKubesprayConfig(ctx context.Context, cluster *SCluster) (*api.ClusterKubesprayConfig, error)

	ValidateDeleteCondition() error
	ValidateDeleteMachines(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, machines []manager.IMachine) error
	RequestDeleteMachines(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, machines []manager.IMachine, task taskman.ITask) error

	ValidateCreateMachines(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, info *api.ClusterMachineCommonInfo, imageRepo *api.ImageRepository, data []*api.CreateMachineData) error

	GetAddonsHelmCharts(cluster *SCluster, conf *api.ClusterAddonsManifestConfig) ([]*ClusterHelmChartInstallOption, error)

	// GetAddonsManifest return addons yaml manifest to be applied to cluster
	GetAddonsManifest(cluster *SCluster, conf *api.ClusterAddonsManifestConfig) (string, error)
	// GetClusterUsers query users resource from remote k8s cluster
	GetClusterUsers(cluster *SCluster, restCfg *rest.Config) ([]api.ClusterUser, error)
	// GetClusterUserGroups query groups resource from remote k8s cluster
	GetClusterUserGroups(cluster *SCluster, restCfg *rest.Config) ([]api.ClusterUserGroup, error)
}

type IClusterModel

type IClusterModel interface {
	db.IStatusDomainLevelModel
	GetDomainId() string

	// LogPrefix return db object log short prefix string
	LogPrefix() string
	GetExternalId() string
	SetExternalId(idStr string)

	GetClusterModelManager() IClusterModelManager
	SetName(name string)
	GetClusterId() string
	GetCluster() (*SCluster, error)
	SetCluster(userCred mcclient.TokenCredential, cluster *SCluster)
	SetStatus(ctx context.Context, userCred mcclient.TokenCredential, status string, reason string) error
	NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)
	SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, remoteObj interface{}) error
	UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
	GetClusterClient() (*client.ClusterManager, error)
	RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
	GetDetails(ctx context.Context, cli *client.ClusterManager, baseDetails interface{}, k8sObj runtime.Object, isList bool) interface{}

	// RemoteObject operator interfaces
	// GetRemoteObject get remote object from cluster
	GetRemoteObject() (interface{}, error)
	// UpdateRemoteObject update remote object inside cluster
	UpdateRemoteObject(remoteObj interface{}) (interface{}, error)
	// DeleteRemoteObject delete remote object inside cluster
	DeleteRemoteObject() error
}

func FetchClusterResourceById

func FetchClusterResourceById(manager IClusterModelManager, clusterId string, namespaceId string, resId string) (IClusterModel, error)

func FetchClusterResourceByIdOrName

func FetchClusterResourceByIdOrName(manager IClusterModelManager, userCred mcclient.IIdentityProvider, clusterId string, namespaceId string, resId string) (IClusterModel, error)

func FetchClusterResourceByName

func FetchClusterResourceByName(manager IClusterModelManager, userCred mcclient.IIdentityProvider, clusterId string, namespaceId string, resId string) (IClusterModel, error)

func GetClusterModelObjects

func GetClusterModelObjects(man IClusterModelManager, cluster *SCluster) ([]IClusterModel, error)

type IClusterModelManager

type IClusterModelManager interface {
	db.IDomainLevelModelManager

	IsNamespaceScope() bool
	GetK8sResourceInfo() model.K8sResourceInfo
	IsRemoteObjectLocalExist(userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, bool, error)
	NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, error)
	ListRemoteObjects(cli *client.ClusterManager) ([]interface{}, error)
	GetRemoteObjectGlobalId(cluster *SCluster, obj interface{}) string

	NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
	CreateRemoteObject(model IClusterModel, cli *client.ClusterManager, remoteObj interface{}) (interface{}, error)

	InitOwnedManager(man IClusterModelManager)

	GetGCQuery() *sqlchemy.SQuery

	FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool) []interface{}
}

type IClusterResAPI

type IClusterResAPI interface {
	NamespaceScope() INamespaceResAPI

	// StartResourceSyncTask start sync cluster model resource task
	StartResourceSyncTask(obj IClusterModel, ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentId string) error
	// PerformSyncResource sync remote cluster resource to local
	PerformSyncResource(obj IClusterModel, ctx context.Context, userCred mcclient.TokenCredential) error
	// UpdateFromRemoteObject update local db object from remote cluster object
	UpdateFromRemoteObject(obj IClusterModel, ctx context.Context, userCred mcclient.TokenCredential, remoteObj interface{}) error
	// PerformGC cleanup cluster orphan resources
	PerformGC(man IClusterModelManager, ctx context.Context, userCred mcclient.TokenCredential) error
}

func GetClusterResAPI

func GetClusterResAPI() IClusterResAPI

type IComponentDriver

type IComponentDriver interface {
	GetType() string
	ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, input *api.ComponentCreateInput) error
	ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, input *api.ComponentUpdateInput) error
	GetCreateSettings(input *api.ComponentCreateInput) (*api.ComponentSettings, error)
	GetUpdateSettings(oldSetting *api.ComponentSettings, input *api.ComponentUpdateInput) (*api.ComponentSettings, error)
	GetApplyedConfigCheckSum(cls *SCluster, setting *api.ComponentSettings) string
	DoEnable(cluster *SCluster, settings *api.ComponentSettings) error
	DoDisable(cluster *SCluster, settings *api.ComponentSettings) error
	DoUpdate(cluster *SCluster, settings *api.ComponentSettings) error
	FetchStatus(cluster *SCluster, c *SComponent, status *api.ComponentsStatus) error
	GetHelmValues(cluster *SCluster, setting *api.ComponentSettings) (map[string]interface{}, error)
}

type IContainerRegistryDriver

type IContainerRegistryDriver interface {
	GetType() api.ContainerRegistryType

	GetDockerRegistryClient(url string, config *api.ContainerRegistryConfig) (client.Client, error)

	ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *api.ContainerRegistryCreateInput) (*api.ContainerRegistryCreateInput, error)

	PreparePushImage(ctx context.Context, url string, conf *api.ContainerRegistryConfig, meta *client.ImageMetadata) error
	DownloadImage(ctx context.Context, url string, conf *api.ContainerRegistryConfig, input api.ContainerRegistryDownloadImageInput) (string, error)
}

func GetContainerRegistryDriver

func GetContainerRegistryDriver(rType api.ContainerRegistryType) (IContainerRegistryDriver, error)

type IEventManager

type IEventManager interface {
	model.IK8sModelManager
	GetNamespaceEvents(cluster model.ICluster, namespace string) ([]*api.Event, error)
	GetWarningEventsByPods(cluster model.ICluster, pods []*v1.Pod) ([]*api.Event, error)
}

func GetEventManager

func GetEventManager() IEventManager

type IFedClusterResAPI

type IFedClusterResAPI interface {
}

type IFedJointClusterManager

type IFedJointClusterManager interface {
	IFedJointManager
	GetFedManager() IFedModelManager
	GetResourceManager() IClusterModelManager
	ClusterQuery(clusterId string) *sqlchemy.SQuery
}

func GetFedJointClusterManager

func GetFedJointClusterManager(keyword string) IFedJointClusterManager

type IFedJointClusterModel

type IFedJointClusterModel interface {
	IFedJointModel

	// GetClusterId() get object cluster_id
	GetClusterId() string
	// GetResourceId get object resource_id
	GetResourceId() string
	// GetFedResourceId get object federatedresource_id
	GetFedResourceId() string
	GetManager() IFedJointClusterManager
	GetCluster() (*SCluster, error)
	GetResourceManager() IClusterModelManager
	SetResource(resObj IClusterModel) error
	GetResourceCreateData(ctx context.Context, userCred mcclient.TokenCredential, fedObj IFedModel, baseInput api.NamespaceResourceCreateInput) (jsonutils.JSONObject, error)
	GetResourceUpdateData(ctx context.Context, userCred mcclient.TokenCredential, fedObj IFedModel, resObj IClusterModel, baseInput api.NamespaceResourceUpdateInput) (jsonutils.JSONObject, error)
	GetDetails(base api.FedJointClusterResourceDetails, isList bool) interface{}
}

func GetFederatedJointClusterModel

func GetFederatedJointClusterModel(man IFedJointClusterManager, masterId string, clusterId string) (IFedJointClusterModel, error)

type IFedJointClusterResAPI

type IFedJointClusterResAPI interface {
}

type IFedJointManager

type IFedJointManager interface {
	db.IJointModelManager
}

type IFedJointModel

type IFedJointModel interface {
	db.IJointModel
}

type IFedJointResAPI

type IFedJointResAPI interface {
	ClusterScope() IFedJointClusterResAPI
	NamespaceScope() IFedNamespaceJointClusterResAPI

	// IsResourceExist check joint federated object's resource whether exists in target cluster
	IsResourceExist(jObj IFedJointClusterModel, userCred mcclient.TokenCredential) (IClusterModel, bool, error)
	// ReconcileResource reconcile federated object to cluster
	ReconcileResource(jObj IFedJointClusterModel, ctx context.Context, userCred mcclient.TokenCredential) error
	// FetchResourceModel get joint object releated cluster object
	FetchResourceModel(jObj IFedJointClusterModel) (IClusterModel, error)
	// FetchFedResourceModel get joint object related master fedreated db object
	FetchFedResourceModel(jObj IFedJointClusterModel) (IFedModel, error)
	// IsNamespaceScope mark object is namespace scope
	IsNamespaceScope(jObj IFedJointClusterModel) bool
	// GetDetails get joint object details
	GetDetails(ctx context.Context, jObj IFedJointClusterModel, userCred mcclient.TokenCredential, base apis.JointResourceBaseDetails, isList bool) interface{}
}

type IFedModel

type IFedModel interface {
	db.IStatusDomainLevelModel

	GetManager() IFedModelManager
	GetDetails(baseDetails interface{}, isList bool) interface{}
	ValidateJointCluster(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) (IFedJointClusterModel, jsonutils.JSONObject, error)
	GetJointModelManager() IFedJointClusterManager
	ValidateAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
	ValidateDetachCluster(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
	SetStatus(ctx context.Context, userCred mcclient.TokenCredential, status string, reason string) error
	LogPrefix() string
}

type IFedModelManager

type IFedModelManager interface {
	db.IModelManager

	GetJointModelManager() IFedJointClusterManager
	SetJointModelManager(man IFedJointClusterManager)
	PurgeAllByCluster(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster) error
}

func GetFedManagers

func GetFedManagers() []IFedModelManager

type IFedNamespaceJointClusterManager

type IFedNamespaceJointClusterManager interface {
	IFedJointClusterManager
}

func GetFedJointNamespaceScopeManager

func GetFedJointNamespaceScopeManager() []IFedNamespaceJointClusterManager

GetFedJointNamespaceScopeManager return federated namespace scope manager, e.g: - GetFedRoleManager() - GetFedRoleBindingManager()

type IFedNamespaceJointClusterModel

type IFedNamespaceJointClusterModel interface {
	IFedJointClusterModel
}

type IFedNamespaceJointClusterResAPI

type IFedNamespaceJointClusterResAPI interface {
	FetchFedNamespace(jObj IFedNamespaceJointClusterModel) (*SFedNamespace, error)
	FetchClusterNamespace(userCred mcclient.TokenCredential, jObj IFedNamespaceJointClusterModel, cluster *SCluster) (*SNamespace, error)
	FetchModelsByFednamespace(man IFedNamespaceJointClusterManager, fednsId string) ([]IFedNamespaceJointClusterModel, error)
}

type IFedNamespaceModel

type IFedNamespaceModel interface {
	IFedModel

	GetFedNamespace() (*SFedNamespace, error)
}

type IFedNamespaceResAPI

type IFedNamespaceResAPI interface {
	// StartAttachClusterTask start background task to attach fedreated namespace resource to cluster
	StartAttachClusterTask(obj IFedNamespaceModel, ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error
}

type IFedResAPI

type IFedResAPI interface {
	ClusterScope() IFedClusterResAPI
	NamespaceScope() IFedNamespaceResAPI
	JointResAPI() IFedJointResAPI

	// GetJointModel fetch federated related joint object
	GetJointModel(obj IFedModel, clusterId string) (IFedJointClusterModel, error)
	// IsAttach2Cluster check federated object is attach to specified cluster
	IsAttach2Cluster(obj IFedModel, clusterId string) (bool, error)
	// GetAttachedClusters fetch clusters attached to current federated object
	GetAttachedClusters(obj IFedModel) ([]SCluster, error)

	// PerformAttachCluster sync federated template object to cluster
	PerformAttachCluster(obj IFedModel, ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) (IFedJointClusterModel, error)

	// JustAttachCluster just create joint model
	JustAttachCluster(obj IFedModel, ctx context.Context, userCred mcclient.TokenCredential, clusterId string) (IFedJointClusterModel, error)

	// PerformSyncCluster sync resource to cluster
	PerformSyncCluster(obj IFedModel, ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) error

	// PerformDetachCluster delete federated releated object inside cluster
	PerformDetachCluster(obj IFedModel, ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) error

	// StartUpdateTask called when federated object post update
	StartUpdateTask(obj IFedModel, ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error
	// StartSyncTask sync federated object current template to attached clusters
	StartSyncTask(obj IFedModel, ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error
}

func GetFedResAPI

func GetFedResAPI() IFedResAPI

type IK8SUnstructuredModel

type IK8SUnstructuredModel interface {
	model.IK8sModel

	FillAPIObjectBySpec(rawObjSpec jsonutils.JSONObject, output IUnstructuredOutput) error
	FillAPIObjectByStatus(rawObjStatus jsonutils.JSONObject, output IUnstructuredOutput) error
}

type IK8sModelManager

type IK8sModelManager interface {
	lockman.ILockedClass
	object.IObject

	GetK8sResourceInfo() model.K8sResourceInfo
}

func GetOriginK8sModelManager

func GetOriginK8sModelManager(kindName string) IK8sModelManager

type IK8sOwnedResource

type IK8sOwnedResource interface {
	IsOwnedBy(ownerModel IClusterModel) (bool, error)
}

type IK8sSyncModel

type IK8sSyncModel interface {
	db.IModel

	SetSyncStatus(status string)
	SetLastSync(time.Time)
	SetLastSyncEndAt(time.Time)
	SetSyncMessage(msg string)
}

type IMachineDriver

type IMachineDriver interface {
	ValidateCreateData(s *mcclient.ClientSession, input *api.CreateMachineData) error

	GetProvider() api.ProviderType
	GetResourceType() api.MachineResourceType
	GetPrivateIP(s *mcclient.ClientSession, resourceId string) (string, error)
	GetEIP(s *mcclient.ClientSession, resourceId string) (string, error)
	UseClusterAPI() bool

	PostCreate(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, m *SMachine, data *jsonutils.JSONDict) error

	RequestPrepareMachine(ctx context.Context, userCred mcclient.TokenCredential, m *SMachine, task taskman.ITask) error
	PrepareResource(session *mcclient.ClientSession, m *SMachine, data *api.MachinePrepareInput) (jsonutils.JSONObject, error)
	PostPrepareResource(ctx context.Context, userCred mcclient.TokenCredential, m *SMachine, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

	ValidateDeleteCondition(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, m *SMachine) error
	TerminateResource(s *mcclient.ClientSession, m *SMachine) error

	// GetInfoFromCloud fetch machine concerned info from cloud
	GetInfoFromCloud(ctx context.Context, s *mcclient.ClientSession, m *SMachine) (*api.CloudMachineInfo, error)

	// NetworkAddress related interface
	ListNetworkAddress(ctx context.Context, s *mcclient.ClientSession, m *SMachine) ([]*computeapi.NetworkAddressDetails, error)
	AttachNetworkAddress(ctx context.Context, s *mcclient.ClientSession, m *SMachine, opt *api.MachineAttachNetworkAddressInput) error
	SyncNetworkAddress(ctx context.Context, s *mcclient.ClientSession, m *SMachine) error
}

func GetMachineDriver

func GetMachineDriver(provider api.ProviderType, resType api.MachineResourceType) IMachineDriver

type IMinioComponentManager

type IMinioComponentManager interface {
	GetHelmManager() HelmComponentManager
	CreateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
	GetHelmValues(cluster *SCluster, setting *api.ComponentSettings) (map[string]interface{}, error)
	UpdateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
	DeleteHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
}

type INamespaceModel

type INamespaceModel interface {
	IClusterModel

	GetNamespaceId() string
	GetNamespace() (*SNamespace, error)
	SetNamespace(userCred mcclient.TokenCredential, ns *SNamespace)
}

type INamespaceResAPI

type INamespaceResAPI interface {
}

type IPodOwnerModel

type IPodOwnerModel interface {
	IClusterModel

	GetRawPods(cli *client.ClusterManager, obj runtime.Object) ([]*v1.Pod, error)
}

type IReleaseDriver

type IReleaseDriver interface {
	GetType() api.RepoType
	ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, data *api.ReleaseCreateInput) (*api.ReleaseCreateInput, error)
	CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, r *SRelease, data *api.ReleaseCreateInput) error
}

type IRepoDriver

type IRepoDriver interface {
	GetBackend() api.RepoBackend

	ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *api.RepoCreateInput) (*api.RepoCreateInput, error)

	UploadChart(ctx context.Context, userCred mcclient.TokenCredential, repo *SRepo, chartName, chartPath string) (jsonutils.JSONObject, error)
}

func GetRepoDriver

func GetRepoDriver(backend api.RepoBackend) (IRepoDriver, error)

type IRoleBaseManager

type IRoleBaseManager interface {
	db.IModelManager
	GetRoleKind() string
}

type ISecretDriver

type ISecretDriver interface {
	ValidateCreateData(input *api.SecretCreateInput) error
	ToData(input *api.SecretCreateInput) (map[string]string, error)
}

type IServiceOwnerModel

type IServiceOwnerModel interface {
	IClusterModel

	GetRawServices(cli *client.ClusterManager, obj runtime.Object) ([]*v1.Service, error)
}

type IStorageClassDriver

type IStorageClassDriver interface {
	ConnectionTest(userCred mcclient.TokenCredential, cli *client.ClusterManager, input *api.StorageClassCreateInput) (*api.StorageClassTestResult, error)
	ValidateCreateData(userCred mcclient.TokenCredential, cli *client.ClusterManager, input *api.StorageClassCreateInput) (*api.StorageClassCreateInput, error)
	ToStorageClassParams(input *api.StorageClassCreateInput) (map[string]string, error)
}

type ISyncableManager

type ISyncableManager interface {
	IClusterModelManager
	// GetSubManagers return sub resource manager
	GetSubManagers() []ISyncableManager
	// PurgeAllByCluster invoke when cluster deleted
	PurgeAllByCluster(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster) error
}

func NewK8sModelManager

func NewK8sModelManager(factoryF func() ISyncableManager) ISyncableManager

func NewK8sNamespaceModelManager

func NewK8sNamespaceModelManager(factoryF func() ISyncableManager) ISyncableManager

type IUnstructuredOutput

type IUnstructuredOutput interface {
	SetObjectMeta(meta api.ObjectMeta) *api.ObjectTypeMeta
	SetTypeMeta(meta api.TypeMeta) *api.ObjectTypeMeta
}

type K8SComponentManager

type K8SComponentManager struct{}

func (K8SComponentManager) EnsureNamespace

func (m K8SComponentManager) EnsureNamespace(cluster *SCluster, namespace string) error

func (K8SComponentManager) KubectlApply

func (m K8SComponentManager) KubectlApply(cluster *SCluster, manifest string) error

func (K8SComponentManager) KubectlDelete

func (m K8SComponentManager) KubectlDelete(cluster *SCluster, manifest string) error

func (K8SComponentManager) NewKubectl

func (m K8SComponentManager) NewKubectl(cluster *SCluster) (*cmd.Client, error)

type SAnsiblePlaybook

type SAnsiblePlaybook struct {
	model.SK8sNamespaceResourceBase
	UnstructuredResourceBase
}

func (*SAnsiblePlaybook) FillAPIObjectBySpec

func (obj *SAnsiblePlaybook) FillAPIObjectBySpec(specObj jsonutils.JSONObject, out IUnstructuredOutput) error

func (*SAnsiblePlaybook) FillAPIObjectByStatus

func (obj *SAnsiblePlaybook) FillAPIObjectByStatus(statusObj jsonutils.JSONObject, out IUnstructuredOutput) error

func (*SAnsiblePlaybook) GetAPIObject

func (obj *SAnsiblePlaybook) GetAPIObject() (*api.AnsiblePlaybook, error)

type SAnsiblePlaybookManager

type SAnsiblePlaybookManager struct {
	model.SK8sNamespaceResourceBaseManager
}

func GetAnsiblePlaybookManager

func GetAnsiblePlaybookManager() *SAnsiblePlaybookManager

func (*SAnsiblePlaybookManager) GetK8sResourceInfo

func (m *SAnsiblePlaybookManager) GetK8sResourceInfo() model.K8sResourceInfo

type SAnsiblePlaybookTemplate

type SAnsiblePlaybookTemplate struct {
	model.SK8sNamespaceResourceBase
	UnstructuredResourceBase
}

func (*SAnsiblePlaybookTemplate) FillAPIObjectBySpec

func (obj *SAnsiblePlaybookTemplate) FillAPIObjectBySpec(specObj jsonutils.JSONObject, out IUnstructuredOutput) error

func (*SAnsiblePlaybookTemplate) FillAPIObjectByStatus

func (obj *SAnsiblePlaybookTemplate) FillAPIObjectByStatus(statusObj jsonutils.JSONObject, out IUnstructuredOutput) error

func (*SAnsiblePlaybookTemplate) GetAPIObject

type SAnsiblePlaybookTemplateManager

type SAnsiblePlaybookTemplateManager struct {
	model.SK8sNamespaceResourceBaseManager
}

func GetAnsiblePlaybookTemplateManager

func GetAnsiblePlaybookTemplateManager() *SAnsiblePlaybookTemplateManager

func (*SAnsiblePlaybookTemplateManager) GetK8sResourceInfo

func (m *SAnsiblePlaybookTemplateManager) GetK8sResourceInfo() model.K8sResourceInfo

type SCephCSIComponent

type SCephCSIComponent struct {
	SComponent
}

type SCephCSIComponentManager

type SCephCSIComponentManager struct {
	SComponentManager
	K8SComponentManager
}
var (
	CephCSIComponentManager *SCephCSIComponentManager
)

func NewCephCSIComponentManager

func NewCephCSIComponentManager() *SCephCSIComponentManager

func (*SCephCSIComponentManager) ApplyK8sResource

func (m *SCephCSIComponentManager) ApplyK8sResource(cluster *SCluster, setting *api.ComponentSettings) error

func (*SCephCSIComponentManager) DeleteK8sResource

func (m *SCephCSIComponentManager) DeleteK8sResource(cluster *SCluster, setting *api.ComponentSettings) error

type SCluster

type SCluster struct {
	db.SStatusDomainLevelResourceBase
	SSyncableK8sBaseResource

	// external imported cluster CloudregionId and VpcId is null
	CloudregionId          string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"cloudregion_id"`
	VpcId                  string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" json:"vpc_id"`
	ExternalClusterId      string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional" update:"admin" json:"external_cluster_id"`
	ExternalCloudClusterId string `width:"256" charset:"utf8" nullable:"true" list:"user" create:"optional" update:"admin" json:"external_cloud_cluster_id"`
	ManagerId              string `width:"128" charset:"ascii" nullable:"true" list:"user" create:"optional"`

	IsSystem bool `nullable:"true" default:"false" list:"admin" create:"optional" json:"is_system"`

	ClusterType     string               `width:"36" charset:"ascii" nullable:"false" create:"required" list:"user"`
	ResourceType    string               `width:"36" charset:"ascii" nullable:"false" create:"required" list:"user"`
	Mode            string               `width:"36" charset:"ascii" nullable:"false" create:"required" list:"user"`
	Provider        string               `width:"36" charset:"ascii" nullable:"false" create:"required" list:"user"`
	ServiceCidr     string               `width:"36" charset:"ascii" nullable:"false" create:"required" list:"user"`
	ServiceDomain   string               `width:"128" charset:"ascii" nullable:"false" create:"required" list:"user"`
	PodCidr         string               `width:"36" charset:"ascii" nullable:"true" create:"optional" list:"user"`
	Ha              tristate.TriState    `nullable:"true" create:"optional" list:"user"`
	ImageRepository jsonutils.JSONObject `nullable:"true" create:"optional" list:"user"`

	// kubernetes config
	Kubeconfig string `length:"long" nullable:"true" charset:"utf8" create:"optional"`
	Ca         string `length:"long" charset:"utf8" create:"optional"`
	CaKey      string `length:"long" charset:"utf8" create:"optional"`
	// kubernetes api server endpoint
	ApiServer string `width:"256" nullable:"true" charset:"ascii" create:"optional" list:"user"`

	// Version records kubernetes api server version
	Version string `width:"128" charset:"ascii" nullable:"false" create:"optional" list:"user"`
	// kubernetes distribution
	Distribution string `width:"256" nullable:"true" default:"k8s" charset:"utf8" create:"optional" list:"user"`
	// DistributionInfo records distribution misc info
	DistributionInfo jsonutils.JSONObject `nullable:"true" create:"optional" list:"user"`
	// AddonsConfig records cluster addons config
	AddonsConfig jsonutils.JSONObject `nullable:"true" create:"optional" list:"user"`

	// ExtraConfig records others config
	ExtraConfig jsonutils.JSONObject `nullable:"true" create:"optional" list:"user"`
}

func GetClusterById

func GetClusterById(id string) (*SCluster, error)

func GetFedRunningCluster

func GetFedRunningCluster(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) ([]SCluster, error)

func (*SCluster) AllowGetDetailsComponentSetting

func (c *SCluster) AllowGetDetailsComponentSetting(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SCluster) AllowGetDetailsComponentsStatus

func (c *SCluster) AllowGetDetailsComponentsStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SCluster) AllowGetDetailsKubeconfig

func (c *SCluster) AllowGetDetailsKubeconfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SCluster) AllowPerformAddMachines

func (c *SCluster) AllowPerformAddMachines(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SCluster) AllowPerformApplyAddons

func (c *SCluster) AllowPerformApplyAddons(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SCluster) AllowPerformDeleteComponent

func (c *SCluster) AllowPerformDeleteComponent(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SCluster) AllowPerformDeleteMachines

func (c *SCluster) AllowPerformDeleteMachines(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SCluster) AllowPerformDisableComponent

func (c *SCluster) AllowPerformDisableComponent(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SCluster) AllowPerformEnableComponent

func (c *SCluster) AllowPerformEnableComponent(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SCluster) AllowPerformPurge

func (c *SCluster) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SCluster) AllowPerformSync

func (c *SCluster) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SCluster) AllowPerformSyncstatus

func (c *SCluster) AllowPerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SCluster) AllowPerformUpdateComponent

func (c *SCluster) AllowPerformUpdateComponent(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SCluster) CheckPVCEmpty

func (c *SCluster) CheckPVCEmpty() error

func (*SCluster) CreateMachines

func (c *SCluster) CreateMachines(ctx context.Context, userCred mcclient.TokenCredential, ms []*api.CreateMachineData, task taskman.ITask) error

func (*SCluster) CustomizeCreate

func (cluster *SCluster) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SCluster) CustomizeDelete

func (c *SCluster) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SCluster) Delete

func (c *SCluster) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCluster) DeleteAllComponents

func (c *SCluster) DeleteAllComponents(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCluster) DisableBidirectionalSync

func (c *SCluster) DisableBidirectionalSync() error

func (*SCluster) EnableBidirectionalSync

func (c *SCluster) EnableBidirectionalSync() error

func (*SCluster) EnableComponent

func (c *SCluster) EnableComponent(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	input *api.ComponentCreateInput) error

func (*SCluster) FillMachinePrepareInput

func (c *SCluster) FillMachinePrepareInput(input *api.MachinePrepareInput) (*api.MachinePrepareInput, error)

func (*SCluster) GetAPIServer

func (c *SCluster) GetAPIServer() (string, error)

func (*SCluster) GetAPIServerInternalEndpoint

func (c *SCluster) GetAPIServerInternalEndpoint() (string, error)

TODO: support use loadbalancer

func (*SCluster) GetAPIServerPublicEndpoint

func (c *SCluster) GetAPIServerPublicEndpoint() (string, error)

func (*SCluster) GetAddonsConfig

func (cluster *SCluster) GetAddonsConfig() (*api.ClusterAddonsManifestConfig, error)

func (*SCluster) GetAdminKubeconfig

func (c *SCluster) GetAdminKubeconfig() (string, error)

func (*SCluster) GetCAKeyPair

func (c *SCluster) GetCAKeyPair() (*api.KeyPair, error)

func (*SCluster) GetClientV2

func (c *SCluster) GetClientV2() (*clientv2.Client, error)

func (*SCluster) GetClusterComponents

func (c *SCluster) GetClusterComponents() ([]SClusterComponent, error)

func (*SCluster) GetComponentByType

func (c *SCluster) GetComponentByType(cType string) (*SComponent, error)

func (*SCluster) GetComponentByTypeNoError

func (c *SCluster) GetComponentByTypeNoError(cType string) (*SComponent, error)

func (*SCluster) GetComponents

func (c *SCluster) GetComponents() ([]*SComponent, error)

func (*SCluster) GetComponentsStatus

func (c *SCluster) GetComponentsStatus() (*api.ComponentsStatus, error)

func (*SCluster) GetControlPlaneUrl

func (c *SCluster) GetControlPlaneUrl() (string, error)

func (*SCluster) GetControlplaneMachines

func (c *SCluster) GetControlplaneMachines() ([]manager.IMachine, error)

func (*SCluster) GetDefaultMachineDockerConfig

func (c *SCluster) GetDefaultMachineDockerConfig(imageRepo *api.ImageRepository) (*api.DockerConfig, error)

func (*SCluster) GetDeployMachines

func (c *SCluster) GetDeployMachines(includeMs []manager.IMachine) ([]manager.IMachine, error)

func (*SCluster) GetDetailsAddons

func (c *SCluster) GetDetailsAddons(ctx context.Context, userCred mcclient.TokenCredential, query api.ClusterGetAddonsInput) (jsonutils.JSONObject, error)

func (*SCluster) GetDetailsApiResources

func (c *SCluster) GetDetailsApiResources(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.ClusterAPIGroupResources, error)

func (*SCluster) GetDetailsClusterUserGroups

func (c *SCluster) GetDetailsClusterUserGroups(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.ClusterUserGroups, error)

func (*SCluster) GetDetailsClusterUsers

func (c *SCluster) GetDetailsClusterUsers(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.ClusterUsers, error)

func (*SCluster) GetDetailsComponentSetting

func (c *SCluster) GetDetailsComponentSetting(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCluster) GetDetailsComponentsStatus

func (c *SCluster) GetDetailsComponentsStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*api.ComponentsStatus, error)

func (*SCluster) GetDetailsExtraConfig

func (c *SCluster) GetDetailsExtraConfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCluster) GetDetailsKubeconfig

func (c *SCluster) GetDetailsKubeconfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCluster) GetDetailsKubesprayConfig

func (c *SCluster) GetDetailsKubesprayConfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*api.ClusterKubesprayConfig, error)

func (*SCluster) GetDistributionInfo

func (cluster *SCluster) GetDistributionInfo() (*api.ClusterDistributionInfo, error)

func (*SCluster) GetDriver

func (c *SCluster) GetDriver() IClusterDriver

func (*SCluster) GetExtraConfig

func (cluster *SCluster) GetExtraConfig() (*api.ClusterExtraConfig, error)

func (*SCluster) GetImageRepository

func (c *SCluster) GetImageRepository() (*api.ImageRepository, error)

func (*SCluster) GetK8sClient

func (c *SCluster) GetK8sClient() (*kubernetes.Clientset, error)

func (*SCluster) GetK8sClientConfig

func (c *SCluster) GetK8sClientConfig(kubeConfig []byte) (*rest.Config, error)

func (*SCluster) GetK8sResourceManager

func (c *SCluster) GetK8sResourceManager(kindName string) manager.IK8sResourceManager

func (*SCluster) GetK8sRestConfig

func (c *SCluster) GetK8sRestConfig() (*rest.Config, error)

func (*SCluster) GetKubeconfig

func (c *SCluster) GetKubeconfig() (string, error)

func (*SCluster) GetKubeconfigByCerts

func (c *SCluster) GetKubeconfigByCerts() (string, error)

func (*SCluster) GetMachineByName

func (c *SCluster) GetMachineByName(name string) (*SMachine, error)

func (*SCluster) GetMachines

func (c *SCluster) GetMachines() ([]manager.IMachine, error)

func (*SCluster) GetMachinesByRole

func (c *SCluster) GetMachinesByRole(role string) ([]manager.IMachine, error)

func (*SCluster) GetMachinesCount

func (c *SCluster) GetMachinesCount() (int, error)

func (*SCluster) GetMode

func (c *SCluster) GetMode() api.ModeType

func (*SCluster) GetNodesCount

func (c *SCluster) GetNodesCount() (int, error)

func (*SCluster) GetPVCCount

func (c *SCluster) GetPVCCount() (int, error)

func (*SCluster) GetPodCidr

func (c *SCluster) GetPodCidr() string

func (*SCluster) GetRemoteClient

func (c *SCluster) GetRemoteClient() (*client.ClusterManager, error)

GetRemoteClient get remote kubernetes wrapped client

func (*SCluster) GetRunningControlplaneMachine

func (c *SCluster) GetRunningControlplaneMachine() (manager.IMachine, error)

func (*SCluster) GetServiceCidr

func (c *SCluster) GetServiceCidr() string

func (*SCluster) GetServiceDomain

func (c *SCluster) GetServiceDomain() string

func (*SCluster) GetVersion

func (c *SCluster) GetVersion() string

func (*SCluster) IsHealthy

func (c *SCluster) IsHealthy() error

func (*SCluster) IsImported

func (c *SCluster) IsImported() bool

func (*SCluster) IsInClassicNetwork

func (c *SCluster) IsInClassicNetwork() bool

func (*SCluster) IsSystemCluster

func (c *SCluster) IsSystemCluster() bool

func (*SCluster) LogPrefix

func (c *SCluster) LogPrefix() string

func (*SCluster) NeedControlplane

func (c *SCluster) NeedControlplane() (bool, error)

func (*SCluster) PerformAddMachines

func (c *SCluster) PerformAddMachines(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCluster) PerformApplyAddons

func (c *SCluster) PerformApplyAddons(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCluster) PerformClientDelete

func (c *SCluster) PerformClientDelete(ctx context.Context, userCred mcclient.TokenCredential, query, input api.ClusterPurgeInput) (jsonutils.JSONObject, error)

func (*SCluster) PerformDeleteComponent

func (c *SCluster) PerformDeleteComponent(ctx context.Context, userCred mcclient.TokenCredential, query, input *api.ComponentDeleteInput) (jsonutils.JSONObject, error)

func (*SCluster) PerformDeleteMachines

func (c *SCluster) PerformDeleteMachines(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCluster) PerformDeploy

func (c *SCluster) PerformDeploy(ctx context.Context, userCred mcclient.TokenCredential, query, input *api.ClusterDeployInput) (jsonutils.JSONObject, error)

func (*SCluster) PerformDisableComponent

func (c *SCluster) PerformDisableComponent(ctx context.Context, userCred mcclient.TokenCredential, query, input api.ComponentDeleteInput) (jsonutils.JSONObject, error)

func (*SCluster) PerformEnableComponent

func (c *SCluster) PerformEnableComponent(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.ComponentCreateInput) (jsonutils.JSONObject, error)

func (*SCluster) PerformPurge

func (c *SCluster) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query, input api.ClusterPurgeInput) (jsonutils.JSONObject, error)

func (*SCluster) PerformSetExtraConfig

func (c *SCluster) PerformSetExtraConfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *api.ClusterExtraConfig) (jsonutils.JSONObject, error)

func (*SCluster) PerformSetKubeconfig

func (c *SCluster) PerformSetKubeconfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ClusterSetKubeconfig) (jsonutils.JSONObject, error)

func (*SCluster) PerformSync

func (*SCluster) PerformSyncstatus

func (c *SCluster) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCluster) PerformUpdateComponent

func (c *SCluster) PerformUpdateComponent(ctx context.Context, userCred mcclient.TokenCredential, query, input *api.ComponentUpdateInput) (jsonutils.JSONObject, error)

func (*SCluster) PostCreate

func (*SCluster) PurgeAllClusterResource

func (c *SCluster) PurgeAllClusterResource(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCluster) PurgeAllFedResource

func (c *SCluster) PurgeAllFedResource(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCluster) ReRunDeployingComponents

func (c *SCluster) ReRunDeployingComponents() error

func (*SCluster) RealDelete

func (c *SCluster) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCluster) SetAPIServer

func (c *SCluster) SetAPIServer(apiServer string) error

func (*SCluster) SetCAKeyPair

func (c *SCluster) SetCAKeyPair(kp *api.KeyPair) error

func (*SCluster) SetK8sVersion

func (c *SCluster) SetK8sVersion(ctx context.Context, version string) error

func (*SCluster) SetKubeconfig

func (c *SCluster) SetKubeconfig(kubeconfig string) error

func (*SCluster) StartApplyAddonsTask

func (c *SCluster) StartApplyAddonsTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SCluster) StartClusterCreateTask

func (c *SCluster) StartClusterCreateTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SCluster) StartClusterDeleteTask

func (c *SCluster) StartClusterDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SCluster) StartCreateMachinesTask

func (c *SCluster) StartCreateMachinesTask(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	action api.ClusterDeployAction,
	machines []*api.CreateMachineData,
	parentTaskId string) error

StartCreateMachinesTask will create machines and deploy cluster by tool like kubespray

func (*SCluster) StartDeleteMachinesTask

func (c *SCluster) StartDeleteMachinesTask(ctx context.Context, userCred mcclient.TokenCredential, ms []manager.IMachine, data *jsonutils.JSONDict, parentTaskId string) error

func (*SCluster) StartDeployMachinesTask

func (c *SCluster) StartDeployMachinesTask(ctx context.Context, userCred mcclient.TokenCredential, action api.ClusterDeployAction, machineIds []string, parentTaskId string, skipDownloads bool) error

func (*SCluster) StartSyncStatus

func (c *SCluster) StartSyncStatus(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SCluster) StartSyncTask

func (c *SCluster) StartSyncTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentId string) error

func (*SCluster) SubmitSyncTask

func (c *SCluster) SubmitSyncTask(ctx context.Context, userCred mcclient.TokenCredential, waitChan chan error)

func (*SCluster) SyncCallSyncTask

func (c *SCluster) SyncCallSyncTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SCluster) SyncInfoFromCloud

func (c *SCluster) SyncInfoFromCloud(ctx context.Context, s *mcclient.ClientSession) error

func (*SCluster) SyncK8sMachinesConfig

func (c *SCluster) SyncK8sMachinesConfig(ctx context.Context, cred mcclient.TokenCredential) error

func (*SCluster) ValidateAddMachines

func (c *SCluster) ValidateAddMachines(ctx context.Context, userCred mcclient.TokenCredential, ms []api.CreateMachineData, checkCount bool) ([]*api.CreateMachineData, error)

func (*SCluster) ValidateDeleteCondition

func (c *SCluster) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

type SClusterComponent

type SClusterComponent struct {
	SClusterJointsBase

	ComponentId string `width:"36" charset:"ascii" create:"required" list:"user"`
}

+onecloud:swagger-gen-ignore

func (*SClusterComponent) Delete

func (joint *SClusterComponent) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SClusterComponent) Detach

func (joint *SClusterComponent) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SClusterComponent) DoSave

func (joint *SClusterComponent) DoSave(ctx context.Context) error

func (*SClusterComponent) GetComponent

func (joint *SClusterComponent) GetComponent() (*SComponent, error)

func (*SClusterComponent) Master

func (joint *SClusterComponent) Master() db.IStandaloneModel

func (*SClusterComponent) Slave

func (joint *SClusterComponent) Slave() db.IStandaloneModel

type SClusterComponentManager

type SClusterComponentManager struct {
	SClusterJointsManager
}
var ClusterComponentManager *SClusterComponentManager

func GetClusterComponentManager

func GetClusterComponentManager() *SClusterComponentManager

func (*SClusterComponentManager) AllowCreateItem

func (*SClusterComponentManager) GetByComponent

func (m *SClusterComponentManager) GetByComponent(componentId string) ([]SClusterComponent, error)

func (*SClusterComponentManager) GetComponentsByCluster

func (m *SClusterComponentManager) GetComponentsByCluster(clusterId string) ([]SComponent, error)

func (*SClusterComponentManager) GetMasterFieldName

func (joint *SClusterComponentManager) GetMasterFieldName() string

func (*SClusterComponentManager) GetSlaveFieldName

func (joint *SClusterComponentManager) GetSlaveFieldName() string

type SClusterJointsBase

type SClusterJointsBase struct {
	db.SJointResourceBase

	ClusterId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`
}

func (*SClusterJointsBase) GetCluster

func (s *SClusterJointsBase) GetCluster() *SCluster

type SClusterJointsManager

type SClusterJointsManager struct {
	db.SJointResourceBaseManager
}

func NewClusterJointsManager

func NewClusterJointsManager(dt interface{}, tableName string, keyword string, keywordPlural string, slave db.IVirtualModelManager) SClusterJointsManager

type SClusterManager

+onecloud:swagger-gen-model-singular=kubecluster

var ClusterManager *SClusterManager

func GetClusterManager

func GetClusterManager() *SClusterManager

func (*SClusterManager) AllowGetPropertyK8sVersions

func (m *SClusterManager) AllowGetPropertyK8sVersions(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SClusterManager) AllowPerformCheckSystemReady

func (m *SClusterManager) AllowPerformCheckSystemReady(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SClusterManager) AllowPerformPreCheck

func (m *SClusterManager) AllowPerformPreCheck(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SClusterManager) ClusterHealthCheckTask

func (m *SClusterManager) ClusterHealthCheckTask(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SClusterManager) CreateCluster

func (*SClusterManager) FetchClusterByIdOrName

func (m *SClusterManager) FetchClusterByIdOrName(ctx context.Context, userCred mcclient.TokenCredential, id string) (manager.ICluster, error)

func (*SClusterManager) FetchCustomizeColumns

func (m *SClusterManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []*jsonutils.JSONDict

func (*SClusterManager) FilterByHiddenSystemAttributes

func (m *SClusterManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacscope.TRbacScope) *sqlchemy.SQuery

func (*SClusterManager) GetAllowedControlplanceCount

func (c *SClusterManager) GetAllowedControlplanceCount() []int

func (*SClusterManager) GetCluster

func (m *SClusterManager) GetCluster(id string) (*SCluster, error)

func (*SClusterManager) GetClusterByIdOrName

func (m *SClusterManager) GetClusterByIdOrName(ctx context.Context, userCred mcclient.TokenCredential, id string) (*SCluster, error)

func (*SClusterManager) GetClusters

func (m *SClusterManager) GetClusters() ([]manager.ICluster, error)

func (*SClusterManager) GetClustersByStatus

func (m *SClusterManager) GetClustersByStatus(status ...string) ([]manager.ICluster, error)

func (*SClusterManager) GetDriverByQuery

func (m *SClusterManager) GetDriverByQuery(query jsonutils.JSONObject) (IClusterDriver, error)

func (*SClusterManager) GetImageRepository

func (man *SClusterManager) GetImageRepository(input *api.ImageRepository) *api.ImageRepository

func (*SClusterManager) GetPropertyK8sVersions

func (m *SClusterManager) GetPropertyK8sVersions(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SClusterManager) GetPropertyUsableInstances

func (m *SClusterManager) GetPropertyUsableInstances(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SClusterManager) GetRegistryUrlByRepoUrl

func (man *SClusterManager) GetRegistryUrlByRepoUrl(imageRepo string) (string, error)

func (*SClusterManager) GetRunningClusters

func (m *SClusterManager) GetRunningClusters() ([]manager.ICluster, error)

func (*SClusterManager) GetSession

func (m *SClusterManager) GetSession() (*mcclient.ClientSession, error)

func (*SClusterManager) GetSystemCluster

func (m *SClusterManager) GetSystemCluster() (*SCluster, error)

func (*SClusterManager) GetSystemClusterConfig

func (m *SClusterManager) GetSystemClusterConfig() (*rest.Config, error)

func (*SClusterManager) GetSystemClusterCreateData

func (m *SClusterManager) GetSystemClusterCreateData() (*api.ClusterCreateInput, error)

func (*SClusterManager) GetSystemClusterK8SInfo

func (m *SClusterManager) GetSystemClusterK8SInfo() (*k8sInfo, error)

func (*SClusterManager) GetSystemClusterKubeconfig

func (m *SClusterManager) GetSystemClusterKubeconfig(apiServer string, cfg *rest.Config) (string, error)

func (*SClusterManager) InitializeData

func (m *SClusterManager) InitializeData() error

func (*SClusterManager) IsClusterExists

func (m *SClusterManager) IsClusterExists(ctx context.Context, userCred mcclient.TokenCredential, id string) (manager.ICluster, bool, error)

func (*SClusterManager) IsSystemClusterReady

func (m *SClusterManager) IsSystemClusterReady() (bool, error)

func (*SClusterManager) ListItemFilter

func (m *SClusterManager) ListItemFilter(
	ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input *api.ClusterListInput,
) (*sqlchemy.SQuery, error)

func (*SClusterManager) PerformCheckSystemReady

func (m *SClusterManager) PerformCheckSystemReady(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SClusterManager) PerformGc

PerformGC cleanup clusters related orphan resources

func (*SClusterManager) PerformPreCheck

func (m *SClusterManager) PerformPreCheck(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (*api.ClusterPreCheckResp, error)

func (*SClusterManager) RegisterSystemCluster

func (m *SClusterManager) RegisterSystemCluster() error

func (*SClusterManager) StartAutoSyncTask

func (m *SClusterManager) StartAutoSyncTask(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (*SClusterManager) SyncClustersFromCloud

func (m *SClusterManager) SyncClustersFromCloud(ctx context.Context) error

func (*SClusterManager) Usage

func (m *SClusterManager) Usage(scope rbacscope.TRbacScope, ownerId mcclient.IIdentityProvider, isSystem bool) (*api.ClusterUsage, error)

func (*SClusterManager) ValidateCreateData

func (*SClusterManager) ValidateResourceType

func (m *SClusterManager) ValidateResourceType(resType string) error

func (*SClusterManager) WaitFullSynced

func (m *SClusterManager) WaitFullSynced() error

type SClusterResourceBase

type SClusterResourceBase struct {
	db.SStatusDomainLevelResourceBase
	db.SExternalizedResourceBase

	ClusterId string `width:"36" charset:"ascii" nullable:"false" index:"true" list:"user"`
	// ResourceVersion is k8s remote object resourceVersion
	ResourceVersion string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SClusterResourceBase) AllowGetDetailsRawdata

func (res *SClusterResourceBase) AllowGetDetailsRawdata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SClusterResourceBase) AllowPerformPurge

func (res *SClusterResourceBase) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SClusterResourceBase) AllowUpdateRawdata

func (res *SClusterResourceBase) AllowUpdateRawdata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SClusterResourceBase) CustomizeCreate

func (*SClusterResourceBase) Delete

func (*SClusterResourceBase) DeleteRemoteObject

func (obj *SClusterResourceBase) DeleteRemoteObject() error

func (*SClusterResourceBase) GetCluster

func (res *SClusterResourceBase) GetCluster() (*SCluster, error)

func (*SClusterResourceBase) GetClusterClient

func (res *SClusterResourceBase) GetClusterClient() (*client.ClusterManager, error)

func (*SClusterResourceBase) GetClusterId

func (obj *SClusterResourceBase) GetClusterId() string

func (*SClusterResourceBase) GetClusterModelManager

func (obj *SClusterResourceBase) GetClusterModelManager() IClusterModelManager

func (*SClusterResourceBase) GetDetails

func (obj *SClusterResourceBase) GetDetails(
	ctx context.Context,
	cli *client.ClusterManager,
	base interface{},
	k8sObj runtime.Object,
	isList bool,
) interface{}

func (*SClusterResourceBase) GetDetailsRawdata

func (SClusterResourceBase) GetDomainId

func (res SClusterResourceBase) GetDomainId() string

func (*SClusterResourceBase) GetExtraDetails

func (res *SClusterResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.ClusterResourceDetail, error)

GetExtraDetails is deprecated

func (*SClusterResourceBase) GetK8sObject

func (obj *SClusterResourceBase) GetK8sObject() (runtime.Object, error)

func (SClusterResourceBase) GetObjectMeta

func (res SClusterResourceBase) GetObjectMeta() (api.ObjectMeta, error)

func (*SClusterResourceBase) GetRemoteObject

func (obj *SClusterResourceBase) GetRemoteObject() (interface{}, error)

func (*SClusterResourceBase) GetUniqValues

func (r *SClusterResourceBase) GetUniqValues() jsonutils.JSONObject

func (*SClusterResourceBase) LogPrefix

func (obj *SClusterResourceBase) LogPrefix() string

func (*SClusterResourceBase) NewRemoteObjectForUpdate

func (res *SClusterResourceBase) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)

func (*SClusterResourceBase) PerformPurge

func (res *SClusterResourceBase) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SClusterResourceBase) PostCreate

func (*SClusterResourceBase) PostDelete

func (res *SClusterResourceBase) PostDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SClusterResourceBase) PostUpdate

func (*SClusterResourceBase) RealDelete

func (obj *SClusterResourceBase) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SClusterResourceBase) SetCluster

func (res *SClusterResourceBase) SetCluster(userCred mcclient.TokenCredential, cls *SCluster)

func (*SClusterResourceBase) SetName

func (obj *SClusterResourceBase) SetName(name string)

func (*SClusterResourceBase) SetStatusByRemoteObject

func (obj *SClusterResourceBase) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

func (*SClusterResourceBase) StartCreateTask

func (_ *SClusterResourceBase) StartCreateTask(resObj IClusterModel, ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, data *jsonutils.JSONDict, parentId string) error

func (*SClusterResourceBase) StartDeleteTask

func (_ *SClusterResourceBase) StartDeleteTask(resObj IClusterModel, ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentId string) error

func (*SClusterResourceBase) StartUpdateTask

func (_ *SClusterResourceBase) StartUpdateTask(resObj IClusterModel, ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentId string) error

func (*SClusterResourceBase) UpdateFromRemoteObject

func (obj *SClusterResourceBase) UpdateFromRemoteObject(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	extObj interface{}) error

func (*SClusterResourceBase) UpdateRawdata

func (*SClusterResourceBase) UpdateRemoteObject

func (obj *SClusterResourceBase) UpdateRemoteObject(remoteObj interface{}) (interface{}, error)

func (*SClusterResourceBase) ValidateUpdateData

type SClusterResourceBaseManager

type SClusterResourceBaseManager struct {
	db.SStatusDomainLevelResourceBaseManager
	db.SExternalizedResourceBaseManager

	SK8sOwnedResourceBaseManager

	*SSyncableManager
	// contains filtered or unexported fields
}

+onecloud:swagger-gen-ignore

func NewClusterResourceBaseManager

func NewClusterResourceBaseManager(
	dt interface{},
	tableName string,
	keyword string,
	keywordPlural string,
	resName string,
	groupName string,
	versionName string,
	kind string,
	object runtime.Object) SClusterResourceBaseManager

func (*SClusterResourceBaseManager) CreateRemoteObject

func (m *SClusterResourceBaseManager) CreateRemoteObject(_ IClusterModel, cli *client.ClusterManager, obj interface{}) (interface{}, error)

func (*SClusterResourceBaseManager) FetchCustomizeColumns

func (m *SClusterResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []interface{}

func (*SClusterResourceBaseManager) FetchUniqValues

func (*SClusterResourceBaseManager) FilterBySystemAttributes

func (*SClusterResourceBaseManager) FilterByUniqValues

func (m *SClusterResourceBaseManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery

func (*SClusterResourceBaseManager) GetByIdOrName

func (m *SClusterResourceBaseManager) GetByIdOrName(userCred mcclient.IIdentityProvider, clusterId string, resId string) (IClusterModel, error)

func (*SClusterResourceBaseManager) GetByName

func (m *SClusterResourceBaseManager) GetByName(userCred mcclient.IIdentityProvider, clusterId string, resId string) (IClusterModel, error)

func (*SClusterResourceBaseManager) GetClusterModelManager

func (m *SClusterResourceBaseManager) GetClusterModelManager() IClusterModelManager

func (*SClusterResourceBaseManager) GetGCQuery

func (m *SClusterResourceBaseManager) GetGCQuery() *sqlchemy.SQuery

func (SClusterResourceBaseManager) GetK8sResourceInfo

func (m SClusterResourceBaseManager) GetK8sResourceInfo() model.K8sResourceInfo

func (SClusterResourceBaseManager) GetOwnerModel

func (_ SClusterResourceBaseManager) GetOwnerModel(userCred mcclient.TokenCredential, manager model.IModelManager, cluster model.ICluster, namespace string, name string) (model.IOwnerModel, error)

func (*SClusterResourceBaseManager) GetRemoteObjectGlobalId

func (m *SClusterResourceBaseManager) GetRemoteObjectGlobalId(cluster *SCluster, obj interface{}) string

func (*SClusterResourceBaseManager) InitOwnedManager

func (m *SClusterResourceBaseManager) InitOwnedManager(man IClusterModelManager)

func (SClusterResourceBaseManager) IsNamespaceScope

func (m SClusterResourceBaseManager) IsNamespaceScope() bool

func (*SClusterResourceBaseManager) IsRemoteObjectLocalExist

func (m *SClusterResourceBaseManager) IsRemoteObjectLocalExist(userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, bool, error)

func (*SClusterResourceBaseManager) ListItemFilter

func (*SClusterResourceBaseManager) ListRemoteObjects

func (m *SClusterResourceBaseManager) ListRemoteObjects(clsCli *client.ClusterManager) ([]interface{}, error)

func (*SClusterResourceBaseManager) NewFromRemoteObject

func (m *SClusterResourceBaseManager) NewFromRemoteObject(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	cluster *SCluster,
	obj interface{},
) (IClusterModel, error)

func (*SClusterResourceBaseManager) NewRemoteObjectForCreate

func (m *SClusterResourceBaseManager) NewRemoteObjectForCreate(_ IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SClusterResourceBaseManager) OnRemoteObjectCreate

func (m *SClusterResourceBaseManager) OnRemoteObjectCreate(ctx context.Context, userCred mcclient.TokenCredential, cluster manager.ICluster, resMan manager.IK8sResourceManager, obj runtime.Object)

OnRemoteObjectCreate invoked when remote object created

func (*SClusterResourceBaseManager) OnRemoteObjectDelete

func (m *SClusterResourceBaseManager) OnRemoteObjectDelete(ctx context.Context, userCred mcclient.TokenCredential, cluster manager.ICluster, resMan manager.IK8sResourceManager, obj runtime.Object)

OnRemoteObjectDelete invoked when remote resource deleted

func (*SClusterResourceBaseManager) OnRemoteObjectUpdate

func (m *SClusterResourceBaseManager) OnRemoteObjectUpdate(ctx context.Context, userCred mcclient.TokenCredential, cluster manager.ICluster, resMan manager.IK8sResourceManager, _, newObj runtime.Object)

OnRemoteObjectUpdate invoked when remote resource updated

func (*SClusterResourceBaseManager) PurgeAllByCluster

func (m *SClusterResourceBaseManager) PurgeAllByCluster(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster) error

type SClusterRole

type SClusterRole struct {
	SClusterResourceBase
}

func (*SClusterRole) GetDetails

func (cr *SClusterRole) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SClusterRole) NewRemoteObjectForUpdate

func (obj *SClusterRole) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)

func (*SClusterRole) UpdateFromRemoteObject

func (cr *SClusterRole) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

type SClusterRoleBinding

type SClusterRoleBinding struct {
	SClusterResourceBase
}

func (*SClusterRoleBinding) CustomizeCreate

func (*SClusterRoleBinding) GetDetails

func (crb *SClusterRoleBinding) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SClusterRoleBinding) NewRemoteObjectForUpdate

func (crb *SClusterRoleBinding) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)

func (*SClusterRoleBinding) UpdateFromRemoteObject

func (crb *SClusterRoleBinding) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

type SClusterRoleBindingManager

type SClusterRoleBindingManager struct {
	SClusterResourceBaseManager
}

+onecloud:swagger-gen-model-singular=rbacclusterrolebinding +onecloud:swagger-gen-model-plural=rbacclusterrolebindings

func GetClusterRoleBindingManager

func GetClusterRoleBindingManager() *SClusterRoleBindingManager

func (*SClusterRoleBindingManager) ListItemFilter

func (*SClusterRoleBindingManager) NewFromRemoteObject

func (m *SClusterRoleBindingManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, error)

func (*SClusterRoleBindingManager) NewRemoteObjectForCreate

func (m *SClusterRoleBindingManager) NewRemoteObjectForCreate(obj IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SClusterRoleBindingManager) SyncResources

func (m *SClusterRoleBindingManager) SyncResources(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster) error

func (*SClusterRoleBindingManager) ValidateClusterRoleBinding

func (m *SClusterRoleBindingManager) ValidateClusterRoleBinding(crb *rbacv1.ClusterRoleBinding) error

type SClusterRoleManager

type SClusterRoleManager struct {
	SClusterResourceBaseManager
}

+onecloud:swagger-gen-model-singular=rbacclusterrole +onecloud:swagger-gen-model-plural=rbacclusterroles

func GetClusterRoleManager

func GetClusterRoleManager() *SClusterRoleManager

func (*SClusterRoleManager) GetRoleKind

func (m *SClusterRoleManager) GetRoleKind() string

func (*SClusterRoleManager) ListItemFilter

func (*SClusterRoleManager) NewFromRemoteObject

func (m *SClusterRoleManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, error)

func (*SClusterRoleManager) NewRemoteObjectForCreate

func (m *SClusterRoleManager) NewRemoteObjectForCreate(_ IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SClusterRoleManager) SyncResources

func (m *SClusterRoleManager) SyncResources(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster) error

func (*SClusterRoleManager) ValidateClusterRoleObject

func (m *SClusterRoleManager) ValidateClusterRoleObject(obj *rbacv1.ClusterRole) error

func (*SClusterRoleManager) ValidateCreateData

type SComponent

type SComponent struct {
	db.SVirtualResourceBase

	Enabled tristate.TriState `nullable:"false" default:"false" list:"user" create:"optional"`

	Type                  string               `width:"36" charset:"ascii" nullable:"false" create:"required" list:"user"`
	Settings              jsonutils.JSONObject `nullable:"false" list:"user" create:"optional" update:"user"`
	ApplyedConfigChecksum string               `width:"64" charset:"ascii" list:"user"`
}

+onecloud:swagger-gen-ignore

func (*SComponent) AllowPerformDisable

func (m *SComponent) AllowPerformDisable(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SComponent) AllowPerformEnable

func (m *SComponent) AllowPerformEnable(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SComponent) CustomizeCreate

func (m *SComponent) CustomizeCreate(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerId mcclient.IIdentityProvider,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject,
) error

func (*SComponent) DeleteWithJoint

func (m *SComponent) DeleteWithJoint(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SComponent) DoDelete

func (m *SComponent) DoDelete(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SComponent) DoDisable

func (m *SComponent) DoDisable(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SComponent) DoEnable

func (m *SComponent) DoEnable(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SComponent) DoUpdate

func (m *SComponent) DoUpdate(ctx context.Context, userCred mcclient.TokenCredential, input *api.ComponentUpdateInput) error

func (*SComponent) FetchStatus

func (m *SComponent) FetchStatus(cluster *SCluster, out *api.ComponentsStatus) error

func (*SComponent) GetCluster

func (m *SComponent) GetCluster() (*SCluster, error)

func (*SComponent) GetDriver

func (m *SComponent) GetDriver() (IComponentDriver, error)

func (*SComponent) GetSettings

func (m *SComponent) GetSettings() (*api.ComponentSettings, error)

func (*SComponent) PerformDisable

func (*SComponent) PerformEnable

func (*SComponent) PostCreate

func (*SComponent) SetEnabled

func (m *SComponent) SetEnabled(enabled bool) error

func (*SComponent) StartComponentDeleteTask

func (m *SComponent) StartComponentDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SComponent) StartComponentDeployTask

func (m *SComponent) StartComponentDeployTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SComponent) StartComponentUndeployTask

func (m *SComponent) StartComponentUndeployTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SComponent) StartComponentUpdateTask

func (m *SComponent) StartComponentUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SComponent) StartSelfUpdate

func (m *SComponent) StartSelfUpdate(ctx context.Context, userCred mcclient.TokenCredential, cls *SCluster) error

type SComponentManager

type SComponentManager struct {
	db.SVirtualResourceBaseManager
	// contains filtered or unexported fields
}

+onecloud:swagger-gen-ignore

func NewComponentManager

func NewComponentManager(dt interface{}, keyword, keywordPlural string) *SComponentManager

func (*SComponentManager) CreateByCluster

func (m *SComponentManager) CreateByCluster(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	cluster *SCluster,
	input *api.ComponentCreateInput) (*SComponent, error)

func (*SComponentManager) GetDriver

func (m *SComponentManager) GetDriver(cType string) (IComponentDriver, error)

func (*SComponentManager) GetDrivers

func (m *SComponentManager) GetDrivers() []IComponentDriver

func (*SComponentManager) GetImageRepository

func (m *SComponentManager) GetImageRepository(cluster *SCluster, setting *api.ComponentSettings) (*api.ImageRepository, error)

func (*SComponentManager) RegisterDriver

func (m *SComponentManager) RegisterDriver(drv IComponentDriver)

func (*SComponentManager) ValidateCreateData

type SConfigMap

type SConfigMap struct {
	SNamespaceResourceBase
}

func (*SConfigMap) GetRawPods

func (obj *SConfigMap) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)

func (*SConfigMap) NewRemoteObjectForUpdate

func (m *SConfigMap) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, body jsonutils.JSONObject) (interface{}, error)

type SConfigMapManager

type SConfigMapManager struct {
	SNamespaceResourceBaseManager
}

+onecloud:swagger-gen-model-singular=configmap +onecloud:swagger-gen-model-plural=configmaps

func GetConfigMapManager

func GetConfigMapManager() *SConfigMapManager

func (SConfigMapManager) GetRawConfigMaps

func (m SConfigMapManager) GetRawConfigMaps(cluster *client.ClusterManager, ns string) ([]*v1.ConfigMap, error)

func (*SConfigMapManager) NewRemoteObjectForCreate

func (m *SConfigMapManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, body jsonutils.JSONObject) (interface{}, error)

func (*SConfigMapManager) ValidateCreateData

type SContainerRegistry

type SContainerRegistry struct {
	db.SSharableVirtualResourceBase

	Url    string               `width:"256" charset:"ascii" nullable:"false" create:"required" update:"user" list:"user"`
	Type   string               `charset:"ascii" width:"128" create:"required" nullable:"true" list:"user"`
	Config jsonutils.JSONObject `nullable:"true" create:"optional"`
}

func (*SContainerRegistry) GetConfig

func (*SContainerRegistry) GetDetailsConfig

func (*SContainerRegistry) GetDetailsDownloadImage

func (*SContainerRegistry) GetDetailsImageTags

func (*SContainerRegistry) GetDetailsImages

func (*SContainerRegistry) GetDockerRegistryClient

func (r *SContainerRegistry) GetDockerRegistryClient() (client.Client, error)

func (*SContainerRegistry) GetDriver

func (*SContainerRegistry) GetType

func (*SContainerRegistry) PerformUploadImage

type SContainerRegistryManager

type SContainerRegistryManager struct {
	db.SSharableVirtualResourceBaseManager
}

func GetContainerRegistryManager

func GetContainerRegistryManager() *SContainerRegistryManager

func (*SContainerRegistryManager) AddDispatcher

func (man *SContainerRegistryManager) AddDispatcher(prefix string, app *appsrv.Application, manager dispatcher.IModelDispatchHandler)

func (*SContainerRegistryManager) CustomizeHandlerInfo

func (m *SContainerRegistryManager) CustomizeHandlerInfo(info *appsrv.SHandlerInfo)

func (*SContainerRegistryManager) GetDriver

func (*SContainerRegistryManager) GetPropertyDownloadImage

func (*SContainerRegistryManager) ListItemFilter

type SCronJob

type SCronJob struct {
	SNamespaceResourceBase
}

func (*SCronJob) GetDetails

func (obj *SCronJob) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SCronJob) TriggerCronJob

func (obj *SCronJob) TriggerCronJob() error

TriggerCronJob manually triggers a cron job and creates a new job.

type SCronJobManager

type SCronJobManager struct {
	SNamespaceResourceBaseManager
}

func GetCronJobManager

func GetCronJobManager() *SCronJobManager

func (*SCronJobManager) NewRemoteObjectForCreate

func (m *SCronJobManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

type SDaemonSet

type SDaemonSet struct {
	SNamespaceResourceBase
}

func (*SDaemonSet) GetDetails

func (obj *SDaemonSet) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SDaemonSet) GetExtraDetails

func (obj *SDaemonSet) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.DaemonSetDetailV2, error)

func (*SDaemonSet) GetPodInfo

func (obj *SDaemonSet) GetPodInfo(cli *client.ClusterManager, ds *apps.DaemonSet) (*api.PodInfo, error)

func (*SDaemonSet) GetRawPods

func (obj *SDaemonSet) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)

func (*SDaemonSet) GetRawServices

func (obj *SDaemonSet) GetRawServices(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Service, error)

func (*SDaemonSet) NewRemoteObjectForUpdate

func (obj *SDaemonSet) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)

func (*SDaemonSet) SetStatusByRemoteObject

func (obj *SDaemonSet) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

func (*SDaemonSet) UpdateFromRemoteObject

func (obj *SDaemonSet) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

type SDaemonSetManager

type SDaemonSetManager struct {
	SNamespaceResourceBaseManager
}

func GetDaemonSetManager

func GetDaemonSetManager() *SDaemonSetManager

func (*SDaemonSetManager) NewRemoteObjectForCreate

func (m *SDaemonSetManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SDaemonSetManager) ValidateCreateData

func (*SDaemonSetManager) ValidateDaemonSetObject

func (m *SDaemonSetManager) ValidateDaemonSetObject(ds *apps.DaemonSet) error

type SDeployment

type SDeployment struct {
	SNamespaceResourceBase
}

func (*SDeployment) FindNewReplicaSet

func (obj *SDeployment) FindNewReplicaSet(deploy *apps.Deployment) (*apps.ReplicaSet, error)

func (*SDeployment) FindOldReplicaSets

func (obj *SDeployment) FindOldReplicaSets(deploy *apps.Deployment, rss []*apps.ReplicaSet) ([]*apps.ReplicaSet, []*apps.ReplicaSet, error)

func (*SDeployment) GetDetails

func (obj *SDeployment) GetDetails(
	ctx context.Context,
	cli *client.ClusterManager,
	base interface{},
	k8sObj runtime.Object,
	isList bool,
) interface{}

func (*SDeployment) GetExtraDetails

func (obj *SDeployment) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.DeploymentDetailV2, error)

func (*SDeployment) GetPodInfo

func (obj *SDeployment) GetPodInfo(cli *client.ClusterManager, deploy *apps.Deployment) (*api.PodInfo, error)

func (*SDeployment) GetRawDeployment

func (obj *SDeployment) GetRawDeployment() (*apps.Deployment, error)

func (*SDeployment) GetRawPods

func (obj *SDeployment) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)

func (*SDeployment) GetRawReplicaSets

func (obj *SDeployment) GetRawReplicaSets(cli *client.ClusterManager, deploy *apps.Deployment) ([]*apps.ReplicaSet, error)

func (*SDeployment) GetRawServices

func (obj *SDeployment) GetRawServices(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Service, error)

func (*SDeployment) NewRemoteObjectForUpdate

func (obj *SDeployment) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)

func (*SDeployment) SetStatusByRemoteObject

func (obj *SDeployment) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

func (*SDeployment) UpdateFromRemoteObject

func (obj *SDeployment) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

type SDeploymentManager

type SDeploymentManager struct {
	SNamespaceResourceBaseManager
}

func GetDeploymentManager

func GetDeploymentManager() *SDeploymentManager

func (*SDeploymentManager) ListItemFilter

func (*SDeploymentManager) NewRemoteObjectForCreate

func (m *SDeploymentManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SDeploymentManager) ValidateCreateData

func (*SDeploymentManager) ValidateDeploymentObject

func (m *SDeploymentManager) ValidateDeploymentObject(deploy *apps.Deployment) error

type SEndpoint

type SEndpoint struct {
	SNamespaceResourceBase
}

type SEndpointManager

type SEndpointManager struct {
	SNamespaceResourceBaseManager
}

func GetEndpointManager

func GetEndpointManager() *SEndpointManager

func (*SEndpointManager) GetRawEndpoints

func (m *SEndpointManager) GetRawEndpoints(cluster *client.ClusterManager, ns string) ([]*v1.Endpoints, error)

func (*SEndpointManager) GetRawEndpointsByService

func (m *SEndpointManager) GetRawEndpointsByService(cluster *client.ClusterManager, svc *v1.Service) ([]*v1.Endpoints, error)

type SEvent

type SEvent struct {
	model.SK8sNamespaceResourceBase
}

func (SEvent) GetAPIDetailObject

func (obj SEvent) GetAPIDetailObject() (*api.Event, error)

func (SEvent) GetAPIObject

func (obj SEvent) GetAPIObject() (*api.Event, error)

func (SEvent) GetRawEvent

func (obj SEvent) GetRawEvent() *v1.Event

func (*SEvent) IsOwnedBy

func (obj *SEvent) IsOwnedBy(owner model.IOwnerModel) (bool, error)

type SEventManager

func (SEventManager) FilterEventsByKindName

func (m SEventManager) FilterEventsByKindName(events []*v1.Event, kind, namespace, name string) []*v1.Event

func (SEventManager) FilterEventsByType

func (m SEventManager) FilterEventsByType(events []*v1.Event, eventType string) []*v1.Event

func (SEventManager) FilterEventsByUID

func (m SEventManager) FilterEventsByUID(events []*v1.Event, uid types.UID) []*v1.Event

func (*SEventManager) GetAPIEvents

func (m *SEventManager) GetAPIEvents(cluster model.ICluster, events []*v1.Event) ([]*api.Event, error)

func (SEventManager) GetAllRawEvents

func (m SEventManager) GetAllRawEvents(cluster model.ICluster) ([]*v1.Event, error)

func (SEventManager) GetEventsByUID

func (m SEventManager) GetEventsByUID(cluster model.ICluster, uId types.UID) ([]*api.Event, error)

func (SEventManager) GetK8sResourceInfo

func (m SEventManager) GetK8sResourceInfo() model.K8sResourceInfo

func (SEventManager) GetNamespaceEvents

func (m SEventManager) GetNamespaceEvents(cluster model.ICluster, ns string) ([]*api.Event, error)

func (SEventManager) GetRawEvents

func (m SEventManager) GetRawEvents(cluster model.ICluster, ns string) ([]*v1.Event, error)

func (SEventManager) GetRawEventsByObject

func (m SEventManager) GetRawEventsByObject(cluster model.ICluster, obj runtime.Object) ([]*v1.Event, error)

func (SEventManager) GetRawEventsByPods

func (m SEventManager) GetRawEventsByPods(cluster model.ICluster, pods []*v1.Pod) ([]*v1.Event, error)

func (SEventManager) GetRawEventsByResource

func (m SEventManager) GetRawEventsByResource(cluster model.ICluster, namespace string, resName string) ([]*v1.Event, error)

func (SEventManager) GetRawEventsByUID

func (m SEventManager) GetRawEventsByUID(cluster model.ICluster, uId types.UID) ([]*v1.Event, error)

func (SEventManager) GetRawWarningEventsByPods

func (m SEventManager) GetRawWarningEventsByPods(cluster model.ICluster, pods []*v1.Pod) ([]*v1.Event, error)

func (*SEventManager) GetWarningEventsByPods

func (m *SEventManager) GetWarningEventsByPods(cluster model.ICluster, pods []*v1.Pod) ([]*api.Event, error)

func (SEventManager) ListItemFilter

func (m SEventManager) ListItemFilter(ctx *model.RequestContext, q model.IQuery, query *api.EventListInput) (model.IQuery, error)

type SFedClusterRole

type SFedClusterRole struct {
	SFedResourceBase
	Spec *api.FederatedClusterRoleSpec `list:"user" update:"user" create:"required"`
}

func (*SFedClusterRole) ValidateUpdateData

type SFedClusterRoleBinding

type SFedClusterRoleBinding struct {
	SFedResourceBase
	Spec *api.FederatedClusterRoleBindingSpec `list:"user" update:"user" create:"required"`
}

func (*SFedClusterRoleBinding) CustomizeCreate

type SFedClusterRoleBindingCluster

type SFedClusterRoleBindingCluster struct {
	SFedJointCluster
}

func (*SFedClusterRoleBindingCluster) Detach

func (*SFedClusterRoleBindingCluster) GetResourceCreateData

func (*SFedClusterRoleBindingCluster) GetResourceUpdateData

type SFedClusterRoleBindingClusterManager

type SFedClusterRoleBindingClusterManager struct {
	SFedJointClusterManager
}

+onecloud:swagger-gen-model-singular=federatedclusterrolebindingcluster +onecloud:swagger-gen-model-plural=federatedclusterrolebindingclusters

var (
	FedClusterRoleBindingClusterManager *SFedClusterRoleBindingClusterManager
)

func (*SFedClusterRoleBindingClusterManager) ListItemFilter

type SFedClusterRoleBindingManager

type SFedClusterRoleBindingManager struct {
	SFedResourceBaseManager
}

+onecloud:swagger-gen-model-singular=federatedclusterrolebinding +onecloud:swagger-gen-model-plural=federatedclusterrolebindings

func GetFedClusterRoleBindingManager

func GetFedClusterRoleBindingManager() *SFedClusterRoleBindingManager

type SFedClusterRoleCluster

type SFedClusterRoleCluster struct {
	SFedJointCluster
}

func (*SFedClusterRoleCluster) Detach

func (*SFedClusterRoleCluster) GetFedClusterRole

func (obj *SFedClusterRoleCluster) GetFedClusterRole() (*SFedClusterRole, error)

func (*SFedClusterRoleCluster) GetResourceCreateData

func (*SFedClusterRoleCluster) GetResourceUpdateData

type SFedClusterRoleClusterManager

type SFedClusterRoleClusterManager struct {
	SFedJointClusterManager
}

+onecloud:swagger-gen-model-singular=federatedclusterrolecluster +onecloud:swagger-gen-model-plural=federatedclusterroleclusters

var (
	FedClusterRoleClusterManager *SFedClusterRoleClusterManager
)

func (*SFedClusterRoleClusterManager) ListItemFilter

type SFedClusterRoleManager

type SFedClusterRoleManager struct {
	SFedResourceBaseManager
}

+onecloud:swagger-gen-model-singular=federatedclusterrole +onecloud:swagger-gen-model-plural=federatedclusterroles

func GetFedClusterRoleManager

func GetFedClusterRoleManager() *SFedClusterRoleManager

func (*SFedClusterRoleManager) GetFedClusterRole

func (m *SFedClusterRoleManager) GetFedClusterRole(id string) (*SFedClusterRole, error)

func (*SFedClusterRoleManager) GetPropertyApiResources

func (*SFedClusterRoleManager) GetPropertyClusterUserGroups

func (m *SFedClusterRoleManager) GetPropertyClusterUserGroups(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.ClusterUserGroups, error)

func (*SFedClusterRoleManager) GetPropertyClusterUsers

func (m *SFedClusterRoleManager) GetPropertyClusterUsers(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.ClusterUsers, error)

type SFedJointCluster

type SFedJointCluster struct {
	SFedJointResourceBase

	FederatedresourceId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`
	ClusterId           string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`
	// NamespaceId should be calculated by cluster and federated resource
	ResourceId string `width:"36" charset:"ascii" list:"user" index:"true"`
}

func (*SFedJointCluster) GetCluster

func (obj *SFedJointCluster) GetCluster() (*SCluster, error)

func (*SFedJointCluster) GetClusterId

func (obj *SFedJointCluster) GetClusterId() string

func (*SFedJointCluster) GetDetails

func (obj *SFedJointCluster) GetDetails(base api.FedJointClusterResourceDetails, isList bool) interface{}

func (*SFedJointCluster) GetFedResourceId

func (obj *SFedJointCluster) GetFedResourceId() string

func (*SFedJointCluster) GetFedResourceManager

func (obj *SFedJointCluster) GetFedResourceManager() IFedModelManager

func (*SFedJointCluster) GetManager

func (obj *SFedJointCluster) GetManager() IFedJointClusterManager

func (*SFedJointCluster) GetResourceId

func (obj *SFedJointCluster) GetResourceId() string

func (*SFedJointCluster) GetResourceManager

func (obj *SFedJointCluster) GetResourceManager() IClusterModelManager

func (*SFedJointCluster) SetResource

func (obj *SFedJointCluster) SetResource(resObj IClusterModel) error

type SFedJointClusterManager

type SFedJointClusterManager struct {
	SFedJointResourceBaseManager
	// contains filtered or unexported fields
}

func NewFedJointClusterManager

func NewFedJointClusterManager(
	dt interface{}, tableName string,
	keyword string, keywordPlural string,
	master IFedModelManager,
	resourceMan IClusterModelManager,
) SFedJointClusterManager

func (*SFedJointClusterManager) ClusterQuery

func (m *SFedJointClusterManager) ClusterQuery(clsId string) *sqlchemy.SQuery

func (*SFedJointClusterManager) FetchCustomizeColumns

func (m *SFedJointClusterManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool) []interface{}

func (SFedJointClusterManager) GetFedManager

func (m SFedJointClusterManager) GetFedManager() IFedModelManager

func (SFedJointClusterManager) GetMasterFieldName

func (m SFedJointClusterManager) GetMasterFieldName() string

func (SFedJointClusterManager) GetResourceManager

func (m SFedJointClusterManager) GetResourceManager() IClusterModelManager

func (SFedJointClusterManager) GetSlaveFieldName

func (m SFedJointClusterManager) GetSlaveFieldName() string

func (*SFedJointClusterManager) ListItemFilter

type SFedJointResourceBase

type SFedJointResourceBase struct {
	db.SJointResourceBase
}

type SFedJointResourceBaseManager

type SFedJointResourceBaseManager struct {
	db.SJointResourceBaseManager
}

+onecloud:swagger-gen-ignore

func NewFedJointResourceBaseManager

func NewFedJointResourceBaseManager(dt interface{}, tableName string, keyword string, keywordPlural string, master IFedModelManager, slave db.IStandaloneModelManager) SFedJointResourceBaseManager

type SFedNamespace

type SFedNamespace struct {
	SFedResourceBase
	Spec *api.FederatedNamespaceSpec `list:"user" update:"user" create:"required"`
}

func (*SFedNamespace) GetDetails

func (obj *SFedNamespace) GetDetails(base interface{}, isList bool) interface{}

func (*SFedNamespace) ValidateDeleteCondition

func (obj *SFedNamespace) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error

ValidateDeleteCondition check steps: 1. no releated clusters attached 2. no releated federated namespace scope resource

func (*SFedNamespace) ValidateUpdateData

type SFedNamespaceCluster

type SFedNamespaceCluster struct {
	SFedJointCluster
}

func (*SFedNamespaceCluster) Detach

func (*SFedNamespaceCluster) GetDetails

func (obj *SFedNamespaceCluster) GetDetails(base api.FedJointClusterResourceDetails, isList bool) interface{}

func (*SFedNamespaceCluster) GetFedNamespace

func (obj *SFedNamespaceCluster) GetFedNamespace() (*SFedNamespace, error)

func (*SFedNamespaceCluster) GetK8sResource

func (obj *SFedNamespaceCluster) GetK8sResource() (runtime.Object, error)

func (*SFedNamespaceCluster) GetResourceCreateData

func (*SFedNamespaceCluster) GetResourceUpdateData

type SFedNamespaceClusterManager

type SFedNamespaceClusterManager struct {
	SFedJointClusterManager
}

+onecloud:swagger-gen-model-singular=federatednamespacecluster +onecloud:swagger-gen-model-plural=federatednamespaceclusters

var (
	FedNamespaceClusterManager *SFedNamespaceClusterManager
)

func (*SFedNamespaceClusterManager) ListItemFilter

type SFedNamespaceJointClusterManager

type SFedNamespaceJointClusterManager struct {
	SFedJointClusterManager
}

func NewFedNamespaceJointClusterManager

func NewFedNamespaceJointClusterManager(
	dt interface{}, tableName string,
	keyword string, keywordPlural string,
	master IFedModelManager,
	resourceMan IClusterModelManager,
) SFedNamespaceJointClusterManager

func (*SFedNamespaceJointClusterManager) ListItemFilter

type SFedNamespaceManager

type SFedNamespaceManager struct {
	SFedResourceBaseManager
}

+onecloud:swagger-gen-model-singular=federatednamespace +onecloud:swagger-gen-model-plural=federatednamespaces

func GetFedNamespaceManager

func GetFedNamespaceManager() *SFedNamespaceManager

func (*SFedNamespaceManager) GetFedNamespace

func (m *SFedNamespaceManager) GetFedNamespace(id string) (*SFedNamespace, error)

func (*SFedNamespaceManager) GetFedNamespaceByIdOrName

func (m *SFedNamespaceManager) GetFedNamespaceByIdOrName(ctx context.Context, userCred mcclient.IIdentityProvider, id string) (*SFedNamespace, error)

func (*SFedNamespaceManager) K8sConvertToInternalObject

func (m *SFedNamespaceManager) K8sConvertToInternalObject(in *corev1.Namespace) (interface{}, error)

type SFedNamespaceResource

type SFedNamespaceResource struct {
	SFedResourceBase

	FederatednamespaceId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" index:"true"`
}

func (*SFedNamespaceResource) GetDetails

func (obj *SFedNamespaceResource) GetDetails(base interface{}, isList bool) interface{}

func (*SFedNamespaceResource) GetFedNamespace

func (obj *SFedNamespaceResource) GetFedNamespace() (*SFedNamespace, error)

func (*SFedNamespaceResource) GetK8sObjectMeta

func (obj *SFedNamespaceResource) GetK8sObjectMeta() metav1.ObjectMeta

func (*SFedNamespaceResource) PerformAttachCluster

func (*SFedNamespaceResource) ValidateAttachCluster

func (obj *SFedNamespaceResource) ValidateAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

type SFedNamespaceResourceManager

type SFedNamespaceResourceManager struct {
	SFedResourceBaseManager
}

+onecloud:swagger-gen-ignore

func NewFedNamespaceResourceManager

func NewFedNamespaceResourceManager(
	dt interface{},
	tableName string,
	keyword string,
	keywordPlural string,
) SFedNamespaceResourceManager

func (*SFedNamespaceResourceManager) ListItemFilter

type SFedResourceBase

type SFedResourceBase struct {
	db.SStatusDomainLevelResourceBase
}

func (*SFedResourceBase) GetClustersCount

func (obj *SFedResourceBase) GetClustersCount() (int, error)

func (*SFedResourceBase) GetClustersQuery

func (obj *SFedResourceBase) GetClustersQuery() *sqlchemy.SQuery

func (*SFedResourceBase) GetDetails

func (obj *SFedResourceBase) GetDetails(base interface{}, isList bool) interface{}

func (*SFedResourceBase) GetElemModel

func (obj *SFedResourceBase) GetElemModel() (IFedModel, error)

func (*SFedResourceBase) GetJointModelManager

func (m *SFedResourceBase) GetJointModelManager() IFedJointClusterManager

func (*SFedResourceBase) GetK8sObjectMeta

func (obj *SFedResourceBase) GetK8sObjectMeta() metav1.ObjectMeta

func (*SFedResourceBase) GetManager

func (obj *SFedResourceBase) GetManager() IFedModelManager

func (*SFedResourceBase) LogPrefix

func (obj *SFedResourceBase) LogPrefix() string

func (*SFedResourceBase) PerformAttachCluster

func (obj *SFedResourceBase) PerformAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SFedResourceBase) PerformDetachCluster

func (obj *SFedResourceBase) PerformDetachCluster(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SFedResourceBase) PerformSync

func (*SFedResourceBase) PostCreate

func (*SFedResourceBase) PostUpdate

func (res *SFedResourceBase) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SFedResourceBase) ValidateAttachCluster

func (obj *SFedResourceBase) ValidateAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SFedResourceBase) ValidateDeleteCondition

func (obj *SFedResourceBase) ValidateDeleteCondition(ctx context.Context, _ jsonutils.JSONObject) error

func (*SFedResourceBase) ValidateDetachCluster

func (obj *SFedResourceBase) ValidateDetachCluster(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SFedResourceBase) ValidateJointCluster

func (*SFedResourceBase) ValidateUpdateData

type SFedResourceBaseManager

type SFedResourceBaseManager struct {
	db.SStatusDomainLevelResourceBaseManager
	// contains filtered or unexported fields
}

+onecloud:swagger-gen-ignore

func NewFedResourceBaseManager

func NewFedResourceBaseManager(
	dt interface{},
	tableName string,
	keyword string,
	keywordPlural string,
) SFedResourceBaseManager

func (*SFedResourceBaseManager) FetchCustomizeColumns

func (m *SFedResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []interface{}

func (*SFedResourceBaseManager) GetJointModelManager

func (m *SFedResourceBaseManager) GetJointModelManager() IFedJointClusterManager

func (*SFedResourceBaseManager) ListItemFilter

func (*SFedResourceBaseManager) PurgeAllByCluster

func (m *SFedResourceBaseManager) PurgeAllByCluster(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster) error

func (*SFedResourceBaseManager) SetJointModelManager

func (m *SFedResourceBaseManager) SetJointModelManager(man IFedJointClusterManager)

type SFedRole

type SFedRole struct {
	SFedNamespaceResource
	Spec *api.FederatedRoleSpec `list:"user" update:"user" create:"required"`
}

func (*SFedRole) ValidateUpdateData

func (obj *SFedRole) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.FedRoleUpdateInput) (*api.FedRoleUpdateInput, error)

type SFedRoleBinding

type SFedRoleBinding struct {
	SFedNamespaceResource
	Spec *api.FederatedRoleBindingSpec `list:"user" update:"user" create:"required"`
}

func (*SFedRoleBinding) ValidateUpdateData

type SFedRoleBindingCluster

type SFedRoleBindingCluster struct {
	SFederatedNamespaceJointCluster
}

func (*SFedRoleBindingCluster) Detach

func (*SFedRoleBindingCluster) GetResourceCreateData

func (*SFedRoleBindingCluster) GetResourceUpdateData

type SFedRoleBindingClusterManager

type SFedRoleBindingClusterManager struct {
	SFedNamespaceJointClusterManager
}

+onecloud:swagger-gen-model-singular=federatedrolebindingcluster +onecloud:swagger-gen-model-plural=federatedrolebindingclusters

var (
	FedRoleBindingClusterManager *SFedRoleBindingClusterManager
)

type SFedRoleBindingManager

type SFedRoleBindingManager struct {
	SFedNamespaceResourceManager
}

+onecloud:swagger-gen-model-singular=federatedrolebinding +onecloud:swagger-gen-model-plural=federatedrolebindings

func GetFedRoleBindingManager

func GetFedRoleBindingManager() *SFedRoleBindingManager

type SFedRoleCluster

type SFedRoleCluster struct {
	SFederatedNamespaceJointCluster
}

func (*SFedRoleCluster) Detach

func (obj *SFedRoleCluster) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SFedRoleCluster) GetResourceCreateData

func (*SFedRoleCluster) GetResourceUpdateData

type SFedRoleClusterManager

type SFedRoleClusterManager struct {
	SFedNamespaceJointClusterManager
}

+onecloud:swagger-gen-model-singular=federatedrolecluster +onecloud:swagger-gen-model-plural=federatedroleclusters

var (
	FedRoleClusterManager *SFedRoleClusterManager
)

type SFedRoleManager

type SFedRoleManager struct {
	SFedNamespaceResourceManager
}

+onecloud:swagger-gen-model-singular=federatedrole +onecloud:swagger-gen-model-plural=federatedroles

func GetFedRoleManager

func GetFedRoleManager() *SFedRoleManager

func (*SFedRoleManager) GetPropertyApiResources

func (m *SFedRoleManager) GetPropertyApiResources(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.ClusterAPIGroupResources, error)

func (*SFedRoleManager) GetPropertyClusterUserGroups

func (m *SFedRoleManager) GetPropertyClusterUserGroups(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.ClusterUserGroups, error)

func (*SFedRoleManager) GetPropertyClusterUsers

func (m *SFedRoleManager) GetPropertyClusterUsers(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.ClusterUsers, error)

func (*SFedRoleManager) ValidateCreateData

type SFederatedManagedResourceBase

type SFederatedManagedResourceBase struct {
	FederatedResourceId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}

func (*SFederatedManagedResourceBase) SetFederatedResourceId

func (obj *SFederatedManagedResourceBase) SetFederatedResourceId(resId string)

type SFederatedManagedResourceBaseManager

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

func (*SFederatedManagedResourceBaseManager) RegisterFederatedManager

func (m *SFederatedManagedResourceBaseManager) RegisterFederatedManager(fm IFedModelManager)

type SFederatedNamespaceJointCluster

type SFederatedNamespaceJointCluster struct {
	SFedJointCluster
}

func (*SFederatedNamespaceJointCluster) GetClusterNamespace

func (obj *SFederatedNamespaceJointCluster) GetClusterNamespace(userCred mcclient.TokenCredential, clusterId string, namespace string) (*SNamespace, error)

type SFluentBitComponent

type SFluentBitComponent struct {
	SComponent
}

type SFluentBitComponentManager

type SFluentBitComponentManager struct {
	SComponentManager
	HelmComponentManager
}
var (
	FluentBitComponentManager *SFluentBitComponentManager
)

func NewFluentBitComponentManager

func NewFluentBitComponentManager() *SFluentBitComponentManager

func (SFluentBitComponentManager) CreateHelmResource

func (m SFluentBitComponentManager) CreateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

func (SFluentBitComponentManager) DeleteHelmResource

func (m SFluentBitComponentManager) DeleteHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

func (SFluentBitComponentManager) GetHelmValues

func (m SFluentBitComponentManager) GetHelmValues(cluster *SCluster, settings *api.ComponentSettings) (map[string]interface{}, error)

func (SFluentBitComponentManager) UpdateHelmResource

func (m SFluentBitComponentManager) UpdateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

type SIngress

type SIngress struct {
	SNamespaceResourceBase
}

func (*SIngress) GetDetails

func (obj *SIngress) GetDetails(
	ctx context.Context,
	cli *client.ClusterManager,
	base interface{},
	k8sObj runtime.Object,
	isList bool,
) interface{}

type SIngressManager

type SIngressManager struct {
	SNamespaceResourceBaseManager
}

func GetIngressManager

func GetIngressManager() *SIngressManager

func (*SIngressManager) NewRemoteObjectForCreate

func (m *SIngressManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

type SJob

type SJob struct {
	SNamespaceResourceBase
}

func (*SJob) GetDetails

func (obj *SJob) GetDetails(
	ctx context.Context,
	cli *client.ClusterManager,
	base interface{},
	k8sObj runtime.Object,
	isList bool,
) interface{}

func (*SJob) GetExtraDetails

func (job *SJob) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.JobDetailV2, error)

func (*SJob) GetPodInfo

func (obj *SJob) GetPodInfo(cli *client.ClusterManager, job *batch.Job) (*api.PodInfo, error)

func (*SJob) GetRawPods

func (obj *SJob) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)

type SJobManager

type SJobManager struct {
	SNamespaceResourceBaseManager
}

func GetJobManager

func GetJobManager() *SJobManager

func (*SJobManager) NewRemoteObjectForCreate

func (m *SJobManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SJobManager) ValidateCreateData

type SK8sOwnedResourceBaseManager

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

func (SK8sOwnedResourceBaseManager) CustomizeFilterList

type SLimitRange

type SLimitRange struct {
	SNamespaceResourceBase
}

func (*SLimitRange) GetDetails

func (obj *SLimitRange) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SLimitRange) ToRangeItem

func (obj *SLimitRange) ToRangeItem(lr *v1.LimitRange) []*api.LimitRangeItem

type SLimitRangeManager

type SLimitRangeManager struct {
	SNamespaceResourceBaseManager
}

+onecloud:swagger-gen-model-singular=limitrange +onecloud:swagger-gen-model-plural=limitranges

func GetLimitRangeManager

func GetLimitRangeManager() *SLimitRangeManager

func (*SLimitRangeManager) ValidateCreateData

type SMachine

type SMachine struct {
	db.SVirtualResourceBase
	// Provider determine which cloud provider this node used, e.g. onecloud, aliyun, aws
	Provider  string `width:"36" charset:"ascii" nullable:"false" create:"required" list:"user"`
	ClusterId string `width:"128" charset:"ascii" nullable:"false" create:"required" list:"user"`
	ZoneId    string `width:"128" charset:"ascii" nullable:"true" create:"optional" list:"user"`
	NetworkId string `width:"128" charset:"ascii" nullable:"true" create:"optional" list:"user"`
	Role      string `width:"36" charset:"ascii" nullable:"false" create:"required" list:"user"`
	// ResourceType determine which resource type this node used
	ResourceType string `width:"36" charset:"ascii" nullable:"false" create:"required" list:"user"`
	// ResourceId related to cloud host or guest id
	ResourceId string `width:"128" charset:"ascii" nullable:"true" create:"optional" list:"user"`
	// TODO: cloudprovider
	// FirstNode determine machine is first controlplane
	FirstNode tristate.TriState `nullable:"true" create:"required" list:"user"`

	// Private IP address
	Address string `width:"16" charset:"ascii" nullable:"true" list:"user"`
	// Hypervisor in onecloud server
	Hypervisor    string               `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional"`
	K8sNodeConfig jsonutils.JSONObject `nullable:"true" create:"optional" update:"admin" list:"user"`
}

func ConvertPtrMachines

func ConvertPtrMachines(objs []SMachine) []*SMachine

func (*SMachine) AllowPerformPrepare

func (m *SMachine) AllowPerformPrepare(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SMachine) AllowPerformRecreate

func (m *SMachine) AllowPerformRecreate(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SMachine) AllowPerformTerminate

func (m *SMachine) AllowPerformTerminate(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SMachine) CustomizeDelete

func (m *SMachine) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SMachine) Delete

func (m *SMachine) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SMachine) GetCluster

func (m *SMachine) GetCluster() (*SCluster, error)

func (*SMachine) GetClusterAddonsConfig

func (m *SMachine) GetClusterAddonsConfig() (*api.ClusterAddonsManifestConfig, error)

func (*SMachine) GetCreateInput

func (m *SMachine) GetCreateInput(ctx context.Context, userCred mcclient.TokenCredential) (*api.CreateMachineData, error)

func (*SMachine) GetDetailsNetworkaddress

func (m *SMachine) GetDetailsNetworkaddress(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) ([]*computeapi.NetworkAddressDetails, error)

func (*SMachine) GetDriver

func (m *SMachine) GetDriver() IMachineDriver

func (*SMachine) GetEIP

func (m *SMachine) GetEIP() (string, error)

func (*SMachine) GetK8sModelNode

func (m *SMachine) GetK8sModelNode(userCred mcclient.TokenCredential, cluster *SCluster) (jsonutils.JSONObject, error)

func (*SMachine) GetK8sNodeConfig

func (m *SMachine) GetK8sNodeConfig() *api.K8sNodeConfig

func (*SMachine) GetKubernetesVersion

func (m *SMachine) GetKubernetesVersion() (string, error)

func (*SMachine) GetPrivateIP

func (m *SMachine) GetPrivateIP() (string, error)

func (*SMachine) GetResourceId

func (m *SMachine) GetResourceId() string

func (*SMachine) GetRole

func (m *SMachine) GetRole() string

func (*SMachine) GetStatus

func (m *SMachine) GetStatus() string

func (*SMachine) IsControlplane

func (m *SMachine) IsControlplane() bool

func (*SMachine) IsEnableNativeIPAlloc

func (m *SMachine) IsEnableNativeIPAlloc() (bool, error)

func (*SMachine) IsFirstNode

func (m *SMachine) IsFirstNode() bool

func (*SMachine) IsInClassicNetwork

func (m *SMachine) IsInClassicNetwork() (bool, error)

func (*SMachine) IsRunning

func (m *SMachine) IsRunning() bool

func (*SMachine) LogPrefix

func (m *SMachine) LogPrefix() string

func (*SMachine) PerformPostPrepareResource

func (m *SMachine) PerformPostPrepareResource(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SMachine) PerformPrepare

func (m *SMachine) PerformPrepare(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SMachine) PerformRecreate

func (m *SMachine) PerformRecreate(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SMachine) PerformTerminate

func (m *SMachine) PerformTerminate(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SMachine) PostCreate

func (*SMachine) RealDelete

func (m *SMachine) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SMachine) SetHypervisor

func (m *SMachine) SetHypervisor(hypervisor string) error

func (*SMachine) SetPrivateIP

func (m *SMachine) SetPrivateIP(address string) error

func (*SMachine) SetResourceId

func (m *SMachine) SetResourceId(id string) error

func (*SMachine) StartMachineCreateTask

func (m *SMachine) StartMachineCreateTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SMachine) StartPrepareTask

func (m *SMachine) StartPrepareTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SMachine) StartTerminateTask

func (m *SMachine) StartTerminateTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

StartTerminateTask invoke by MachineBatchDeleteTask

func (*SMachine) SyncInfoFromCloud

func (m *SMachine) SyncInfoFromCloud(ctx context.Context, s *mcclient.ClientSession) error

func (*SMachine) SyncK8sConfig

func (m *SMachine) SyncK8sConfig(ctx context.Context, cli *kubernetes.Clientset) error

func (*SMachine) ValidatePrepareCondition

func (m *SMachine) ValidatePrepareCondition(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) error

type SMachineManager

type SMachineManager struct {
	db.SVirtualResourceBaseManager
}
var MachineManager *SMachineManager

func (*SMachineManager) CreateMachine

func (man *SMachineManager) CreateMachine(ctx context.Context, userCred mcclient.TokenCredential, data *api.CreateMachineData) (manager.IMachine, error)

func (*SMachineManager) CreateMachineNoHook

func (man *SMachineManager) CreateMachineNoHook(ctx context.Context, cluster *SCluster, userCred mcclient.TokenCredential, data *api.CreateMachineData) (manager.IMachine, error)

func (*SMachineManager) FetchCustomizeColumns

func (m *SMachineManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []*jsonutils.JSONDict

func (*SMachineManager) FetchMachineById

func (man *SMachineManager) FetchMachineById(id string) (*SMachine, error)

func (*SMachineManager) FetchMachineByIdOrName

func (man *SMachineManager) FetchMachineByIdOrName(ctx context.Context, userCred mcclient.TokenCredential, id string) (manager.IMachine, error)

func (*SMachineManager) GetCluster

func (man *SMachineManager) GetCluster(ctx context.Context, userCred mcclient.TokenCredential, clusterId string) (*SCluster, error)

func (*SMachineManager) GetClusterControlplaneMachines

func (man *SMachineManager) GetClusterControlplaneMachines(clusterId string) ([]*SMachine, error)

func (*SMachineManager) GetClusterMachines

func (man *SMachineManager) GetClusterMachines(clusterId string) ([]*SMachine, error)

func (*SMachineManager) GetMachineByResourceId

func (man *SMachineManager) GetMachineByResourceId(resId string) (*SMachine, error)

func (*SMachineManager) GetMachines

func (man *SMachineManager) GetMachines(clusterId string) ([]manager.IMachine, error)

func (*SMachineManager) GetSession

func (man *SMachineManager) GetSession() (*mcclient.ClientSession, error)

func (*SMachineManager) IsMachineExists

func (man *SMachineManager) IsMachineExists(ctx context.Context, userCred mcclient.TokenCredential, id string) (manager.IMachine, bool, error)

func (*SMachineManager) ListItemFilter

func (man *SMachineManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.MachineListInput) (*sqlchemy.SQuery, error)

func (*SMachineManager) StartMachineBatchDeleteTask

func (man *SMachineManager) StartMachineBatchDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, items []db.IStandaloneModel, data *jsonutils.JSONDict, parentTaskId string) error

func (*SMachineManager) ValidateCreateData

func (*SMachineManager) ValidateResourceType

func (m *SMachineManager) ValidateResourceType(resType string) error

type SMinioBaseComponent

type SMinioBaseComponent struct {
	SComponent
}

type SMinioBaseComponentManager

type SMinioBaseComponentManager struct {
	SComponentManager
	HelmComponentManager
}

func NewMinioBaseComponentManager

func NewMinioBaseComponentManager(
	key, keyPlural string,
	releaseName string,
	namespace string,
	dt interface{},
) *SMinioBaseComponentManager

func (SMinioBaseComponentManager) GetHelmManager

type SMinioComponent

type SMinioComponent struct {
	SMinioBaseComponent
}

type SMinioComponentManager

type SMinioComponentManager struct {
	SMinioBaseComponentManager
}
var (
	MinioComponentManager *SMinioComponentManager
)

func NewMinioComponentManager

func NewMinioComponentManager() *SMinioComponentManager

func (SMinioComponentManager) CreateHelmResource

func (m SMinioComponentManager) CreateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

func (SMinioComponentManager) DeleteHelmResource

func (m SMinioComponentManager) DeleteHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

func (SMinioComponentManager) GetHelmValues

func (m SMinioComponentManager) GetHelmValues(cluster *SCluster, setting *api.ComponentSettings) (map[string]interface{}, error)

func (SMinioComponentManager) UpdateHelmResource

func (m SMinioComponentManager) UpdateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

type SMonitorComponent

type SMonitorComponent struct {
	SComponent
}

type SMonitorComponentManager

type SMonitorComponentManager struct {
	SComponentManager
	HelmComponentManager
}
var (
	MonitorComponentManager *SMonitorComponentManager
)

func NewMonitorComponentManager

func NewMonitorComponentManager() *SMonitorComponentManager

func (SMonitorComponentManager) CreateHelmResource

func (m SMonitorComponentManager) CreateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

func (SMonitorComponentManager) DeleteHelmResource

func (m SMonitorComponentManager) DeleteHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

func (SMonitorComponentManager) GetHelmValues

func (m SMonitorComponentManager) GetHelmValues(cluster *SCluster, setting *api.ComponentSettings) (map[string]interface{}, error)

func (SMonitorComponentManager) SyncSystemGrafanaDashboard

func (m SMonitorComponentManager) SyncSystemGrafanaDashboard(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)

func (SMonitorComponentManager) UpdateHelmResource

func (m SMonitorComponentManager) UpdateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

type SMonitorMinioComponentManager

type SMonitorMinioComponentManager struct {
	SMinioBaseComponentManager
}
var (
	MonitorMinioComponentManager *SMonitorMinioComponentManager
)

func NewMonitorMinioComponentManager

func NewMonitorMinioComponentManager() *SMonitorMinioComponentManager

func (SMonitorMinioComponentManager) CreateHelmResource

func (m SMonitorMinioComponentManager) CreateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

func (SMonitorMinioComponentManager) DeleteHelmResource

func (m SMonitorMinioComponentManager) DeleteHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

func (SMonitorMinioComponentManager) GetHelmValues

func (m SMonitorMinioComponentManager) GetHelmValues(cluster *SCluster, setting *api.ComponentSettings) (map[string]interface{}, error)

func (SMonitorMinioComponentManager) UpdateHelmResource

func (m SMonitorMinioComponentManager) UpdateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

type SNamespace

func (*SNamespace) CustomizeCreate

func (obj *SNamespace) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SNamespace) Delete

func (ns *SNamespace) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNamespace) DoSync

func (ns *SNamespace) DoSync(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNamespace) GetDetails

func (m *SNamespace) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SNamespace) GetEvents

func (m *SNamespace) GetEvents() ([]*api.Event, error)

func (*SNamespace) SetCluster

func (res *SNamespace) SetCluster(userCred mcclient.TokenCredential, cls *SCluster)

func (*SNamespace) SetStatusByRemoteObject

func (ns *SNamespace) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

func (*SNamespace) UpdateFromRemoteObject

func (ns *SNamespace) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

type SNamespaceManager

func GetNamespaceManager

func GetNamespaceManager() *SNamespaceManager

func (*SNamespaceManager) EnsureNamespace

func (m *SNamespaceManager) EnsureNamespace(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, cluster *SCluster, data *api.NamespaceCreateInputV2) (*SNamespace, error)

func (*SNamespaceManager) ListItemFilter

func (*SNamespaceManager) NewFromRemoteObject

func (m *SNamespaceManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, error)

func (*SNamespaceManager) NewRemoteObjectForCreate

func (m *SNamespaceManager) NewRemoteObjectForCreate(obj IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SNamespaceManager) ValidateCreateData

type SNamespaceResourceBase

type SNamespaceResourceBase struct {
	SClusterResourceBase

	NamespaceId string `width:"36" charset:"ascii" nullable:"false" index:"true" list:"user"`
}

func (*SNamespaceResourceBase) AllowGetDetailsRawdata

func (res *SNamespaceResourceBase) AllowGetDetailsRawdata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SNamespaceResourceBase) AllowUpdateRawdata

func (res *SNamespaceResourceBase) AllowUpdateRawdata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SNamespaceResourceBase) CustomizeCreate

func (*SNamespaceResourceBase) DeleteRemoteObject

func (res *SNamespaceResourceBase) DeleteRemoteObject() error

func (*SNamespaceResourceBase) GetDetails

func (obj *SNamespaceResourceBase) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SNamespaceResourceBase) GetDetailsRawdata

func (*SNamespaceResourceBase) GetNamespace

func (res *SNamespaceResourceBase) GetNamespace() (*SNamespace, error)

func (*SNamespaceResourceBase) GetNamespaceId

func (res *SNamespaceResourceBase) GetNamespaceId() string

func (*SNamespaceResourceBase) GetNamespaceName

func (res *SNamespaceResourceBase) GetNamespaceName() (string, error)

func (SNamespaceResourceBase) GetObjectMeta

func (res SNamespaceResourceBase) GetObjectMeta() (api.ObjectMeta, error)

func (*SNamespaceResourceBase) GetRemoteObject

func (res *SNamespaceResourceBase) GetRemoteObject() (interface{}, error)

func (*SNamespaceResourceBase) GetUniqValues

func (r *SNamespaceResourceBase) GetUniqValues() jsonutils.JSONObject

func (*SNamespaceResourceBase) SetNamespace

func (res *SNamespaceResourceBase) SetNamespace(userCred mcclient.TokenCredential, ns *SNamespace)

func (*SNamespaceResourceBase) UpdateFromRemoteObject

func (res *SNamespaceResourceBase) UpdateFromRemoteObject(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	extObj interface{},
) error

func (*SNamespaceResourceBase) UpdateRawdata

type SNamespaceResourceBaseManager

type SNamespaceResourceBaseManager struct {
	SClusterResourceBaseManager
}

+onecloud:swagger-gen-ignore

func NewNamespaceResourceBaseManager

func NewNamespaceResourceBaseManager(
	dt interface{},
	tableName string,
	keyword string,
	keywordPlural string,
	resName string,
	groupName string,
	versionName string,
	kind string,
	object runtime.Object) SNamespaceResourceBaseManager

func (*SNamespaceResourceBaseManager) FetchCustomizeColumns

func (m *SNamespaceResourceBaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []interface{}

func (*SNamespaceResourceBaseManager) FetchUniqValues

func (*SNamespaceResourceBaseManager) FilterByHiddenSystemAttributes

func (m *SNamespaceResourceBaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacscope.TRbacScope) *sqlchemy.SQuery

func (*SNamespaceResourceBaseManager) FilterByUniqValues

func (*SNamespaceResourceBaseManager) GetByIdOrName

func (m *SNamespaceResourceBaseManager) GetByIdOrName(userCred mcclient.IIdentityProvider, clusterId, namespaceId string, resId string) (IClusterModel, error)

func (*SNamespaceResourceBaseManager) GetByName

func (m *SNamespaceResourceBaseManager) GetByName(userCred mcclient.IIdentityProvider, clusterId, namespaceId string, resId string) (IClusterModel, error)

func (*SNamespaceResourceBaseManager) GetGCQuery

func (SNamespaceResourceBaseManager) IsNamespaceScope

func (m SNamespaceResourceBaseManager) IsNamespaceScope() bool

func (*SNamespaceResourceBaseManager) IsRemoteObjectLocalExist

func (m *SNamespaceResourceBaseManager) IsRemoteObjectLocalExist(userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, bool, error)

func (*SNamespaceResourceBaseManager) ListItemFilter

func (*SNamespaceResourceBaseManager) NewFromRemoteObject

func (res *SNamespaceResourceBaseManager) NewFromRemoteObject(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	cluster *SCluster,
	remoteObj interface{}) (IClusterModel, error)

type SNode

type SNode struct {
	SClusterResourceBase

	// v1.NodeSystemInfo
	NodeInfo jsonutils.JSONObject `list:"user"`
	// v1.NodeAddress
	Address jsonutils.JSONObject `list:"user"`

	// CpuCapacity is specified node CPU capacity in milicores
	CpuCapacity int64 `list:"user"`

	// MemoryCapacity is specified node memory capacity in bytes
	MemoryCapacity int64 `list:"user"`

	// PodCapacity is maximum number of pods that can be allocated on given node
	PodCapacity int64 `list:"user"`
}

func (*SNode) AllowPerformCordon

func (node *SNode) AllowPerformCordon(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SNode) AllowPerformUncordon

func (node *SNode) AllowPerformUncordon(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SNode) GetDetails

func (node *SNode) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SNode) GetExtraDetails

func (node *SNode) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.NodeDetailV2, error)

func (*SNode) GetRawNode

func (node *SNode) GetRawNode() (*v1.Node, error)

func (*SNode) GetRawPods

func (node *SNode) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)

func (*SNode) PerformCordon

func (node *SNode) PerformCordon(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SNode) PerformUncordon

func (node *SNode) PerformUncordon(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SNode) SetNodeScheduleToggle

func (obj *SNode) SetNodeScheduleToggle(unschedule bool) error

func (*SNode) SetStatusByRemoteObject

func (node *SNode) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

func (*SNode) UpdateFromRemoteObject

func (node *SNode) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

UpdateFromRemoteObject update local db SNode model by remote k8s node object

type SNodeManager

type SNodeManager struct {
	SClusterResourceBaseManager
}

func GetNodeManager

func GetNodeManager() *SNodeManager

func (*SNodeManager) FetchCustomizeColumns

func (m *SNodeManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, objs []interface{}, fields stringutils2.SSortedStrings, isList bool) []interface{}

func (*SNodeManager) GetNodesByClusters

func (m *SNodeManager) GetNodesByClusters(clusterIds []string) ([]SNode, error)

func (*SNodeManager) ListItemFilter

func (m *SNodeManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.NodeListInput) (*sqlchemy.SQuery, error)

func (*SNodeManager) NewFromRemoteObject

func (m *SNodeManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, error)

NewFromRemoteObject create local db SNode model by remote k8s node object

func (*SNodeManager) Usage

func (m *SNodeManager) Usage(clusters []sClusterUsage) (*api.NodeUsage, error)

func (*SNodeManager) ValidateCreateData

type SPV

type SPV struct {
	SClusterResourceBase
}

func (*SPV) GetDetails

func (obj *SPV) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

type SPVC

type SPVC struct {
	SNamespaceResourceBase
}

func (*SPVC) GetDetails

func (obj *SPVC) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SPVC) GetMountPodNames

func (obj *SPVC) GetMountPodNames(cli *client.ClusterManager, pvc *v1.PersistentVolumeClaim) ([]string, error)

func (*SPVC) GetRawPods

func (obj *SPVC) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)

func (*SPVC) SetStatusByRemoteObject

func (obj *SPVC) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

type SPVCManager

type SPVCManager struct {
	SNamespaceResourceBaseManager
}

+onecloud:swagger-gen-model-singular=persistentvolumeclaim +onecloud:swagger-gen-model-plural=persistentvolumeclaims

func GetPVCManager

func GetPVCManager() *SPVCManager

func (*SPVCManager) GetPVCVolumes

func (_ *SPVCManager) GetPVCVolumes(vols []v1.Volume) []v1.Volume

func (*SPVCManager) ListItemFilter

func (*SPVCManager) NewRemoteObjectForCreate

func (m *SPVCManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, body jsonutils.JSONObject) (interface{}, error)

type SPVManager

type SPVManager struct {
	SClusterResourceBaseManager
}

+onecloud:swagger-gen-model-singular=persistentvolume +onecloud:swagger-gen-model-plural=persistentvolumes

func GetPVManager

func GetPVManager() *SPVManager

type SPod

type SPod struct {
	SNamespaceResourceBase
	NodeId string `width:"36" charset:"ascii" nullable:"false"`

	// CpuRequests is number of allocated milicores
	CpuRequests int64 `list:"user"`
	// CpuLimits is defined cpu limit
	CpuLimits int64 `list:"user"`

	// MemoryRequests
	MemoryRequests int64 `list:"user"`
	// MemoryLimits
	MemoryLimits int64
}

func (*SPod) GetDetails

func (p *SPod) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SPod) GetExtraDetails

func (p *SPod) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.PodDetailV2, error)

func (*SPod) IsOwnedBy

func (p *SPod) IsOwnedBy(ownerModel IClusterModel) (bool, error)

func (*SPod) SetStatusByRemoteObject

func (p *SPod) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

func (*SPod) UpdateFromRemoteObject

func (p *SPod) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

type SPodManager

type SPodManager struct {
	SNamespaceResourceBaseManager
}

func GetPodManager

func GetPodManager() *SPodManager

func (*SPodManager) GetAllRawPods

func (m *SPodManager) GetAllRawPods(cluster *client.ClusterManager) ([]*v1.Pod, error)

func (*SPodManager) GetGCQuery

func (m *SPodManager) GetGCQuery() *sqlchemy.SQuery

func (*SPodManager) GetPodsByClusters

func (m *SPodManager) GetPodsByClusters(clusterIds []string) ([]SPod, error)

func (*SPodManager) GetRawPods

func (m *SPodManager) GetRawPods(cluster *client.ClusterManager, ns string) ([]*v1.Pod, error)

func (*SPodManager) GetRawPodsByObjectNamespace

func (m *SPodManager) GetRawPodsByObjectNamespace(cli *client.ClusterManager, obj runtime.Object) ([]*v1.Pod, error)

func (*SPodManager) GetRawPodsBySelector

func (m *SPodManager) GetRawPodsBySelector(cluster *client.ClusterManager, ns string, selecotr labels.Selector) ([]*v1.Pod, error)

func (*SPodManager) ListItemFilter

func (m *SPodManager) ListItemFilter(ctx context.Context,
	q *sqlchemy.SQuery,
	userCred mcclient.TokenCredential,
	input *api.PodListInput,
) (*sqlchemy.SQuery, error)

func (*SPodManager) NewFromRemoteObject

func (m *SPodManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, error)

func (*SPodManager) ValidateCreateData

type SRelease

type SRelease struct {
	SNamespaceResourceBase

	RepoId       string               `width:"128" charset:"ascii" nullable:"false" index:"true" list:"user"`
	Chart        string               `width:"128" charset:"ascii" nullable:"false" create:"required" index:"true" list:"user"`
	ChartVersion string               `width:"128" charset:"ascii" nullable:"false" list:"user"`
	Config       jsonutils.JSONObject `nullable:"true" list:"user" update:"user"`
}

func (*SRelease) CustomizeCreate

func (r *SRelease) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SRelease) DeleteRemoteObject

func (obj *SRelease) DeleteRemoteObject() error

func (*SRelease) GetChart

func (r *SRelease) GetChart() (*chart.Chart, error)

func (*SRelease) GetChartClient

func (r *SRelease) GetChartClient() (*helm.ChartClient, error)

func (*SRelease) GetDetails

func (rls *SRelease) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SRelease) GetDetailsHistory

func (obj *SRelease) GetDetailsHistory(ctx context.Context, userCred mcclient.TokenCredential, input *api.ReleaseHistoryInput) ([]api.ReleaseHistoryInfo, error)

func (*SRelease) GetDriver

func (r *SRelease) GetDriver() (IReleaseDriver, error)

func (*SRelease) GetHelmClient

func (r *SRelease) GetHelmClient() (*helm.Client, error)

func (*SRelease) GetHelmRelease

func (r *SRelease) GetHelmRelease(isList bool) (*api.ReleaseDetail, error)

func (*SRelease) GetHelmValues

func (r *SRelease) GetHelmValues() map[string]interface{}

func (*SRelease) GetRemoteObject

func (obj *SRelease) GetRemoteObject() (interface{}, error)

func (*SRelease) GetRepo

func (r *SRelease) GetRepo() (*SRepo, error)

func (*SRelease) GetType

func (r *SRelease) GetType() (api.RepoType, error)

func (*SRelease) PerformRollback

func (obj *SRelease) PerformRollback(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.ReleaseRollbackInput) (jsonutils.JSONObject, error)

func (*SRelease) PerformUpgrade

func (obj *SRelease) PerformUpgrade(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.ReleaseUpdateInput) (jsonutils.JSONObject, error)

func (*SRelease) PostCreate

func (rls *SRelease) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SRelease) SetStatusByRemoteObject

func (r *SRelease) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

func (*SRelease) UpdateFromRemoteObject

func (r *SRelease) UpdateFromRemoteObject(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	extObj interface{}) error

type SReleaseManager

type SReleaseManager struct {
	SNamespaceResourceBaseManager
	// contains filtered or unexported fields
}

func GetReleaseManager

func GetReleaseManager() *SReleaseManager

func (*SReleaseManager) CreateRemoteObject

func (m *SReleaseManager) CreateRemoteObject(model IClusterModel, _ *client.ClusterManager, _ interface{}) (interface{}, error)

func (*SReleaseManager) FetchCustomizeColumns

func (m *SReleaseManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool,
) []interface{}

func (*SReleaseManager) FilterByHiddenSystemAttributes

func (m *SReleaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacscope.TRbacScope) *sqlchemy.SQuery

func (*SReleaseManager) FilterBySystemAttributes

func (m *SReleaseManager) FilterBySystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacscope.TRbacScope) *sqlchemy.SQuery

func (*SReleaseManager) GetChartClient

func (m *SReleaseManager) GetChartClient(repo *SRepo) *helm.ChartClient

func (*SReleaseManager) GetDriver

func (m *SReleaseManager) GetDriver(typ api.RepoType) (IReleaseDriver, error)

func (*SReleaseManager) GetRemoteObjectGlobalId

func (m *SReleaseManager) GetRemoteObjectGlobalId(cluster *SCluster, obj interface{}) string

func (*SReleaseManager) IsRemoteObjectLocalExist

func (m *SReleaseManager) IsRemoteObjectLocalExist(userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, bool, error)

func (*SReleaseManager) ListItemFilter

func (*SReleaseManager) ListRemoteObjects

func (m *SReleaseManager) ListRemoteObjects(cli *client.ClusterManager) ([]interface{}, error)

func (*SReleaseManager) NewFromRemoteObject

func (m *SReleaseManager) NewFromRemoteObject(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	cluster *SCluster,
	obj interface{}) (IClusterModel, error)

func (*SReleaseManager) NewRemoteObjectForCreate

func (m *SReleaseManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SReleaseManager) RegisterDriver

func (m *SReleaseManager) RegisterDriver(driver IReleaseDriver)

func (*SReleaseManager) ShowChart

func (m *SReleaseManager) ShowChart(repo *SRepo, chartName string, version string) (*chart.Chart, error)

func (*SReleaseManager) ValidateCreateData

type SReplicaSet

type SReplicaSet struct {
	SNamespaceResourceBase
}

func (*SReplicaSet) GetDetails

func (obj *SReplicaSet) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SReplicaSet) GetExtraDetails

func (obj *SReplicaSet) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.ReplicaSetDetail, error)

func (*SReplicaSet) GetPodInfo

func (obj *SReplicaSet) GetPodInfo(cli *client.ClusterManager, rs *apps.ReplicaSet) (*api.PodInfo, error)

func (*SReplicaSet) GetRawPods

func (obj *SReplicaSet) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)

type SReplicaSetManager

type SReplicaSetManager struct {
	SNamespaceResourceBaseManager
}

+onecloud:swagger-gen-model-singular=replicaset +onecloud:swagger-gen-model-plural=replicasets

func GetReplicaSetManager

func GetReplicaSetManager() *SReplicaSetManager

func (*SReplicaSetManager) GetRawReplicaSets

func (m *SReplicaSetManager) GetRawReplicaSets(cluster *client.ClusterManager, namespace string, selector labels.Selector) ([]*apps.ReplicaSet, error)

func (*SReplicaSetManager) ValidateCreateData

type SRepo

type SRepo struct {
	db.SStatusInfrasResourceBase

	Url      string `width:"256" charset:"ascii" nullable:"false" create:"required" list:"user"`
	Username string `width:"256" charset:"ascii" nullable:"false" update:"user" list:"user"`
	Password string `width:"256" charset:"ascii" nullable:"false" update:"user"`
	Type     string `charset:"ascii" width:"128" create:"required" nullable:"true" list:"user"`
	Backend  string `charset:"ascii" width:"128" create:"required" nullable:"true" list:"user"`
}

func (*SRepo) Delete

func (r *SRepo) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SRepo) DoSync

func (r *SRepo) DoSync() error

func (*SRepo) GetBackend

func (r *SRepo) GetBackend() api.RepoBackend

func (*SRepo) GetChartClient

func (r *SRepo) GetChartClient() *helm.ChartClient

func (*SRepo) GetDetailsDownloadChart

func (r *SRepo) GetDetailsDownloadChart(ctx context.Context, userCred mcclient.TokenCredential, input *api.RepoDownloadChartInput) (jsonutils.JSONObject, error)

func (*SRepo) GetDriver

func (r *SRepo) GetDriver() IRepoDriver

func (*SRepo) GetReleaseCount

func (r *SRepo) GetReleaseCount() (int, error)

func (*SRepo) GetType

func (r *SRepo) GetType() api.RepoType

func (*SRepo) PerformSync

func (*SRepo) PerformUploadChart

func (r *SRepo) PerformUploadChart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SRepo) ToEntry

func (r *SRepo) ToEntry() *repo.Entry

func (*SRepo) ValidateDeleteCondition

func (r *SRepo) ValidateDeleteCondition(ctx context.Context, _ jsonutils.JSONObject) error

type SRepoManager

type SRepoManager struct {
	db.SStatusInfrasResourceBaseManager
}
var RepoManager *SRepoManager

func (*SRepoManager) AllowListItems

func (man *SRepoManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SRepoManager) FetchCustomizeColumns

func (man *SRepoManager) FetchCustomizeColumns(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	objs []interface{},
	fields stringutils2.SSortedStrings,
	isList bool) []api.RepoDetail

func (*SRepoManager) FetchRepoById

func (man *SRepoManager) FetchRepoById(id string) (*SRepo, error)

func (*SRepoManager) FetchRepoByIdOrName

func (man *SRepoManager) FetchRepoByIdOrName(ctx context.Context, userCred mcclient.IIdentityProvider, ident string) (*SRepo, error)

func (*SRepoManager) GetChartClient

func (man *SRepoManager) GetChartClient(projectId string) *helm.ChartClient

func (*SRepoManager) GetClient

func (man *SRepoManager) GetClient(projectId string) (*helm.RepoClient, error)

func (*SRepoManager) GetDriver

func (man *SRepoManager) GetDriver(backend api.RepoBackend) (IRepoDriver, error)

func (*SRepoManager) GetRepoDataDir

func (man *SRepoManager) GetRepoDataDir(projectId string) string

func (*SRepoManager) InitializeData

func (m *SRepoManager) InitializeData() error

func (*SRepoManager) ListItemFilter

func (man *SRepoManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.RepoListInput) (*sqlchemy.SQuery, error)

func (*SRepoManager) ListRepos

func (man *SRepoManager) ListRepos() ([]SRepo, error)

func (*SRepoManager) ResourceScope

func (man *SRepoManager) ResourceScope() rbacscope.TRbacScope

func (*SRepoManager) ToEntry

func (man *SRepoManager) ToEntry(name, url, username, password string) *repo.Entry

func (*SRepoManager) ValidateCreateData

type SResourceQuota

type SResourceQuota struct {
	SNamespaceResourceBase
}

func (*SResourceQuota) GetDetails

func (obj *SResourceQuota) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

type SResourceQuotaManager

type SResourceQuotaManager struct {
	SNamespaceResourceBaseManager
}

+onecloud:swagger-gen-model-singular=resourcequota +onecloud:swagger-gen-model-plural=resourcequotas

func GetResourceQuotaManager

func GetResourceQuotaManager() *SResourceQuotaManager

func (*SResourceQuotaManager) ValidateCreateData

type SRole

type SRole struct {
	SNamespaceResourceBase
}

func (*SRole) GetDetails

func (r *SRole) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SRole) NewRemoteObjectForUpdate

func (obj *SRole) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)

func (*SRole) UpdateFromRemoteObject

func (r *SRole) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

func (*SRole) ValidateUpdateData

func (obj *SRole) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.RoleUpdateInput) (*api.RoleUpdateInput, error)

type SRoleBinding

type SRoleBinding struct {
	SNamespaceResourceBase
}

func (*SRoleBinding) CustomizeCreate

func (obj *SRoleBinding) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SRoleBinding) GetDetails

func (rb *SRoleBinding) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SRoleBinding) NewRemoteObjectForUpdate

func (rb *SRoleBinding) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)

func (*SRoleBinding) UpdateFromRemoteObject

func (rb *SRoleBinding) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

type SRoleBindingManager

type SRoleBindingManager struct {
	SNamespaceResourceBaseManager
	SRoleRefResourceBaseManager
}

+onecloud:swagger-gen-model-singular=rbacrolebinding +onecloud:swagger-gen-model-plural=rbacrolebindings

func GetRoleBindingManager

func GetRoleBindingManager() *SRoleBindingManager

func (*SRoleBindingManager) ListItemFilter

func (*SRoleBindingManager) NewFromRemoteObject

func (m *SRoleBindingManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, error)

func (*SRoleBindingManager) NewRemoteObjectForCreate

func (m *SRoleBindingManager) NewRemoteObjectForCreate(obj IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SRoleBindingManager) ValidateCreateData

func (*SRoleBindingManager) ValidateRoleBinding

func (m *SRoleBindingManager) ValidateRoleBinding(rb *rbacv1.RoleBinding) error

type SRoleManager

type SRoleManager struct {
	SNamespaceResourceBaseManager
}

+onecloud:swagger-gen-model-singular=rbacrole +onecloud:swagger-gen-model-plural=rbacroles

func GetRoleManager

func GetRoleManager() *SRoleManager

func (*SRoleManager) GetRoleKind

func (m *SRoleManager) GetRoleKind() string

func (*SRoleManager) ListItemFilter

func (*SRoleManager) NewFromRemoteObject

func (m *SRoleManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, error)

func (*SRoleManager) NewRemoteObjectForCreate

func (m *SRoleManager) NewRemoteObjectForCreate(obj IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SRoleManager) ValidateCreateData

func (*SRoleManager) ValidateRoleObject

func (m *SRoleManager) ValidateRoleObject(role *rbacv1.Role) error

type SRoleRefResourceBase

type SRoleRefResourceBase struct {
	Subjects *api.Subjects `list:"user" update:"user" create:"optional"`
	RoleRef  *api.RoleRef  `list:"user" update:"user" create:"required"`
}

func (*SRoleRefResourceBase) CustomizeCreate

func (obj *SRoleRefResourceBase) CustomizeCreate(input *api.RoleRef) error

type SRoleRefResourceBaseManager

type SRoleRefResourceBaseManager struct{}

func (*SRoleRefResourceBaseManager) ValidateRoleRef

func (m *SRoleRefResourceBaseManager) ValidateRoleRef(ctx context.Context, roleObjManager IRoleBaseManager, userCred mcclient.TokenCredential, ref *api.RoleRef) error

type SSecret

type SSecret struct {
	SNamespaceResourceBase
	Type string `width:"64" charset:"ascii" nullable:"false" list:"user"`
}

func (*SSecret) GetDetails

func (obj *SSecret) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SSecret) GetRawPods

func (obj *SSecret) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)

func (*SSecret) UpdateFromRemoteObject

func (s *SSecret) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

type SSecretManager

type SSecretManager struct {
	SNamespaceResourceBaseManager
	// contains filtered or unexported fields
}

func GetSecretManager

func GetSecretManager() *SSecretManager

func (SSecretManager) GetDriver

func (m SSecretManager) GetDriver(typ v1.SecretType) (ISecretDriver, error)

func (SSecretManager) GetRawSecrets

func (m SSecretManager) GetRawSecrets(cluster *client.ClusterManager, ns string) ([]*v1.Secret, error)

func (*SSecretManager) ListItemFilter

func (m *SSecretManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.SecretListInput) (*sqlchemy.SQuery, error)

func (*SSecretManager) NewRemoteObjectForCreate

func (m *SSecretManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, body jsonutils.JSONObject) (interface{}, error)

func (*SSecretManager) RegisterDriver

func (m *SSecretManager) RegisterDriver(typ v1.SecretType, driver ISecretDriver)

func (*SSecretManager) ValidateCreateData

type SService

type SService struct {
	SNamespaceResourceBase
}

func (*SService) GetDetails

func (obj *SService) GetDetails(
	ctx context.Context,
	cli *client.ClusterManager,
	base interface{},
	k8sObj runtime.Object,
	isList bool,
) interface{}

func (*SService) GetRawPods

func (obj *SService) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)

func (*SService) IsOwnedBy

func (obj *SService) IsOwnedBy(ownerModel IClusterModel) (bool, error)

type SServiceAccount

type SServiceAccount struct {
	SNamespaceResourceBase
}

func (*SServiceAccount) GetDetails

func (obj *SServiceAccount) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

type SServiceAccountManager

type SServiceAccountManager struct {
	SNamespaceResourceBaseManager
}

+onecloud:swagger-gen-model-singular=serviceaccount +onecloud:swagger-gen-model-plural=serviceaccounts

var (
	ServiceAccountManager *SServiceAccountManager
)

func (*SServiceAccountManager) ValidateCreateData

type SServiceManager

type SServiceManager struct {
	SNamespaceResourceBaseManager
}

func GetServiceManager

func GetServiceManager() *SServiceManager

func (*SServiceManager) GetRawServicesByMatchLabels

func (m *SServiceManager) GetRawServicesByMatchLabels(cli *client.ClusterManager, namespace string, matchLabels map[string]string) ([]*v1.Service, error)

func (*SServiceManager) NewRemoteObjectForCreate

func (m *SServiceManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SServiceManager) ValidateCreateData

func (*SServiceManager) ValidateService

func (m *SServiceManager) ValidateService(svc *v1.Service) error

type SStatefulSet

type SStatefulSet struct {
	SNamespaceResourceBase
}

func (*SStatefulSet) GetDetails

func (obj *SStatefulSet) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SStatefulSet) GetExtraDetails

func (obj *SStatefulSet) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.StatefulSetDetailV2, error)

func (*SStatefulSet) GetPodInfo

func (obj *SStatefulSet) GetPodInfo(cli *client.ClusterManager, ss *apps.StatefulSet) (*api.PodInfo, error)

func (*SStatefulSet) GetRawPods

func (obj *SStatefulSet) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)

func (*SStatefulSet) GetRawServices

func (obj *SStatefulSet) GetRawServices(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Service, error)

func (*SStatefulSet) NewRemoteObjectForUpdate

func (obj *SStatefulSet) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)

func (*SStatefulSet) SetStatusByRemoteObject

func (obj *SStatefulSet) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

func (*SStatefulSet) UpdateFromRemoteObject

func (obj *SStatefulSet) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error

type SStatefulSetManager

type SStatefulSetManager struct {
	SNamespaceResourceBaseManager
}

+onecloud:swagger-gen-model-singular=statefulset +onecloud:swagger-gen-model-plural=statefulsets

func GetStatefulSetManager

func GetStatefulSetManager() *SStatefulSetManager

func (*SStatefulSetManager) NewRemoteObjectForCreate

func (m *SStatefulSetManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)

func (*SStatefulSetManager) ValidateCreateData

func (*SStatefulSetManager) ValidateStatefulSetObject

func (m *SStatefulSetManager) ValidateStatefulSetObject(deploy *apps.StatefulSet) error

type SStorageClass

type SStorageClass struct {
	SClusterResourceBase
}

func (*SStorageClass) AllowPerformSetDefault

func (obj *SStorageClass) AllowPerformSetDefault(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) bool

func (*SStorageClass) GetDetails

func (m *SStorageClass) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, k8sObj runtime.Object, isList bool) interface{}

func (*SStorageClass) PerformSetDefault

func (obj *SStorageClass) PerformSetDefault(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

type SStorageClassManager

type SStorageClassManager struct {
	SClusterResourceBaseManager
	// contains filtered or unexported fields
}

+onecloud:swagger-gen-model-singular=storageclass +onecloud:swagger-gen-model-plural=storageclasses

func GetStorageClassManager

func GetStorageClassManager() *SStorageClassManager

func (*SStorageClassManager) GetDriver

func (m *SStorageClassManager) GetDriver(provisioner string) (IStorageClassDriver, error)

func (*SStorageClassManager) GetRawStorageClasses

func (m *SStorageClassManager) GetRawStorageClasses(cli *client.ClusterManager) ([]*v1.StorageClass, error)

func (*SStorageClassManager) NewRemoteObjectForCreate

func (m *SStorageClassManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, body jsonutils.JSONObject) (interface{}, error)

func (*SStorageClassManager) PerformConnectionTest

func (*SStorageClassManager) RegisterDriver

func (m *SStorageClassManager) RegisterDriver(provisioner string, driver IStorageClassDriver)

type SSyncableK8sBaseResource

type SSyncableK8sBaseResource struct {
	SyncStatus    string    `width:"20" charset:"ascii" default:"idle" list:"domain"`
	SyncMessage   string    `charset:"utf8" list:"domain"`
	LastSync      time.Time `list:"domain"`
	LastSyncEndAt time.Time `list:"domain"`
}

func (*SSyncableK8sBaseResource) CanSync

func (self *SSyncableK8sBaseResource) CanSync() (bool, error)

func (*SSyncableK8sBaseResource) MarkEndSync

func (*SSyncableK8sBaseResource) MarkErrorSync

func (_ *SSyncableK8sBaseResource) MarkErrorSync(ctx context.Context, obj IK8sSyncModel, err error) error

func (*SSyncableK8sBaseResource) MarkSyncing

func (*SSyncableK8sBaseResource) SaveSyncMessage

func (self *SSyncableK8sBaseResource) SaveSyncMessage(obj IK8sSyncModel, msg string)

func (*SSyncableK8sBaseResource) SetLastSync

func (self *SSyncableK8sBaseResource) SetLastSync(syncTime time.Time)

func (*SSyncableK8sBaseResource) SetLastSyncEndAt

func (self *SSyncableK8sBaseResource) SetLastSyncEndAt(endAt time.Time)

func (*SSyncableK8sBaseResource) SetSyncMessage

func (self *SSyncableK8sBaseResource) SetSyncMessage(msg string)

func (*SSyncableK8sBaseResource) SetSyncStatus

func (self *SSyncableK8sBaseResource) SetSyncStatus(status string)

type SSyncableK8sBaseResourceManager

type SSyncableK8sBaseResourceManager struct{}

func (*SSyncableK8sBaseResourceManager) ListItemFilter

type SSyncableManager

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

func (*SSyncableManager) AddSubManager

func (m *SSyncableManager) AddSubManager(mans ...ISyncableManager) *SSyncableManager

func (*SSyncableManager) GetSubManagers

func (m *SSyncableManager) GetSubManagers() []ISyncableManager

type SThanosComponent

type SThanosComponent struct {
	SComponent
}

type SThanosComponentManager

type SThanosComponentManager struct {
	SComponentManager
	HelmComponentManager
}
var (
	ThanosComponentManager *SThanosComponentManager
)

func NewThanosComponentManager

func NewThanosComponentManager() *SThanosComponentManager

func (SThanosComponentManager) CreateHelmResource

func (m SThanosComponentManager) CreateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

func (SThanosComponentManager) DeleteHelmResource

func (m SThanosComponentManager) DeleteHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

func (SThanosComponentManager) GetHelmValues

func (m SThanosComponentManager) GetHelmValues(cluster *SCluster, setting *api.ComponentSettings) (map[string]interface{}, error)

func (SThanosComponentManager) UpdateHelmResource

func (m SThanosComponentManager) UpdateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error

type SVirtualMachine

type SVirtualMachine struct {
	model.SK8sNamespaceResourceBase
	UnstructuredResourceBase
}

func (*SVirtualMachine) FillAPIObjectBySpec

func (obj *SVirtualMachine) FillAPIObjectBySpec(specObj jsonutils.JSONObject, output IUnstructuredOutput) error

func (*SVirtualMachine) FillAPIObjectByStatus

func (obj *SVirtualMachine) FillAPIObjectByStatus(statusObj jsonutils.JSONObject, output IUnstructuredOutput) error

func (*SVirtualMachine) GetAPIObject

func (obj *SVirtualMachine) GetAPIObject() (*api.VirtualMachine, error)

type SVirtualMachineManager

type SVirtualMachineManager struct {
	model.SK8sNamespaceResourceBaseManager
}

func GetVirtualMachineManager

func GetVirtualMachineManager() *SVirtualMachineManager

func (*SVirtualMachineManager) GetK8sResourceInfo

func (m *SVirtualMachineManager) GetK8sResourceInfo() model.K8sResourceInfo

type UnstructuredResourceBase

type UnstructuredResourceBase struct{}

func (UnstructuredResourceBase) ConvertToAPIObject

func (res UnstructuredResourceBase) ConvertToAPIObject(m IK8SUnstructuredModel, output IUnstructuredOutput) error

func (UnstructuredResourceBase) GetRawJSONObject

func (UnstructuredResourceBase) GetUnstructuredObject

Directories

Path Synopsis
drivers

Jump to

Keyboard shortcuts

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