Documentation ¶
Index ¶
- Constants
- Variables
- func CompareRemoteObjectSets(localObjs []IClusterModel, extObjs []interface{}, ...) error
- func CompareSetsByFunc(localObjs []IClusterModel, ...) error
- func ConvertRawToAPIObject(man model.IK8sModelManager, cluster model.ICluster, obj runtime.Object, ...) error
- func ConvertRawToAPIObjects(man model.IK8sModelManager, cluster model.ICluster, objs interface{}, ...) error
- func CreateMinioHelmResource(man HelmComponentManager, cluster *SCluster, setting *api.ComponentSettings, ...) error
- func CreateRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, ...) (interface{}, error)
- func CreateService(cliMan *client.ClusterManager, svc *v1.Service) (*v1.Service, error)
- func CreateServiceByOption(cli *client.ClusterManager, objMeta *metav1.ObjectMeta, ...) (*v1.Service, error)
- func CreateServiceIfNotExist(cli *client.ClusterManager, objMeta *metav1.ObjectMeta, ...) (*v1.Service, error)
- func DeleteMinioHelmResource(man HelmComponentManager, cluster *SCluster) error
- func DeleteRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func DoDisableMinio(man IMinioComponentManager, cluster *SCluster, setting *api.ComponentSettings) error
- func DoEnableMinio(man IMinioComponentManager, cluster *SCluster, setting *api.ComponentSettings) error
- func DoUpdateMinio(man IMinioComponentManager, cluster *SCluster, setting *api.ComponentSettings) error
- func EnsureNamespace(cluster *SCluster, namespace string) error
- func EqualIgnoreHash(template1, template2 v1.PodTemplateSpec) bool
- func ExtractFieldPathAsString(obj interface{}, fieldPath string) (string, error)
- func FetchClusterResourceCustomizeColumns(baseGet func(obj interface{}) interface{}, ctx context.Context, ...) []interface{}
- func FilterDeploymentPodsByOwnerReference(deployment *apps.Deployment, allRS []*apps.ReplicaSet, allPods []*v1.Pod) []*v1.Pod
- func FilterPodsByControllerRef(owner metav1.Object, allPods []*v1.Pod) []*v1.Pod
- func FindNewReplicaSet(deployment *apps.Deployment, rsList []*apps.ReplicaSet) (*apps.ReplicaSet, error)
- func FormatMap(m map[string]string) (fmtStr string)
- func GetAdminCred() mcclient.TokenCredential
- func GetAdminSession() (*mcclient.ClientSession, error)
- func GetChartRawFiles(chObj *chart.Chart) []*chart.File
- func GetClusterClient(clsId string) (*client.ClusterManager, error)
- func GetComponentImageRepository(cluster *SCluster, setting *api.ComponentSettings) (*api.ImageRepository, error)
- func GetConfigMapsForPod(pod *v1.Pod, cfgs []*v1.ConfigMap) []*v1.ConfigMap
- func GetContainerImages(podTemplate *v1.PodSpec) []api.ContainerImage
- func GetDataDeployAction(data *jsonutils.JSONDict) (api.ClusterDeployAction, error)
- func GetDataDeployMachineIds(data *jsonutils.JSONDict) ([]string, error)
- func GetDataDeploySkipDownloads(data *jsonutils.JSONDict) bool
- func GetExternalEndpoints(service *v1.Service) []api.Endpoint
- func GetFedClustersApiResources(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.IClusterRemoteResources, error)
- func GetFedClustersUserGroups(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.IClusterRemoteResources, error)
- func GetFedClustersUsers(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.IClusterRemoteResources, error)
- func GetInitContainerImages(podTemplate *v1.PodSpec) []api.ContainerImage
- func GetInternalEndpoint(serviceName, namespace string, ports []v1.ServicePort) api.Endpoint
- func GetK8SObjectTypeMeta(kObj runtime.Object) metav1.TypeMeta
- func GetK8SResourceMetaDetail(k8sObj runtime.Object, detail api.ClusterResourceDetail) api.ClusterResourceDetail
- func GetK8sModelManagerByKind(kindName string) model.IK8sModelManager
- func GetK8sObject(res IClusterModel) (runtime.Object, error)
- func GetK8sResourceManagerByKind(kindName string) manager.IK8sResourceManager
- func GetMinioHelmValues(cluster *SCluster, setting *api.ComponentSettings, ...) (map[string]interface{}, error)
- func GetNewReplicaSetTemplate(deployment *apps.Deployment) v1.PodTemplateSpec
- func GetObjectPtr(obj interface{}) interface{}
- func GetPodConfigMapVolumes(pod *v1.Pod) []v1.Volume
- func GetPodInfo(current int32, desired *int32, pods []*v1.Pod) (*api.PodInfo, error)
- func GetPodSecretVolumes(pod *v1.Pod) []v1.Volume
- func GetRawPodsByController(cli *client.ClusterManager, obj metav1.Object) ([]*v1.Pod, error)
- func GetReleasePods(rel *release.Release, clusterMan model.ICluster) ([]v1.Pod, error)
- func GetReleasePodsStatus(rel *release.Release, clusterMan model.ICluster) (map[string]string, error)
- func GetReleaseResources(cli *helm.Client, rel *release.Release, clusterMan model.ICluster) (map[string][]interface{}, error)
- func GetResourcesByClusters(man IClusterModelManager, clusterIds []string, ret interface{}) error
- func GetSecretsForPod(pod *v1.Pod, ss []*v1.Secret) []*v1.Secret
- func GetServiceFromOption(objMeta *metav1.ObjectMeta, opt *api.ServiceCreateOption) *v1.Service
- func GetServicePorts(apiPorts []v1.ServicePort) []api.ServicePort
- func GetServicePortsByMapping(ps []api.PortMapping) []v1.ServicePort
- func GetUserSession(ctx context.Context, userCred mcclient.TokenCredential) (*mcclient.ClientSession, error)
- func GroupCreateMachineDatas(clusterId string, data []*api.CreateMachineData) ([]*api.CreateMachineData, []*api.CreateMachineData)
- func InitDB() error
- func IsObjectContains(obj metav1.Object, objs interface{}) bool
- func IsPodOwner(owner IPodOwnerModel, pod *SPod) (bool, error)
- func IsServiceOwner(owner IServiceOwnerModel, svc *SService) (bool, error)
- func K8SObjectToJSONObject(obj runtime.Object) jsonutils.JSONObject
- func LoadEmbedChart(chartName string) (*chart.Chart, error)
- func MergeValues(yamlStr string, sets map[string]string) (map[string]interface{}, error)
- func NewCheckIdOrNameError(res, resName string, err error) error
- func NewFedJointManager(factory func() db.IJointModelManager) db.IJointModelManager
- func NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, ...) (db.IModel, error)
- func NewHelmClient(cluster *SCluster, namespace string) (*helm.Client, error)
- func NewObjectMeta(res IClusterModel) (api.ObjectMeta, error)
- func OnRemoteObjectDelete(resMan IClusterModelManager, ctx context.Context, ...) error
- func PodRequestsAndLimits(pod *v1.Pod) (reqs map[v1.ResourceName]resource.Quantity, ...)
- func RegisterClusterDriver(driver IClusterDriver)
- func RegisterContainerRegistryDriver(driver IContainerRegistryDriver)
- func RegisterFedJointClusterManager(masterMan IFedModelManager, jointMan IFedJointClusterManager)
- func RegisterK8sModelManager(man IK8sModelManager)
- func RegisterMachineDriver(driver IMachineDriver)
- func RegisterRepoDriver(driver IRepoDriver)
- func RegisterSerializable(objs ...gotypes.ISerializable)
- func RunBatchTask(ctx context.Context, items []db.IStandaloneModel, ...) error
- func RunSyncClusterTask(task appsrv.IWorkerTask)
- func SetDataDeployAction(data *jsonutils.JSONDict, action api.ClusterDeployAction)
- func SetDataDeployMachineIds(data *jsonutils.JSONDict, ids ...string) error
- func SetDataDeploySkipDownloads(data *jsonutils.JSONDict, skipDownloads bool)
- func SetJSONDataDefault(data *jsonutils.JSONDict, key string, defVal string) string
- func SortConditions(conds []*api.Condition) []*api.Condition
- func SyncClusterResources(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) error
- func SyncRemovedClusterResource(ctx context.Context, userCred mcclient.TokenCredential, dbObj IClusterModel) error
- func SyncUpdatedClusterResource(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func TaskManager() *appsrv.SWorkerManager
- func ToRelease(release *release.Release, clusterCli *client.ClusterManager) *api.Release
- func ToResourceEventNote(ctx context.Context, userCred mcclient.TokenCredential, res INamespaceModel, ...) interface{}
- func UpdateK8sObject(res IClusterModel, data jsonutils.JSONObject) (runtime.Object, error)
- func UpdateMinioHelmResource(man HelmComponentManager, cluster *SCluster, setting *api.ComponentSettings, ...) error
- func UpdatePodTemplate(temp *v1.PodTemplateSpec, input api.PodTemplateUpdateInput) error
- func UpdateRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, model IClusterModel, ...) (interface{}, error)
- func ValidateAppCreateService(userCred mcclient.TokenCredential, nsInput api.NamespaceResourceCreateInput, ...) error
- func ValidateCreateK8sObject(versionObj runtime.Object, internalObj interface{}, ...) error
- func ValidateFederatedRoleRef(ctx context.Context, userCred mcclient.TokenCredential, roleRef rbac.RoleRef) error
- func ValidatePodTemplate(userCred mcclient.TokenCredential, clusterId string, namespaceId string, ...) error
- func ValidateRole(role string) error
- func ValidateUpdateClusterRoleBindingObject(oldObj, newObj *rbacv1.ClusterRoleBinding) error
- func ValidateUpdateClusterRoleObject(oldObj, newObj *rbacv1.ClusterRole) error
- func ValidateUpdateData(obj IClusterModel, ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func ValidateUpdateFedClusterRoleBindingObject(oldObj, newObj *rbacv1.ClusterRoleBinding) error
- func ValidateUpdateFedClusterRoleObject(oldObj, newObj *rbacv1.ClusterRole) error
- func ValidateUpdateFedRoleBindingObject(oldObj, newObj *rbacv1.RoleBinding) error
- func ValidateUpdateFedRoleObject(oldObj, newObj *rbacv1.Role) error
- func ValidateUpdateK8sObject(ovObj, nvObj runtime.Object, oObj, nObj interface{}, ...) error
- func ValidateUpdateRoleBindingObject(oldObj, newObj *rbacv1.RoleBinding) error
- func ValidateUpdateRoleObject(oldObj, newObj *rbacv1.Role) error
- func ValueToJSONDict(out reflect.Value) *jsonutils.JSONDict
- func ValueToJSONObject(out reflect.Value) jsonutils.JSONObject
- func WaitMachineDelete(ctx context.Context, machine *SMachine) error
- func WaitMachineRunning(machine *SMachine) error
- type CephCSIClusterConfig
- type ClusterHelmChartInstallOption
- type HelmComponentManager
- func (m HelmComponentManager) CreateHelmResource(cluster *SCluster, vals map[string]interface{}) error
- func (m HelmComponentManager) DeleteHelmResource(cluster *SCluster) error
- func (m HelmComponentManager) HelmInstall(cluster *SCluster, namespace string, chartName string, releaseName string, ...) (*release.Release, error)
- func (m HelmComponentManager) HelmUninstall(cluster *SCluster, namespace string, releaseName string) error
- func (m HelmComponentManager) HelmUpdate(cluster *SCluster, namespace string, chartName string, releaseName string, ...) (*release.Release, error)
- func (m HelmComponentManager) NewHelmClient(cluster *SCluster, namespace string) (*helm.Client, error)
- func (m HelmComponentManager) UpdateHelmResource(cluster *SCluster, vals map[string]interface{}) error
- type IClusterDriver
- type IClusterDriverMethods
- type IClusterModel
- func FetchClusterResourceById(manager IClusterModelManager, clusterId string, namespaceId string, ...) (IClusterModel, error)
- func FetchClusterResourceByIdOrName(manager IClusterModelManager, userCred mcclient.IIdentityProvider, ...) (IClusterModel, error)
- func FetchClusterResourceByName(manager IClusterModelManager, userCred mcclient.IIdentityProvider, ...) (IClusterModel, error)
- func GetClusterModelObjects(man IClusterModelManager, cluster *SCluster) ([]IClusterModel, error)
- type IClusterModelManager
- type IClusterResAPI
- type IComponentDriver
- type IContainerRegistryDriver
- type IEventManager
- type IFedClusterResAPI
- type IFedJointClusterManager
- type IFedJointClusterModel
- type IFedJointClusterResAPI
- type IFedJointManager
- type IFedJointModel
- type IFedJointResAPI
- type IFedModel
- type IFedModelManager
- type IFedNamespaceJointClusterManager
- type IFedNamespaceJointClusterModel
- type IFedNamespaceJointClusterResAPI
- type IFedNamespaceModel
- type IFedNamespaceResAPI
- type IFedResAPI
- type IK8SUnstructuredModel
- type IK8sModelManager
- type IK8sOwnedResource
- type IK8sSyncModel
- type IMachineDriver
- type IMinioComponentManager
- type INamespaceModel
- type INamespaceResAPI
- type IPodOwnerModel
- type IReleaseDriver
- type IRepoDriver
- type IRoleBaseManager
- type ISecretDriver
- type IServiceOwnerModel
- type IStorageClassDriver
- type ISyncableManager
- type IUnstructuredOutput
- type K8SComponentManager
- func (m K8SComponentManager) EnsureNamespace(cluster *SCluster, namespace string) error
- func (m K8SComponentManager) KubectlApply(cluster *SCluster, manifest string) error
- func (m K8SComponentManager) KubectlDelete(cluster *SCluster, manifest string) error
- func (m K8SComponentManager) NewKubectl(cluster *SCluster) (*cmd.Client, error)
- type SAnsiblePlaybook
- type SAnsiblePlaybookManager
- type SAnsiblePlaybookTemplate
- func (obj *SAnsiblePlaybookTemplate) FillAPIObjectBySpec(specObj jsonutils.JSONObject, out IUnstructuredOutput) error
- func (obj *SAnsiblePlaybookTemplate) FillAPIObjectByStatus(statusObj jsonutils.JSONObject, out IUnstructuredOutput) error
- func (obj *SAnsiblePlaybookTemplate) GetAPIObject() (*api.AnsiblePlaybookTemplate, error)
- type SAnsiblePlaybookTemplateManager
- type SCephCSIComponent
- type SCephCSIComponentManager
- type SCluster
- func (c *SCluster) AllowGetDetailsComponentSetting(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowGetDetailsComponentsStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowGetDetailsKubeconfig(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowPerformAddMachines(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowPerformApplyAddons(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowPerformDeleteComponent(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowPerformDeleteMachines(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowPerformDisableComponent(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowPerformEnableComponent(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowPerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) AllowPerformUpdateComponent(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (c *SCluster) CheckPVCEmpty() error
- func (c *SCluster) CreateMachines(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (cluster *SCluster) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (c *SCluster) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (c *SCluster) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (c *SCluster) DeleteAllComponents(ctx context.Context, userCred mcclient.TokenCredential) error
- func (c *SCluster) DisableBidirectionalSync() error
- func (c *SCluster) EnableBidirectionalSync() error
- func (c *SCluster) EnableComponent(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (c *SCluster) FillMachinePrepareInput(input *api.MachinePrepareInput) (*api.MachinePrepareInput, error)
- func (c *SCluster) GetAPIServer() (string, error)
- func (c *SCluster) GetAPIServerInternalEndpoint() (string, error)
- func (c *SCluster) GetAPIServerPublicEndpoint() (string, error)
- func (cluster *SCluster) GetAddonsConfig() (*api.ClusterAddonsManifestConfig, error)
- func (c *SCluster) GetAdminKubeconfig() (string, error)
- func (c *SCluster) GetCAKeyPair() (*api.KeyPair, error)
- func (c *SCluster) GetClientV2() (*clientv2.Client, error)
- func (c *SCluster) GetClusterComponents() ([]SClusterComponent, error)
- func (c *SCluster) GetComponentByType(cType string) (*SComponent, error)
- func (c *SCluster) GetComponentByTypeNoError(cType string) (*SComponent, error)
- func (c *SCluster) GetComponents() ([]*SComponent, error)
- func (c *SCluster) GetComponentsStatus() (*api.ComponentsStatus, error)
- func (c *SCluster) GetControlPlaneUrl() (string, error)
- func (c *SCluster) GetControlplaneMachines() ([]manager.IMachine, error)
- func (c *SCluster) GetDefaultMachineDockerConfig(imageRepo *api.ImageRepository) (*api.DockerConfig, error)
- func (c *SCluster) GetDeployMachines(includeMs []manager.IMachine) ([]manager.IMachine, error)
- func (c *SCluster) GetDetailsAddons(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) GetDetailsApiResources(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ClusterAPIGroupResources, error)
- func (c *SCluster) GetDetailsClusterUserGroups(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ClusterUserGroups, error)
- func (c *SCluster) GetDetailsClusterUsers(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ClusterUsers, error)
- func (c *SCluster) GetDetailsComponentSetting(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) GetDetailsComponentsStatus(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ComponentsStatus, error)
- func (c *SCluster) GetDetailsExtraConfig(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) GetDetailsKubeconfig(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) GetDetailsKubesprayConfig(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ClusterKubesprayConfig, error)
- func (cluster *SCluster) GetDistributionInfo() (*api.ClusterDistributionInfo, error)
- func (c *SCluster) GetDriver() IClusterDriver
- func (cluster *SCluster) GetExtraConfig() (*api.ClusterExtraConfig, error)
- func (c *SCluster) GetImageRepository() (*api.ImageRepository, error)
- func (c *SCluster) GetK8sClient() (*kubernetes.Clientset, error)
- func (c *SCluster) GetK8sClientConfig(kubeConfig []byte) (*rest.Config, error)
- func (c *SCluster) GetK8sResourceManager(kindName string) manager.IK8sResourceManager
- func (c *SCluster) GetK8sRestConfig() (*rest.Config, error)
- func (c *SCluster) GetKubeconfig() (string, error)
- func (c *SCluster) GetKubeconfigByCerts() (string, error)
- func (c *SCluster) GetMachineByName(name string) (*SMachine, error)
- func (c *SCluster) GetMachines() ([]manager.IMachine, error)
- func (c *SCluster) GetMachinesByRole(role string) ([]manager.IMachine, error)
- func (c *SCluster) GetMachinesCount() (int, error)
- func (c *SCluster) GetMode() api.ModeType
- func (c *SCluster) GetNodesCount() (int, error)
- func (c *SCluster) GetPVCCount() (int, error)
- func (c *SCluster) GetPodCidr() string
- func (c *SCluster) GetRemoteClient() (*client.ClusterManager, error)
- func (c *SCluster) GetRunningControlplaneMachine() (manager.IMachine, error)
- func (c *SCluster) GetServiceCidr() string
- func (c *SCluster) GetServiceDomain() string
- func (c *SCluster) GetVersion() string
- func (c *SCluster) IsHealthy() error
- func (c *SCluster) IsImported() bool
- func (c *SCluster) IsInClassicNetwork() bool
- func (c *SCluster) IsSystemCluster() bool
- func (c *SCluster) LogPrefix() string
- func (c *SCluster) NeedControlplane() (bool, error)
- func (c *SCluster) PerformAddMachines(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformApplyAddons(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformClientDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformDeleteComponent(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformDeleteMachines(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformDeploy(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformDisableComponent(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformEnableComponent(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformSetExtraConfig(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformSetKubeconfig(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PerformUpdateComponent(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (c *SCluster) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (c *SCluster) PurgeAllClusterResource(ctx context.Context, userCred mcclient.TokenCredential) error
- func (c *SCluster) PurgeAllFedResource(ctx context.Context, userCred mcclient.TokenCredential) error
- func (c *SCluster) ReRunDeployingComponents() error
- func (c *SCluster) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (c *SCluster) SetAPIServer(apiServer string) error
- func (c *SCluster) SetCAKeyPair(kp *api.KeyPair) error
- func (c *SCluster) SetK8sVersion(ctx context.Context, version string) error
- func (c *SCluster) SetKubeconfig(kubeconfig string) error
- func (c *SCluster) StartApplyAddonsTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (c *SCluster) StartClusterCreateTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (c *SCluster) StartClusterDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (c *SCluster) StartCreateMachinesTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (c *SCluster) StartDeleteMachinesTask(ctx context.Context, userCred mcclient.TokenCredential, ms []manager.IMachine, ...) error
- func (c *SCluster) StartDeployMachinesTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (c *SCluster) StartSyncStatus(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error
- func (c *SCluster) StartSyncTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (c *SCluster) SubmitSyncTask(ctx context.Context, userCred mcclient.TokenCredential, waitChan chan error)
- func (c *SCluster) SyncCallSyncTask(ctx context.Context, userCred mcclient.TokenCredential) error
- func (c *SCluster) SyncInfoFromCloud(ctx context.Context, s *mcclient.ClientSession) error
- func (c *SCluster) SyncK8sMachinesConfig(ctx context.Context, cred mcclient.TokenCredential) error
- func (c *SCluster) ValidateAddMachines(ctx context.Context, userCred mcclient.TokenCredential, ...) ([]*api.CreateMachineData, error)
- func (c *SCluster) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error
- type SClusterComponent
- func (joint *SClusterComponent) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (joint *SClusterComponent) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (joint *SClusterComponent) DoSave(ctx context.Context) error
- func (joint *SClusterComponent) GetComponent() (*SComponent, error)
- func (joint *SClusterComponent) Master() db.IStandaloneModel
- func (joint *SClusterComponent) Slave() db.IStandaloneModel
- type SClusterComponentManager
- func (m *SClusterComponentManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (m *SClusterComponentManager) GetByComponent(componentId string) ([]SClusterComponent, error)
- func (m *SClusterComponentManager) GetComponentsByCluster(clusterId string) ([]SComponent, error)
- func (joint *SClusterComponentManager) GetMasterFieldName() string
- func (joint *SClusterComponentManager) GetSlaveFieldName() string
- type SClusterJointsBase
- type SClusterJointsManager
- type SClusterManager
- func (m *SClusterManager) AllowGetPropertyK8sVersions(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (m *SClusterManager) AllowPerformCheckSystemReady(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (m *SClusterManager) AllowPerformPreCheck(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (m *SClusterManager) ClusterHealthCheckTask(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
- func (m *SClusterManager) CreateCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (manager.ICluster, error)
- func (m *SClusterManager) FetchClusterByIdOrName(ctx context.Context, userCred mcclient.TokenCredential, id string) (manager.ICluster, error)
- func (m *SClusterManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []*jsonutils.JSONDict
- func (m *SClusterManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (c *SClusterManager) GetAllowedControlplanceCount() []int
- func (m *SClusterManager) GetCluster(id string) (*SCluster, error)
- func (m *SClusterManager) GetClusterByIdOrName(ctx context.Context, userCred mcclient.TokenCredential, id string) (*SCluster, error)
- func (m *SClusterManager) GetClusters() ([]manager.ICluster, error)
- func (m *SClusterManager) GetClustersByStatus(status ...string) ([]manager.ICluster, error)
- func (m *SClusterManager) GetDriverByQuery(query jsonutils.JSONObject) (IClusterDriver, error)
- func (man *SClusterManager) GetImageRepository(input *api.ImageRepository) *api.ImageRepository
- func (m *SClusterManager) GetPropertyK8sVersions(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (m *SClusterManager) GetPropertyUsableInstances(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (man *SClusterManager) GetRegistryUrlByRepoUrl(imageRepo string) (string, error)
- func (m *SClusterManager) GetRunningClusters() ([]manager.ICluster, error)
- func (m *SClusterManager) GetSession() (*mcclient.ClientSession, error)
- func (m *SClusterManager) GetSystemCluster() (*SCluster, error)
- func (m *SClusterManager) GetSystemClusterConfig() (*rest.Config, error)
- func (m *SClusterManager) GetSystemClusterCreateData() (*api.ClusterCreateInput, error)
- func (m *SClusterManager) GetSystemClusterK8SInfo() (*k8sInfo, error)
- func (m *SClusterManager) GetSystemClusterKubeconfig(apiServer string, cfg *rest.Config) (string, error)
- func (m *SClusterManager) InitializeData() error
- func (m *SClusterManager) IsClusterExists(ctx context.Context, userCred mcclient.TokenCredential, id string) (manager.ICluster, bool, error)
- func (m *SClusterManager) IsSystemClusterReady() (bool, error)
- func (m *SClusterManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SClusterManager) PerformCheckSystemReady(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (m *SClusterManager) PerformGc(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (m *SClusterManager) PerformPreCheck(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ClusterPreCheckResp, error)
- func (m *SClusterManager) RegisterSystemCluster() error
- func (m *SClusterManager) StartAutoSyncTask(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
- func (m *SClusterManager) SyncClustersFromCloud(ctx context.Context) error
- func (m *SClusterManager) Usage(scope rbacscope.TRbacScope, ownerId mcclient.IIdentityProvider, isSystem bool) (*api.ClusterUsage, error)
- func (m *SClusterManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ClusterCreateInput, error)
- func (m *SClusterManager) ValidateResourceType(resType string) error
- func (m *SClusterManager) WaitFullSynced() error
- type SClusterResourceBase
- func (res *SClusterResourceBase) AllowGetDetailsRawdata(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (res *SClusterResourceBase) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (res *SClusterResourceBase) AllowUpdateRawdata(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (res *SClusterResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (obj *SClusterResourceBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (obj *SClusterResourceBase) DeleteRemoteObject() error
- func (res *SClusterResourceBase) GetCluster() (*SCluster, error)
- func (res *SClusterResourceBase) GetClusterClient() (*client.ClusterManager, error)
- func (obj *SClusterResourceBase) GetClusterId() string
- func (obj *SClusterResourceBase) GetClusterModelManager() IClusterModelManager
- func (obj *SClusterResourceBase) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (res *SClusterResourceBase) GetDetailsRawdata(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (res SClusterResourceBase) GetDomainId() string
- func (res *SClusterResourceBase) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ClusterResourceDetail, error)
- func (obj *SClusterResourceBase) GetK8sObject() (runtime.Object, error)
- func (res SClusterResourceBase) GetObjectMeta() (api.ObjectMeta, error)
- func (obj *SClusterResourceBase) GetRemoteObject() (interface{}, error)
- func (r *SClusterResourceBase) GetUniqValues() jsonutils.JSONObject
- func (obj *SClusterResourceBase) LogPrefix() string
- func (res *SClusterResourceBase) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)
- func (res *SClusterResourceBase) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (res *SClusterResourceBase) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (res *SClusterResourceBase) PostDelete(ctx context.Context, userCred mcclient.TokenCredential)
- func (res *SClusterResourceBase) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (obj *SClusterResourceBase) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (res *SClusterResourceBase) SetCluster(userCred mcclient.TokenCredential, cls *SCluster)
- func (obj *SClusterResourceBase) SetName(name string)
- func (obj *SClusterResourceBase) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- func (_ *SClusterResourceBase) StartCreateTask(resObj IClusterModel, ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (_ *SClusterResourceBase) StartDeleteTask(resObj IClusterModel, ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (_ *SClusterResourceBase) StartUpdateTask(resObj IClusterModel, ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (obj *SClusterResourceBase) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- func (res *SClusterResourceBase) UpdateRawdata(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (obj *SClusterResourceBase) UpdateRemoteObject(remoteObj interface{}) (interface{}, error)
- func (obj *SClusterResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ClusterResourceUpdateInput, error)
- type SClusterResourceBaseManager
- func (m *SClusterResourceBaseManager) CreateRemoteObject(_ IClusterModel, cli *client.ClusterManager, obj interface{}) (interface{}, error)
- func (m *SClusterResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []interface{}
- func (m *SClusterResourceBaseManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject
- func (m *SClusterResourceBaseManager) FilterBySystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (m *SClusterResourceBaseManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery
- func (m *SClusterResourceBaseManager) GetByIdOrName(userCred mcclient.IIdentityProvider, clusterId string, resId string) (IClusterModel, error)
- func (m *SClusterResourceBaseManager) GetByName(userCred mcclient.IIdentityProvider, clusterId string, resId string) (IClusterModel, error)
- func (m *SClusterResourceBaseManager) GetClusterModelManager() IClusterModelManager
- func (m *SClusterResourceBaseManager) GetGCQuery() *sqlchemy.SQuery
- func (m SClusterResourceBaseManager) GetK8sResourceInfo() model.K8sResourceInfo
- func (_ SClusterResourceBaseManager) GetOwnerModel(userCred mcclient.TokenCredential, manager model.IModelManager, ...) (model.IOwnerModel, error)
- func (m *SClusterResourceBaseManager) GetRemoteObjectGlobalId(cluster *SCluster, obj interface{}) string
- func (m *SClusterResourceBaseManager) InitOwnedManager(man IClusterModelManager)
- func (m SClusterResourceBaseManager) IsNamespaceScope() bool
- func (m *SClusterResourceBaseManager) IsRemoteObjectLocalExist(userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, bool, error)
- func (m *SClusterResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SClusterResourceBaseManager) ListRemoteObjects(clsCli *client.ClusterManager) ([]interface{}, error)
- func (m *SClusterResourceBaseManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) (IClusterModel, error)
- func (m *SClusterResourceBaseManager) NewRemoteObjectForCreate(_ IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
- func (m *SClusterResourceBaseManager) OnRemoteObjectCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (m *SClusterResourceBaseManager) OnRemoteObjectDelete(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (m *SClusterResourceBaseManager) OnRemoteObjectUpdate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (m *SClusterResourceBaseManager) PurgeAllByCluster(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster) error
- func (m SClusterResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ClusterResourceCreateInput, error)
- type SClusterRole
- func (cr *SClusterRole) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (obj *SClusterRole) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)
- func (cr *SClusterRole) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SClusterRoleBinding
- func (obj *SClusterRoleBinding) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (crb *SClusterRoleBinding) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (crb *SClusterRoleBinding) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)
- func (crb *SClusterRoleBinding) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SClusterRoleBindingManager
- func (m *SClusterRoleBindingManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SClusterRoleBindingManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) (IClusterModel, error)
- func (m *SClusterRoleBindingManager) NewRemoteObjectForCreate(obj IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
- func (m *SClusterRoleBindingManager) SyncResources(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster) error
- func (m *SClusterRoleBindingManager) ValidateClusterRoleBinding(crb *rbacv1.ClusterRoleBinding) error
- func (m *SClusterRoleBindingManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ClusterRoleBindingCreateInput, error)
- type SClusterRoleManager
- func (m *SClusterRoleManager) GetRoleKind() string
- func (m *SClusterRoleManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SClusterRoleManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) (IClusterModel, error)
- func (m *SClusterRoleManager) NewRemoteObjectForCreate(_ IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
- func (m *SClusterRoleManager) SyncResources(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster) error
- func (m *SClusterRoleManager) ValidateClusterRoleObject(obj *rbacv1.ClusterRole) error
- func (m *SClusterRoleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ClusterRoleCreateInput, error)
- type SComponent
- func (m *SComponent) AllowPerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (m *SComponent) AllowPerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (m *SComponent) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SComponent) DeleteWithJoint(ctx context.Context, userCred mcclient.TokenCredential) error
- func (m *SComponent) DoDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SComponent) DoDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SComponent) DoEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SComponent) DoUpdate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SComponent) FetchStatus(cluster *SCluster, out *api.ComponentsStatus) error
- func (m *SComponent) GetCluster() (*SCluster, error)
- func (m *SComponent) GetDriver() (IComponentDriver, error)
- func (m *SComponent) GetSettings() (*api.ComponentSettings, error)
- func (m *SComponent) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (m *SComponent) PerformEnable(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (m *SComponent) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (m *SComponent) SetEnabled(enabled bool) error
- func (m *SComponent) StartComponentDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SComponent) StartComponentDeployTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SComponent) StartComponentUndeployTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SComponent) StartComponentUpdateTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SComponent) StartSelfUpdate(ctx context.Context, userCred mcclient.TokenCredential, cls *SCluster) error
- type SComponentManager
- func (m *SComponentManager) CreateByCluster(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) (*SComponent, error)
- func (m *SComponentManager) GetDriver(cType string) (IComponentDriver, error)
- func (m *SComponentManager) GetDrivers() []IComponentDriver
- func (m *SComponentManager) GetImageRepository(cluster *SCluster, setting *api.ComponentSettings) (*api.ImageRepository, error)
- func (m *SComponentManager) RegisterDriver(drv IComponentDriver)
- func (m *SComponentManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SConfigMap
- type SConfigMapManager
- func (m SConfigMapManager) GetRawConfigMaps(cluster *client.ClusterManager, ns string) ([]*v1.ConfigMap, error)
- func (m *SConfigMapManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, body jsonutils.JSONObject) (interface{}, error)
- func (m *SConfigMapManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ConfigMapCreateInput, error)
- type SContainerRegistry
- func (r *SContainerRegistry) GetConfig() (*api.ContainerRegistryConfig, error)
- func (r *SContainerRegistry) GetDetailsConfig(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ContainerRegistryConfig, error)
- func (r *SContainerRegistry) GetDetailsDownloadImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SContainerRegistry) GetDetailsImageTags(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SContainerRegistry) GetDetailsImages(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SContainerRegistry) GetDockerRegistryClient() (client.Client, error)
- func (r *SContainerRegistry) GetDriver() IContainerRegistryDriver
- func (r *SContainerRegistry) GetType() api.ContainerRegistryType
- func (r *SContainerRegistry) PerformUploadImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (*client.ImageMetadata, error)
- type SContainerRegistryManager
- func (man *SContainerRegistryManager) AddDispatcher(prefix string, app *appsrv.Application, ...)
- func (m *SContainerRegistryManager) CustomizeHandlerInfo(info *appsrv.SHandlerInfo)
- func (man *SContainerRegistryManager) GetDriver(rType api.ContainerRegistryType) (IContainerRegistryDriver, error)
- func (man *SContainerRegistryManager) GetPropertyDownloadImage(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (man *SContainerRegistryManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (man *SContainerRegistryManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ContainerRegistryCreateInput, error)
- type SCronJob
- type SCronJobManager
- type SDaemonSet
- func (obj *SDaemonSet) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (obj *SDaemonSet) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.DaemonSetDetailV2, error)
- func (obj *SDaemonSet) GetPodInfo(cli *client.ClusterManager, ds *apps.DaemonSet) (*api.PodInfo, error)
- func (obj *SDaemonSet) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)
- func (obj *SDaemonSet) GetRawServices(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Service, error)
- func (obj *SDaemonSet) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)
- func (obj *SDaemonSet) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- func (obj *SDaemonSet) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SDaemonSetManager
- func (m *SDaemonSetManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
- func (m *SDaemonSetManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.DaemonSetCreateInput, error)
- func (m *SDaemonSetManager) ValidateDaemonSetObject(ds *apps.DaemonSet) error
- type SDeployment
- func (obj *SDeployment) FindNewReplicaSet(deploy *apps.Deployment) (*apps.ReplicaSet, error)
- func (obj *SDeployment) FindOldReplicaSets(deploy *apps.Deployment, rss []*apps.ReplicaSet) ([]*apps.ReplicaSet, []*apps.ReplicaSet, error)
- func (obj *SDeployment) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (obj *SDeployment) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.DeploymentDetailV2, error)
- func (obj *SDeployment) GetPodInfo(cli *client.ClusterManager, deploy *apps.Deployment) (*api.PodInfo, error)
- func (obj *SDeployment) GetRawDeployment() (*apps.Deployment, error)
- func (obj *SDeployment) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)
- func (obj *SDeployment) GetRawReplicaSets(cli *client.ClusterManager, deploy *apps.Deployment) ([]*apps.ReplicaSet, error)
- func (obj *SDeployment) GetRawServices(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Service, error)
- func (obj *SDeployment) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)
- func (obj *SDeployment) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- func (obj *SDeployment) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SDeploymentManager
- func (m *SDeploymentManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SDeploymentManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
- func (m *SDeploymentManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.DeploymentCreateInput, error)
- func (m *SDeploymentManager) ValidateDeploymentObject(deploy *apps.Deployment) error
- type SEndpoint
- type SEndpointManager
- type SEvent
- type SEventManager
- func (m SEventManager) FilterEventsByKindName(events []*v1.Event, kind, namespace, name string) []*v1.Event
- func (m SEventManager) FilterEventsByType(events []*v1.Event, eventType string) []*v1.Event
- func (m SEventManager) FilterEventsByUID(events []*v1.Event, uid types.UID) []*v1.Event
- func (m *SEventManager) GetAPIEvents(cluster model.ICluster, events []*v1.Event) ([]*api.Event, error)
- func (m SEventManager) GetAllRawEvents(cluster model.ICluster) ([]*v1.Event, error)
- func (m SEventManager) GetEventsByUID(cluster model.ICluster, uId types.UID) ([]*api.Event, error)
- func (m SEventManager) GetK8sResourceInfo() model.K8sResourceInfo
- func (m SEventManager) GetNamespaceEvents(cluster model.ICluster, ns string) ([]*api.Event, error)
- func (m SEventManager) GetRawEvents(cluster model.ICluster, ns string) ([]*v1.Event, error)
- func (m SEventManager) GetRawEventsByObject(cluster model.ICluster, obj runtime.Object) ([]*v1.Event, error)
- func (m SEventManager) GetRawEventsByPods(cluster model.ICluster, pods []*v1.Pod) ([]*v1.Event, error)
- func (m SEventManager) GetRawEventsByResource(cluster model.ICluster, namespace string, resName string) ([]*v1.Event, error)
- func (m SEventManager) GetRawEventsByUID(cluster model.ICluster, uId types.UID) ([]*v1.Event, error)
- func (m SEventManager) GetRawWarningEventsByPods(cluster model.ICluster, pods []*v1.Pod) ([]*v1.Event, error)
- func (m *SEventManager) GetWarningEventsByPods(cluster model.ICluster, pods []*v1.Pod) ([]*api.Event, error)
- func (m SEventManager) ListItemFilter(ctx *model.RequestContext, q model.IQuery, query *api.EventListInput) (model.IQuery, error)
- type SFedClusterRole
- func (obj *SFedClusterRole) PerformAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FederatedResourceJointClusterInput, error)
- func (obj *SFedClusterRole) PerformDetachCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FederatedResourceJointClusterInput, error)
- func (obj *SFedClusterRole) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FedClusterRoleUpdateInput, error)
- type SFedClusterRoleBinding
- type SFedClusterRoleBindingCluster
- func (obj *SFedClusterRoleBindingCluster) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (obj *SFedClusterRoleBindingCluster) GetResourceCreateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, ...) (jsonutils.JSONObject, error)
- func (obj *SFedClusterRoleBindingCluster) GetResourceUpdateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, ...) (jsonutils.JSONObject, error)
- type SFedClusterRoleBindingClusterManager
- type SFedClusterRoleBindingManager
- type SFedClusterRoleCluster
- func (obj *SFedClusterRoleCluster) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (obj *SFedClusterRoleCluster) GetFedClusterRole() (*SFedClusterRole, error)
- func (obj *SFedClusterRoleCluster) GetResourceCreateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, ...) (jsonutils.JSONObject, error)
- func (obj *SFedClusterRoleCluster) GetResourceUpdateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, ...) (jsonutils.JSONObject, error)
- type SFedClusterRoleClusterManager
- type SFedClusterRoleManager
- func (m *SFedClusterRoleManager) GetFedClusterRole(id string) (*SFedClusterRole, error)
- func (m *SFedClusterRoleManager) GetPropertyApiResources(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ClusterAPIGroupResources, error)
- func (m *SFedClusterRoleManager) GetPropertyClusterUserGroups(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ClusterUserGroups, error)
- func (m *SFedClusterRoleManager) GetPropertyClusterUsers(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ClusterUsers, error)
- func (m *SFedClusterRoleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FederatedClusterRoleCreateInput, error)
- type SFedJointCluster
- func (obj *SFedJointCluster) GetCluster() (*SCluster, error)
- func (obj *SFedJointCluster) GetClusterId() string
- func (obj *SFedJointCluster) GetDetails(base api.FedJointClusterResourceDetails, isList bool) interface{}
- func (obj *SFedJointCluster) GetFedResourceId() string
- func (obj *SFedJointCluster) GetFedResourceManager() IFedModelManager
- func (obj *SFedJointCluster) GetManager() IFedJointClusterManager
- func (obj *SFedJointCluster) GetResourceId() string
- func (obj *SFedJointCluster) GetResourceManager() IClusterModelManager
- func (obj *SFedJointCluster) SetResource(resObj IClusterModel) error
- type SFedJointClusterManager
- func (m *SFedJointClusterManager) ClusterQuery(clsId string) *sqlchemy.SQuery
- func (m *SFedJointClusterManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []interface{}
- func (m SFedJointClusterManager) GetFedManager() IFedModelManager
- func (m SFedJointClusterManager) GetMasterFieldName() string
- func (m SFedJointClusterManager) GetResourceManager() IClusterModelManager
- func (m SFedJointClusterManager) GetSlaveFieldName() string
- func (m *SFedJointClusterManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- type SFedJointResourceBase
- type SFedJointResourceBaseManager
- type SFedNamespace
- func (obj *SFedNamespace) GetDetails(base interface{}, isList bool) interface{}
- func (obj *SFedNamespace) PerformAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FederatedNamespaceAttachClusterInput, error)
- func (obj *SFedNamespace) PerformDetachCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FederatedNamespaceDetachClusterInput, error)
- func (obj *SFedNamespace) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error
- func (obj *SFedNamespace) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FedNamespaceUpdateInput, error)
- type SFedNamespaceCluster
- func (obj *SFedNamespaceCluster) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (obj *SFedNamespaceCluster) GetDetails(base api.FedJointClusterResourceDetails, isList bool) interface{}
- func (obj *SFedNamespaceCluster) GetFedNamespace() (*SFedNamespace, error)
- func (obj *SFedNamespaceCluster) GetK8sResource() (runtime.Object, error)
- func (obj *SFedNamespaceCluster) GetResourceCreateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, ...) (jsonutils.JSONObject, error)
- func (obj *SFedNamespaceCluster) GetResourceUpdateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, ...) (jsonutils.JSONObject, error)
- type SFedNamespaceClusterManager
- type SFedNamespaceJointClusterManager
- type SFedNamespaceManager
- func (m *SFedNamespaceManager) GetFedNamespace(id string) (*SFedNamespace, error)
- func (m *SFedNamespaceManager) GetFedNamespaceByIdOrName(ctx context.Context, userCred mcclient.IIdentityProvider, id string) (*SFedNamespace, error)
- func (m *SFedNamespaceManager) K8sConvertToInternalObject(in *corev1.Namespace) (interface{}, error)
- func (m *SFedNamespaceManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FederatedNamespaceCreateInput, error)
- type SFedNamespaceResource
- func (obj *SFedNamespaceResource) GetDetails(base interface{}, isList bool) interface{}
- func (obj *SFedNamespaceResource) GetFedNamespace() (*SFedNamespace, error)
- func (obj *SFedNamespaceResource) GetK8sObjectMeta() metav1.ObjectMeta
- func (obj *SFedNamespaceResource) PerformAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (obj *SFedNamespaceResource) ValidateAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (obj *SFedNamespaceResource) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FedNamespaceResourceUpdateInput, error)
- type SFedNamespaceResourceManager
- func (m *SFedNamespaceResourceManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SFedNamespaceResourceManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FederatedNamespaceResourceCreateInput, error)
- type SFedResourceBase
- func (obj *SFedResourceBase) GetClustersCount() (int, error)
- func (obj *SFedResourceBase) GetClustersQuery() *sqlchemy.SQuery
- func (obj *SFedResourceBase) GetDetails(base interface{}, isList bool) interface{}
- func (obj *SFedResourceBase) GetElemModel() (IFedModel, error)
- func (m *SFedResourceBase) GetJointModelManager() IFedJointClusterManager
- func (obj *SFedResourceBase) GetK8sObjectMeta() metav1.ObjectMeta
- func (obj *SFedResourceBase) GetManager() IFedModelManager
- func (obj *SFedResourceBase) LogPrefix() string
- func (obj *SFedResourceBase) PerformAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (obj *SFedResourceBase) PerformDetachCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (obj *SFedResourceBase) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (obj *SFedResourceBase) PerformSyncCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FederatedResourceJointClusterInput, error)
- func (obj *SFedResourceBase) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (res *SFedResourceBase) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (obj *SFedResourceBase) ValidateAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (obj *SFedResourceBase) ValidateDeleteCondition(ctx context.Context, _ jsonutils.JSONObject) error
- func (obj *SFedResourceBase) ValidateDetachCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (obj *SFedResourceBase) ValidateJointCluster(ctx context.Context, userCred mcclient.TokenCredential, ...) (IFedJointClusterModel, jsonutils.JSONObject, error)
- func (m *SFedResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FedResourceUpdateInput, error)
- type SFedResourceBaseManager
- func (m *SFedResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []interface{}
- func (m *SFedResourceBaseManager) GetJointModelManager() IFedJointClusterManager
- func (m *SFedResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SFedResourceBaseManager) PurgeAllByCluster(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster) error
- func (m *SFedResourceBaseManager) SetJointModelManager(man IFedJointClusterManager)
- func (m *SFedResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FederatedResourceCreateInput, error)
- type SFedRole
- type SFedRoleBinding
- type SFedRoleBindingCluster
- func (obj *SFedRoleBindingCluster) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (obj *SFedRoleBindingCluster) GetResourceCreateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, ...) (jsonutils.JSONObject, error)
- func (obj *SFedRoleBindingCluster) GetResourceUpdateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, ...) (jsonutils.JSONObject, error)
- type SFedRoleBindingClusterManager
- type SFedRoleBindingManager
- type SFedRoleCluster
- func (obj *SFedRoleCluster) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
- func (obj *SFedRoleCluster) GetResourceCreateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, ...) (jsonutils.JSONObject, error)
- func (obj *SFedRoleCluster) GetResourceUpdateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, ...) (jsonutils.JSONObject, error)
- type SFedRoleClusterManager
- type SFedRoleManager
- func (m *SFedRoleManager) GetPropertyApiResources(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ClusterAPIGroupResources, error)
- func (m *SFedRoleManager) GetPropertyClusterUserGroups(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ClusterUserGroups, error)
- func (m *SFedRoleManager) GetPropertyClusterUsers(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ClusterUsers, error)
- func (m *SFedRoleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.FedRoleCreateInput, error)
- type SFederatedManagedResourceBase
- type SFederatedManagedResourceBaseManager
- type SFederatedNamespaceJointCluster
- type SFluentBitComponent
- type SFluentBitComponentManager
- func (m SFluentBitComponentManager) CreateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- func (m SFluentBitComponentManager) DeleteHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- func (m SFluentBitComponentManager) GetHelmValues(cluster *SCluster, settings *api.ComponentSettings) (map[string]interface{}, error)
- func (m SFluentBitComponentManager) UpdateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- type SIngress
- type SIngressManager
- type SJob
- func (obj *SJob) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (job *SJob) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.JobDetailV2, error)
- func (obj *SJob) GetPodInfo(cli *client.ClusterManager, job *batch.Job) (*api.PodInfo, error)
- func (obj *SJob) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)
- type SJobManager
- type SK8sOwnedResourceBaseManager
- type SLimitRange
- type SLimitRangeManager
- type SMachine
- func (m *SMachine) AllowPerformPrepare(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (m *SMachine) AllowPerformRecreate(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (m *SMachine) AllowPerformTerminate(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (m *SMachine) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SMachine) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (m *SMachine) GetCluster() (*SCluster, error)
- func (m *SMachine) GetClusterAddonsConfig() (*api.ClusterAddonsManifestConfig, error)
- func (m *SMachine) GetCreateInput(ctx context.Context, userCred mcclient.TokenCredential) (*api.CreateMachineData, error)
- func (m *SMachine) GetDetailsNetworkaddress(ctx context.Context, userCred mcclient.TokenCredential, ...) ([]*computeapi.NetworkAddressDetails, error)
- func (m *SMachine) GetDriver() IMachineDriver
- func (m *SMachine) GetEIP() (string, error)
- func (m *SMachine) GetK8sModelNode(userCred mcclient.TokenCredential, cluster *SCluster) (jsonutils.JSONObject, error)
- func (m *SMachine) GetK8sNodeConfig() *api.K8sNodeConfig
- func (m *SMachine) GetKubernetesVersion() (string, error)
- func (m *SMachine) GetPrivateIP() (string, error)
- func (m *SMachine) GetResourceId() string
- func (m *SMachine) GetRole() string
- func (m *SMachine) GetStatus() string
- func (m *SMachine) IsControlplane() bool
- func (m *SMachine) IsEnableNativeIPAlloc() (bool, error)
- func (m *SMachine) IsFirstNode() bool
- func (m *SMachine) IsInClassicNetwork() (bool, error)
- func (m *SMachine) IsRunning() bool
- func (m *SMachine) LogPrefix() string
- func (m *SMachine) PerformAttachNetworkaddress(ctx context.Context, userCred mcclient.TokenCredential, _ jsonutils.JSONObject, ...) (jsonutils.JSONObject, error)
- func (m *SMachine) PerformPostPrepareResource(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (m *SMachine) PerformPrepare(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (m *SMachine) PerformRecreate(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (m *SMachine) PerformTerminate(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (m *SMachine) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (m *SMachine) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (m *SMachine) SetHypervisor(hypervisor string) error
- func (m *SMachine) SetPrivateIP(address string) error
- func (m *SMachine) SetResourceId(id string) error
- func (m *SMachine) StartMachineCreateTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SMachine) StartPrepareTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SMachine) StartTerminateTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (m *SMachine) SyncInfoFromCloud(ctx context.Context, s *mcclient.ClientSession) error
- func (m *SMachine) SyncK8sConfig(ctx context.Context, cli *kubernetes.Clientset) error
- func (m *SMachine) ValidatePrepareCondition(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- type SMachineManager
- func (man *SMachineManager) CreateMachine(ctx context.Context, userCred mcclient.TokenCredential, ...) (manager.IMachine, error)
- func (man *SMachineManager) CreateMachineNoHook(ctx context.Context, cluster *SCluster, userCred mcclient.TokenCredential, ...) (manager.IMachine, error)
- func (m *SMachineManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []*jsonutils.JSONDict
- func (man *SMachineManager) FetchMachineById(id string) (*SMachine, error)
- func (man *SMachineManager) FetchMachineByIdOrName(ctx context.Context, userCred mcclient.TokenCredential, id string) (manager.IMachine, error)
- func (man *SMachineManager) GetCluster(ctx context.Context, userCred mcclient.TokenCredential, clusterId string) (*SCluster, error)
- func (man *SMachineManager) GetClusterControlplaneMachines(clusterId string) ([]*SMachine, error)
- func (man *SMachineManager) GetClusterMachines(clusterId string) ([]*SMachine, error)
- func (man *SMachineManager) GetMachineByResourceId(resId string) (*SMachine, error)
- func (man *SMachineManager) GetMachines(clusterId string) ([]manager.IMachine, error)
- func (man *SMachineManager) GetSession() (*mcclient.ClientSession, error)
- func (man *SMachineManager) IsMachineExists(ctx context.Context, userCred mcclient.TokenCredential, id string) (manager.IMachine, bool, error)
- func (man *SMachineManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (man *SMachineManager) StartMachineBatchDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (man *SMachineManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- func (m *SMachineManager) ValidateResourceType(resType string) error
- type SMinioBaseComponent
- type SMinioBaseComponentManager
- type SMinioComponent
- type SMinioComponentManager
- func (m SMinioComponentManager) CreateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- func (m SMinioComponentManager) DeleteHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- func (m SMinioComponentManager) GetHelmValues(cluster *SCluster, setting *api.ComponentSettings) (map[string]interface{}, error)
- func (m SMinioComponentManager) UpdateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- type SMonitorComponent
- type SMonitorComponentManager
- func (m SMonitorComponentManager) CreateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- func (m SMonitorComponentManager) DeleteHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- func (m SMonitorComponentManager) GetHelmValues(cluster *SCluster, setting *api.ComponentSettings) (map[string]interface{}, error)
- func (m SMonitorComponentManager) SyncSystemGrafanaDashboard(ctx context.Context, userCred mcclient.TokenCredential, isStart bool)
- func (m SMonitorComponentManager) UpdateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- type SMonitorMinioComponentManager
- func (m SMonitorMinioComponentManager) CreateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- func (m SMonitorMinioComponentManager) DeleteHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- func (m SMonitorMinioComponentManager) GetHelmValues(cluster *SCluster, setting *api.ComponentSettings) (map[string]interface{}, error)
- func (m SMonitorMinioComponentManager) UpdateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- type SNamespace
- func (obj *SNamespace) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (ns *SNamespace) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (ns *SNamespace) DoSync(ctx context.Context, userCred mcclient.TokenCredential) error
- func (m *SNamespace) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (m *SNamespace) GetEvents() ([]*api.Event, error)
- func (res *SNamespace) SetCluster(userCred mcclient.TokenCredential, cls *SCluster)
- func (ns *SNamespace) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- func (ns *SNamespace) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SNamespaceManager
- func (m *SNamespaceManager) EnsureNamespace(ctx context.Context, userCred mcclient.TokenCredential, ...) (*SNamespace, error)
- func (m *SNamespaceManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SNamespaceManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) (IClusterModel, error)
- func (m *SNamespaceManager) NewRemoteObjectForCreate(obj IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
- func (m *SNamespaceManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.NamespaceCreateInputV2, error)
- type SNamespaceResourceBase
- func (res *SNamespaceResourceBase) AllowGetDetailsRawdata(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (res *SNamespaceResourceBase) AllowUpdateRawdata(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (res *SNamespaceResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (res *SNamespaceResourceBase) DeleteRemoteObject() error
- func (obj *SNamespaceResourceBase) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (res *SNamespaceResourceBase) GetDetailsRawdata(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (res *SNamespaceResourceBase) GetNamespace() (*SNamespace, error)
- func (res *SNamespaceResourceBase) GetNamespaceId() string
- func (res *SNamespaceResourceBase) GetNamespaceName() (string, error)
- func (res SNamespaceResourceBase) GetObjectMeta() (api.ObjectMeta, error)
- func (res *SNamespaceResourceBase) GetRemoteObject() (interface{}, error)
- func (r *SNamespaceResourceBase) GetUniqValues() jsonutils.JSONObject
- func (res *SNamespaceResourceBase) SetNamespace(userCred mcclient.TokenCredential, ns *SNamespace)
- func (res *SNamespaceResourceBase) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- func (res *SNamespaceResourceBase) UpdateRawdata(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- type SNamespaceResourceBaseManager
- func (m *SNamespaceResourceBaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []interface{}
- func (m *SNamespaceResourceBaseManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject
- func (m *SNamespaceResourceBaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (m *SNamespaceResourceBaseManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery
- func (m *SNamespaceResourceBaseManager) GetByIdOrName(userCred mcclient.IIdentityProvider, clusterId, namespaceId string, ...) (IClusterModel, error)
- func (m *SNamespaceResourceBaseManager) GetByName(userCred mcclient.IIdentityProvider, clusterId, namespaceId string, ...) (IClusterModel, error)
- func (m *SNamespaceResourceBaseManager) GetGCQuery() *sqlchemy.SQuery
- func (m SNamespaceResourceBaseManager) IsNamespaceScope() bool
- func (m *SNamespaceResourceBaseManager) IsRemoteObjectLocalExist(userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, bool, error)
- func (m *SNamespaceResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (res *SNamespaceResourceBaseManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) (IClusterModel, error)
- func (m SNamespaceResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.NamespaceResourceCreateInput, error)
- type SNode
- func (node *SNode) AllowPerformCordon(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (node *SNode) AllowPerformUncordon(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (node *SNode) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (node *SNode) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.NodeDetailV2, error)
- func (node *SNode) GetRawNode() (*v1.Node, error)
- func (node *SNode) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)
- func (node *SNode) PerformCordon(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (node *SNode) PerformUncordon(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (obj *SNode) SetNodeScheduleToggle(unschedule bool) error
- func (node *SNode) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- func (node *SNode) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SNodeManager
- func (m *SNodeManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []interface{}
- func (m *SNodeManager) GetNodesByClusters(clusterIds []string) ([]SNode, error)
- func (m *SNodeManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SNodeManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) (IClusterModel, error)
- func (m *SNodeManager) Usage(clusters []sClusterUsage) (*api.NodeUsage, error)
- func (m *SNodeManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.NodeCreateInput, error)
- type SPV
- type SPVC
- func (obj *SPVC) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (obj *SPVC) GetMountPodNames(cli *client.ClusterManager, pvc *v1.PersistentVolumeClaim) ([]string, error)
- func (obj *SPVC) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)
- func (obj *SPVC) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SPVCManager
- func (_ *SPVCManager) GetPVCVolumes(vols []v1.Volume) []v1.Volume
- func (m *SPVCManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SPVCManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, body jsonutils.JSONObject) (interface{}, error)
- type SPVManager
- type SPod
- func (p *SPod) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (p *SPod) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.PodDetailV2, error)
- func (p *SPod) IsOwnedBy(ownerModel IClusterModel) (bool, error)
- func (p *SPod) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- func (p *SPod) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SPodManager
- func (m *SPodManager) GetAllRawPods(cluster *client.ClusterManager) ([]*v1.Pod, error)
- func (m *SPodManager) GetGCQuery() *sqlchemy.SQuery
- func (m *SPodManager) GetPodsByClusters(clusterIds []string) ([]SPod, error)
- func (m *SPodManager) GetRawPods(cluster *client.ClusterManager, ns string) ([]*v1.Pod, error)
- func (m *SPodManager) GetRawPodsByObjectNamespace(cli *client.ClusterManager, obj runtime.Object) ([]*v1.Pod, error)
- func (m *SPodManager) GetRawPodsBySelector(cluster *client.ClusterManager, ns string, selecotr labels.Selector) ([]*v1.Pod, error)
- func (m *SPodManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SPodManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) (IClusterModel, error)
- func (m *SPodManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*jsonutils.JSONDict, error)
- type SRelease
- func (r *SRelease) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (obj *SRelease) DeleteRemoteObject() error
- func (r *SRelease) GetChart() (*chart.Chart, error)
- func (r *SRelease) GetChartClient() (*helm.ChartClient, error)
- func (rls *SRelease) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (obj *SRelease) GetDetailsHistory(ctx context.Context, userCred mcclient.TokenCredential, ...) ([]api.ReleaseHistoryInfo, error)
- func (r *SRelease) GetDriver() (IReleaseDriver, error)
- func (r *SRelease) GetHelmClient() (*helm.Client, error)
- func (r *SRelease) GetHelmRelease(isList bool) (*api.ReleaseDetail, error)
- func (r *SRelease) GetHelmValues() map[string]interface{}
- func (obj *SRelease) GetRemoteObject() (interface{}, error)
- func (r *SRelease) GetRepo() (*SRepo, error)
- func (r *SRelease) GetType() (api.RepoType, error)
- func (obj *SRelease) PerformRollback(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (obj *SRelease) PerformUpgrade(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (rls *SRelease) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ...)
- func (r *SRelease) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- func (r *SRelease) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SReleaseManager
- func (m *SReleaseManager) CreateRemoteObject(model IClusterModel, _ *client.ClusterManager, _ interface{}) (interface{}, error)
- func (m *SReleaseManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []interface{}
- func (m *SReleaseManager) FilterByHiddenSystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (m *SReleaseManager) FilterBySystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) *sqlchemy.SQuery
- func (m *SReleaseManager) GetChartClient(repo *SRepo) *helm.ChartClient
- func (m *SReleaseManager) GetDriver(typ api.RepoType) (IReleaseDriver, error)
- func (m *SReleaseManager) GetRemoteObjectGlobalId(cluster *SCluster, obj interface{}) string
- func (m *SReleaseManager) IsRemoteObjectLocalExist(userCred mcclient.TokenCredential, cluster *SCluster, obj interface{}) (IClusterModel, bool, error)
- func (m *SReleaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SReleaseManager) ListRemoteObjects(cli *client.ClusterManager) ([]interface{}, error)
- func (m *SReleaseManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) (IClusterModel, error)
- func (m *SReleaseManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
- func (m *SReleaseManager) RegisterDriver(driver IReleaseDriver)
- func (m *SReleaseManager) ShowChart(repo *SRepo, chartName string, version string) (*chart.Chart, error)
- func (m *SReleaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ReleaseCreateInput, error)
- type SReplicaSet
- func (obj *SReplicaSet) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (obj *SReplicaSet) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.ReplicaSetDetail, error)
- func (obj *SReplicaSet) GetPodInfo(cli *client.ClusterManager, rs *apps.ReplicaSet) (*api.PodInfo, error)
- func (obj *SReplicaSet) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)
- type SReplicaSetManager
- type SRepo
- func (r *SRepo) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
- func (r *SRepo) DoSync() error
- func (r *SRepo) GetBackend() api.RepoBackend
- func (r *SRepo) GetChartClient() *helm.ChartClient
- func (r *SRepo) GetDetailsDownloadChart(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SRepo) GetDriver() IRepoDriver
- func (r *SRepo) GetReleaseCount() (int, error)
- func (r *SRepo) GetType() api.RepoType
- func (r *SRepo) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SRepo) PerformUploadChart(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- func (r *SRepo) ToEntry() *repo.Entry
- func (r *SRepo) ValidateDeleteCondition(ctx context.Context, _ jsonutils.JSONObject) error
- type SRepoManager
- func (man *SRepoManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (man *SRepoManager) FetchCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, ...) []api.RepoDetail
- func (man *SRepoManager) FetchRepoById(id string) (*SRepo, error)
- func (man *SRepoManager) FetchRepoByIdOrName(ctx context.Context, userCred mcclient.IIdentityProvider, ident string) (*SRepo, error)
- func (man *SRepoManager) GetChartClient(projectId string) *helm.ChartClient
- func (man *SRepoManager) GetClient(projectId string) (*helm.RepoClient, error)
- func (man *SRepoManager) GetDriver(backend api.RepoBackend) (IRepoDriver, error)
- func (man *SRepoManager) GetRepoDataDir(projectId string) string
- func (m *SRepoManager) InitializeData() error
- func (man *SRepoManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (man *SRepoManager) ListRepos() ([]SRepo, error)
- func (man *SRepoManager) ResourceScope() rbacscope.TRbacScope
- func (man *SRepoManager) ToEntry(name, url, username, password string) *repo.Entry
- func (man *SRepoManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.RepoCreateInput, error)
- type SResourceQuota
- type SResourceQuotaManager
- type SRole
- func (r *SRole) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (obj *SRole) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)
- func (r *SRole) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- func (obj *SRole) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.RoleUpdateInput, error)
- type SRoleBinding
- func (obj *SRoleBinding) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ...) error
- func (rb *SRoleBinding) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (rb *SRoleBinding) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)
- func (rb *SRoleBinding) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SRoleBindingManager
- func (m *SRoleBindingManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SRoleBindingManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) (IClusterModel, error)
- func (m *SRoleBindingManager) NewRemoteObjectForCreate(obj IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
- func (m *SRoleBindingManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.RoleBindingCreateInput, error)
- func (m *SRoleBindingManager) ValidateRoleBinding(rb *rbacv1.RoleBinding) error
- type SRoleManager
- func (m *SRoleManager) GetRoleKind() string
- func (m *SRoleManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SRoleManager) NewFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, ...) (IClusterModel, error)
- func (m *SRoleManager) NewRemoteObjectForCreate(obj IClusterModel, _ *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
- func (m *SRoleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.RoleCreateInput, error)
- func (m *SRoleManager) ValidateRoleObject(role *rbacv1.Role) error
- type SRoleRefResourceBase
- type SRoleRefResourceBaseManager
- type SSecret
- func (obj *SSecret) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (obj *SSecret) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)
- func (s *SSecret) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SSecretManager
- func (m SSecretManager) GetDriver(typ v1.SecretType) (ISecretDriver, error)
- func (m SSecretManager) GetRawSecrets(cluster *client.ClusterManager, ns string) ([]*v1.Secret, error)
- func (m *SSecretManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, ...) (*sqlchemy.SQuery, error)
- func (m *SSecretManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, body jsonutils.JSONObject) (interface{}, error)
- func (m *SSecretManager) RegisterDriver(typ v1.SecretType, driver ISecretDriver)
- func (m *SSecretManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.SecretCreateInput, error)
- type SService
- type SServiceAccount
- type SServiceAccountManager
- type SServiceManager
- func (m *SServiceManager) GetRawServicesByMatchLabels(cli *client.ClusterManager, namespace string, matchLabels map[string]string) ([]*v1.Service, error)
- func (m *SServiceManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
- func (m *SServiceManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.ServiceCreateInput, error)
- func (m *SServiceManager) ValidateService(svc *v1.Service) error
- type SStatefulSet
- func (obj *SStatefulSet) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (obj *SStatefulSet) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, ...) (api.StatefulSetDetailV2, error)
- func (obj *SStatefulSet) GetPodInfo(cli *client.ClusterManager, ss *apps.StatefulSet) (*api.PodInfo, error)
- func (obj *SStatefulSet) GetRawPods(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Pod, error)
- func (obj *SStatefulSet) GetRawServices(cli *client.ClusterManager, rawObj runtime.Object) ([]*v1.Service, error)
- func (obj *SStatefulSet) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)
- func (obj *SStatefulSet) SetStatusByRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- func (obj *SStatefulSet) UpdateFromRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, extObj interface{}) error
- type SStatefulSetManager
- func (m *SStatefulSetManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
- func (m *SStatefulSetManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.StatefulsetCreateInput, error)
- func (m *SStatefulSetManager) ValidateStatefulSetObject(deploy *apps.StatefulSet) error
- type SStorageClass
- func (obj *SStorageClass) AllowPerformSetDefault(ctx context.Context, userCred mcclient.TokenCredential, ...) bool
- func (m *SStorageClass) GetDetails(ctx context.Context, cli *client.ClusterManager, base interface{}, ...) interface{}
- func (obj *SStorageClass) PerformSetDefault(ctx context.Context, userCred mcclient.TokenCredential, ...) (jsonutils.JSONObject, error)
- type SStorageClassManager
- func (m *SStorageClassManager) GetDriver(provisioner string) (IStorageClassDriver, error)
- func (m *SStorageClassManager) GetRawStorageClasses(cli *client.ClusterManager) ([]*v1.StorageClass, error)
- func (m *SStorageClassManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, body jsonutils.JSONObject) (interface{}, error)
- func (m *SStorageClassManager) PerformConnectionTest(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.StorageClassTestResult, error)
- func (m *SStorageClassManager) RegisterDriver(provisioner string, driver IStorageClassDriver)
- func (m *SStorageClassManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ...) (*api.StorageClassCreateInput, error)
- type SSyncableK8sBaseResource
- func (self *SSyncableK8sBaseResource) CanSync() (bool, error)
- func (_ *SSyncableK8sBaseResource) MarkEndSync(ctx context.Context, userCred mcclient.TokenCredential, obj IK8sSyncModel) error
- func (_ *SSyncableK8sBaseResource) MarkErrorSync(ctx context.Context, obj IK8sSyncModel, err error) error
- func (_ *SSyncableK8sBaseResource) MarkSyncing(obj IK8sSyncModel, userCred mcclient.TokenCredential) error
- func (self *SSyncableK8sBaseResource) SaveSyncMessage(obj IK8sSyncModel, msg string)
- func (self *SSyncableK8sBaseResource) SetLastSync(syncTime time.Time)
- func (self *SSyncableK8sBaseResource) SetLastSyncEndAt(endAt time.Time)
- func (self *SSyncableK8sBaseResource) SetSyncMessage(msg string)
- func (self *SSyncableK8sBaseResource) SetSyncStatus(status string)
- type SSyncableK8sBaseResourceManager
- type SSyncableManager
- type SThanosComponent
- type SThanosComponentManager
- func (m SThanosComponentManager) CreateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- func (m SThanosComponentManager) DeleteHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- func (m SThanosComponentManager) GetHelmValues(cluster *SCluster, setting *api.ComponentSettings) (map[string]interface{}, error)
- func (m SThanosComponentManager) UpdateHelmResource(cluster *SCluster, setting *api.ComponentSettings) error
- type SVirtualMachine
- type SVirtualMachineManager
- type UnstructuredResourceBase
- func (res UnstructuredResourceBase) ConvertToAPIObject(m IK8SUnstructuredModel, output IUnstructuredOutput) error
- func (res UnstructuredResourceBase) GetRawJSONObject(m model.IK8sModel) (jsonutils.JSONObject, error)
- func (_ UnstructuredResourceBase) GetUnstructuredObject(m model.IK8sModel) *unstructured.Unstructured
Constants ¶
const ( KUBE_SERVER_SERVICE = "k8s" INTERNAL_ENDPOINT_TYPE = "internalURL" )
const ( SystemClusterName = "system-default" NamespaceOneCloud = "onecloud" )
const ( CephCSIConfigMapName = "ceph-csi-config" CephCSINamespace = "ceph-csi" )
const ( MinioNamespace = "onecloud-minio" MinioReleaseName = "minio" )
const ( MonitorNamespace = "onecloud-monitoring" MonitorReleaseName = "monitor" ThanosObjectStoreConfigSecretName = "thanos-objstore-config" ThanosObjectStoreConfigSecretKey = "thanos.yaml" GrafanaSystemFolder = "Cloud-System" InfluxdbTelegrafDS = "Influxdb-Telegraf" InfluxdbSystemDS = "InfluxDB-system" )
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" )
const (
FluentBitReleaseName = "fluentbit"
)
const (
IsDefaultStorageClassAnnotation = "storageclass.kubernetes.io/is-default-class"
)
const (
MonitorMinioReleaseName = "monitor-minio"
)
const (
ThanosReleaseName = "thanos"
)
Variables ¶
var ( ComponentManager = NewComponentManager( SComponent{}, "kubecomponent", "kubecomponents") )
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 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 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 DeleteRemoteObject ¶
func DeleteRemoteObject(ctx context.Context, userCred mcclient.TokenCredential, man IClusterModelManager, model IClusterModel, data jsonutils.JSONObject) 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 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 ¶
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 ¶
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 GetAdminCred ¶
func GetAdminCred() mcclient.TokenCredential
func GetAdminSession ¶
func GetAdminSession() (*mcclient.ClientSession, error)
func GetClusterClient ¶
func GetClusterClient(clsId string) (*client.ClusterManager, error)
func GetComponentImageRepository ¶
func GetComponentImageRepository(cluster *SCluster, setting *api.ComponentSettings) (*api.ImageRepository, error)
func GetConfigMapsForPod ¶
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 GetExternalEndpoints ¶
GetExternalEndpoints returns endpoints that are externally reachable for a service.
func GetFedClustersApiResources ¶
func GetFedClustersApiResources(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.IClusterRemoteResources, error)
func GetFedClustersUserGroups ¶
func GetFedClustersUserGroups(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.IClusterRemoteResources, error)
func GetFedClustersUsers ¶
func GetFedClustersUsers(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.IClusterRemoteResources, error)
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 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 GetPodInfo ¶
func GetRawPodsByController ¶
func GetReleasePods ¶
func GetReleasePodsStatus ¶
func GetReleaseResources ¶
func GetResourcesByClusters ¶
func GetResourcesByClusters(man IClusterModelManager, clusterIds []string, ret interface{}) error
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 IsObjectContains ¶
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 MergeValues ¶
func NewCheckIdOrNameError ¶
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 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 SetJSONDataDefault ¶
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 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 ValidatePodTemplate ¶
func ValidatePodTemplate(userCred mcclient.TokenCredential, clusterId string, namespaceId string, template *v1.PodTemplateSpec) error
func ValidateRole ¶
func ValidateUpdateClusterRoleBindingObject ¶
func ValidateUpdateClusterRoleBindingObject(oldObj, newObj *rbacv1.ClusterRoleBinding) error
func ValidateUpdateClusterRoleObject ¶
func ValidateUpdateClusterRoleObject(oldObj, newObj *rbacv1.ClusterRole) error
func ValidateUpdateData ¶
func ValidateUpdateData(obj IClusterModel, ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) (jsonutils.JSONObject, 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 ValidateUpdateK8sObject ¶
func ValidateUpdateRoleBindingObject ¶
func ValidateUpdateRoleBindingObject(oldObj, newObj *rbacv1.RoleBinding) error
func ValueToJSONObject ¶
func ValueToJSONObject(out reflect.Value) jsonutils.JSONObject
func WaitMachineRunning ¶
Types ¶
type CephCSIClusterConfig ¶
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 (HelmComponentManager) HelmUninstall ¶
func (m HelmComponentManager) HelmUninstall(cluster *SCluster, namespace string, releaseName string) error
func (HelmComponentManager) HelmUpdate ¶
func (HelmComponentManager) NewHelmClient ¶
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 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 ¶
func (obj *SAnsiblePlaybookTemplate) GetAPIObject() (*api.AnsiblePlaybookTemplate, error)
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 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 (*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) DeleteAllComponents ¶
func (*SCluster) DisableBidirectionalSync ¶
func (*SCluster) EnableBidirectionalSync ¶
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 (*SCluster) GetAPIServerInternalEndpoint ¶
TODO: support use loadbalancer
func (*SCluster) GetAPIServerPublicEndpoint ¶
func (*SCluster) GetAddonsConfig ¶
func (cluster *SCluster) GetAddonsConfig() (*api.ClusterAddonsManifestConfig, error)
func (*SCluster) GetAdminKubeconfig ¶
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 (*SCluster) GetControlplaneMachines ¶
func (*SCluster) GetDefaultMachineDockerConfig ¶
func (c *SCluster) GetDefaultMachineDockerConfig(imageRepo *api.ImageRepository) (*api.DockerConfig, error)
func (*SCluster) GetDeployMachines ¶
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 (*SCluster) GetK8sResourceManager ¶
func (c *SCluster) GetK8sResourceManager(kindName string) manager.IK8sResourceManager
func (*SCluster) GetKubeconfig ¶
func (*SCluster) GetKubeconfigByCerts ¶
func (*SCluster) GetMachineByName ¶
func (*SCluster) GetMachinesByRole ¶
func (*SCluster) GetMachinesCount ¶
func (*SCluster) GetNodesCount ¶
func (*SCluster) GetPVCCount ¶
func (*SCluster) GetPodCidr ¶
func (*SCluster) GetRemoteClient ¶
func (c *SCluster) GetRemoteClient() (*client.ClusterManager, error)
GetRemoteClient get remote kubernetes wrapped client
func (*SCluster) GetRunningControlplaneMachine ¶
func (*SCluster) GetServiceCidr ¶
func (*SCluster) GetServiceDomain ¶
func (*SCluster) GetVersion ¶
func (*SCluster) IsImported ¶
func (*SCluster) IsInClassicNetwork ¶
func (*SCluster) IsSystemCluster ¶
func (*SCluster) NeedControlplane ¶
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 (c *SCluster) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input api.ClusterSyncInput) (jsonutils.JSONObject, error)
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 (c *SCluster) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SCluster) PurgeAllClusterResource ¶
func (*SCluster) PurgeAllFedResource ¶
func (*SCluster) ReRunDeployingComponents ¶
func (*SCluster) RealDelete ¶
func (*SCluster) SetAPIServer ¶
func (*SCluster) SetK8sVersion ¶
func (*SCluster) SetKubeconfig ¶
func (*SCluster) StartApplyAddonsTask ¶
func (*SCluster) StartClusterCreateTask ¶
func (*SCluster) StartClusterDeleteTask ¶
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 (*SCluster) StartDeployMachinesTask ¶
func (*SCluster) StartSyncStatus ¶
func (*SCluster) StartSyncTask ¶
func (*SCluster) SubmitSyncTask ¶
func (*SCluster) SyncCallSyncTask ¶
func (*SCluster) SyncInfoFromCloud ¶
func (*SCluster) SyncK8sMachinesConfig ¶
func (*SCluster) ValidateAddMachines ¶
func (c *SCluster) ValidateAddMachines(ctx context.Context, userCred mcclient.TokenCredential, ms []api.CreateMachineData, checkCount bool) ([]*api.CreateMachineData, error)
func (*SCluster) ValidateDeleteCondition ¶
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 (m *SClusterComponentManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool
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 ¶
type SClusterManager struct { db.SStatusDomainLevelResourceBaseManager SSyncableK8sBaseResourceManager *SSyncableManager }
+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 (m *SClusterManager) CreateCluster(ctx context.Context, userCred mcclient.TokenCredential, data api.ClusterCreateInput) (manager.ICluster, error)
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 (*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 ¶
func (m *SClusterManager) PerformGc(ctx context.Context, userCred mcclient.TokenCredential, query, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
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 (m *SClusterManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.ClusterCreateInput) (*api.ClusterCreateInput, error)
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 (res *SClusterResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SClusterResourceBase) Delete ¶
func (obj *SClusterResourceBase) Delete(ctx context.Context, userCred mcclient.TokenCredential) error
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 (res *SClusterResourceBase) GetDetailsRawdata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
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 (res *SClusterResourceBase) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SClusterResourceBase) PostDelete ¶
func (res *SClusterResourceBase) PostDelete(ctx context.Context, userCred mcclient.TokenCredential)
func (*SClusterResourceBase) PostUpdate ¶
func (res *SClusterResourceBase) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)
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 (res *SClusterResourceBase) UpdateRawdata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SClusterResourceBase) UpdateRemoteObject ¶
func (obj *SClusterResourceBase) UpdateRemoteObject(remoteObj interface{}) (interface{}, error)
func (*SClusterResourceBase) ValidateUpdateData ¶
func (obj *SClusterResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.ClusterResourceUpdateInput) (*api.ClusterResourceUpdateInput, error)
type SClusterResourceBaseManager ¶
type SClusterResourceBaseManager struct { db.SStatusDomainLevelResourceBaseManager db.SExternalizedResourceBaseManager SK8sOwnedResourceBaseManager *SSyncableManager // contains filtered or unexported fields }
+onecloud:swagger-gen-ignore
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 (m *SClusterResourceBaseManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject
func (*SClusterResourceBaseManager) FilterBySystemAttributes ¶
func (m *SClusterResourceBaseManager) FilterBySystemAttributes(q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject, scope rbacscope.TRbacScope) *sqlchemy.SQuery
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 (m *SClusterResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.ClusterResourceListInput) (*sqlchemy.SQuery, error)
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
func (SClusterResourceBaseManager) ValidateCreateData ¶
func (m SClusterResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, query jsonutils.JSONObject, data *api.ClusterResourceCreateInput) (*api.ClusterResourceCreateInput, 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 (obj *SClusterRoleBinding) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
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 (m *SClusterRoleBindingManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.ClusterResourceListInput) (*sqlchemy.SQuery, error)
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
func (*SClusterRoleBindingManager) ValidateCreateData ¶
func (m *SClusterRoleBindingManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.ClusterRoleBindingCreateInput) (*api.ClusterRoleBindingCreateInput, 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 (m *SClusterRoleManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.ClusterResourceListInput) (*sqlchemy.SQuery, error)
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 ¶
func (m *SClusterRoleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.ClusterRoleCreateInput) (*api.ClusterRoleCreateInput, error)
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 (m *SComponent) PerformDisable( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SComponent) PerformEnable ¶
func (m *SComponent) PerformEnable( ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SComponent) PostCreate ¶
func (m *SComponent) PostCreate( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject, )
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 ¶
func (m *SComponentManager) ValidateCreateData( ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, _ jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
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 ¶
func (m *SConfigMapManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.ConfigMapCreateInput) (*api.ConfigMapCreateInput, error)
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 (r *SContainerRegistry) GetConfig() (*api.ContainerRegistryConfig, error)
func (*SContainerRegistry) GetDetailsConfig ¶
func (r *SContainerRegistry) GetDetailsConfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*api.ContainerRegistryConfig, error)
func (*SContainerRegistry) GetDetailsDownloadImage ¶
func (r *SContainerRegistry) GetDetailsDownloadImage(ctx context.Context, userCred mcclient.TokenCredential, query api.ContainerRegistryDownloadImageInput) (jsonutils.JSONObject, error)
func (*SContainerRegistry) GetDetailsImageTags ¶
func (r *SContainerRegistry) GetDetailsImageTags(ctx context.Context, userCred mcclient.TokenCredential, query *api.ContainerRegistryGetImageTagsInput) (jsonutils.JSONObject, error)
func (*SContainerRegistry) GetDetailsImages ¶
func (r *SContainerRegistry) GetDetailsImages(ctx context.Context, userCred mcclient.TokenCredential, input *api.ContainerRegistryListImagesInput) (jsonutils.JSONObject, error)
func (*SContainerRegistry) GetDockerRegistryClient ¶
func (r *SContainerRegistry) GetDockerRegistryClient() (client.Client, error)
func (*SContainerRegistry) GetDriver ¶
func (r *SContainerRegistry) GetDriver() IContainerRegistryDriver
func (*SContainerRegistry) GetType ¶
func (r *SContainerRegistry) GetType() api.ContainerRegistryType
func (*SContainerRegistry) PerformUploadImage ¶
func (r *SContainerRegistry) PerformUploadImage(ctx context.Context, userCred mcclient.TokenCredential, query, data api.ContainerRegistryUploadImageInput) (*client.ImageMetadata, error)
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 (man *SContainerRegistryManager) GetDriver(rType api.ContainerRegistryType) (IContainerRegistryDriver, error)
func (*SContainerRegistryManager) GetPropertyDownloadImage ¶
func (man *SContainerRegistryManager) GetPropertyDownloadImage(ctx context.Context, userCred mcclient.TokenCredential, query api.ContainerRegistryManagerDownloadImageInput) (jsonutils.JSONObject, error)
func (*SContainerRegistryManager) ListItemFilter ¶
func (man *SContainerRegistryManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.ContainerRegistryListInput) (*sqlchemy.SQuery, error)
func (*SContainerRegistryManager) ValidateCreateData ¶
func (man *SContainerRegistryManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *api.ContainerRegistryCreateInput) (*api.ContainerRegistryCreateInput, error)
type SCronJob ¶
type SCronJob struct {
SNamespaceResourceBase
}
func (*SCronJob) GetDetails ¶
func (*SCronJob) TriggerCronJob ¶
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 (m *SDaemonSetManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.DaemonSetCreateInput) (*api.DaemonSetCreateInput, error)
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 (m *SDeploymentManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.DeploymentListInput) (*sqlchemy.SQuery, error)
func (*SDeploymentManager) NewRemoteObjectForCreate ¶
func (m *SDeploymentManager) NewRemoteObjectForCreate(model IClusterModel, cli *client.ClusterManager, data jsonutils.JSONObject) (interface{}, error)
func (*SDeploymentManager) ValidateCreateData ¶
func (m *SDeploymentManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.DeploymentCreateInput) (*api.DeploymentCreateInput, error)
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 SEventManager ¶
type SEventManager struct { model.SK8sNamespaceResourceBaseManager model.SK8sOwnedResourceBaseManager }
func (SEventManager) FilterEventsByKindName ¶
func (SEventManager) FilterEventsByType ¶
func (SEventManager) FilterEventsByUID ¶
func (*SEventManager) GetAPIEvents ¶
func (SEventManager) GetAllRawEvents ¶
func (SEventManager) GetEventsByUID ¶
func (SEventManager) GetK8sResourceInfo ¶
func (m SEventManager) GetK8sResourceInfo() model.K8sResourceInfo
func (SEventManager) GetNamespaceEvents ¶
func (SEventManager) GetRawEvents ¶
func (SEventManager) GetRawEventsByObject ¶
func (SEventManager) GetRawEventsByPods ¶
func (SEventManager) GetRawEventsByResource ¶
func (SEventManager) GetRawEventsByUID ¶
func (SEventManager) GetRawWarningEventsByPods ¶
func (*SEventManager) GetWarningEventsByPods ¶
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) PerformAttachCluster ¶
func (obj *SFedClusterRole) PerformAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *api.FederatedResourceJointClusterInput) (*api.FederatedResourceJointClusterInput, error)
func (*SFedClusterRole) PerformDetachCluster ¶
func (obj *SFedClusterRole) PerformDetachCluster(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *api.FederatedResourceJointClusterInput) (*api.FederatedResourceJointClusterInput, error)
func (*SFedClusterRole) ValidateUpdateData ¶
func (obj *SFedClusterRole) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.FedClusterRoleUpdateInput) (*api.FedClusterRoleUpdateInput, error)
type SFedClusterRoleBinding ¶
type SFedClusterRoleBinding struct { SFedResourceBase Spec *api.FederatedClusterRoleBindingSpec `list:"user" update:"user" create:"required"` }
func (*SFedClusterRoleBinding) CustomizeCreate ¶
func (obj *SFedClusterRoleBinding) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
func (*SFedClusterRoleBinding) ValidateUpdateData ¶
func (obj *SFedClusterRoleBinding) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.FedClusterRoleBindingUpdateInput) (*api.FedClusterRoleBindingUpdateInput, error)
type SFedClusterRoleBindingCluster ¶
type SFedClusterRoleBindingCluster struct {
SFedJointCluster
}
func (*SFedClusterRoleBindingCluster) Detach ¶
func (obj *SFedClusterRoleBindingCluster) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SFedClusterRoleBindingCluster) GetResourceCreateData ¶
func (obj *SFedClusterRoleBindingCluster) GetResourceCreateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, base api.NamespaceResourceCreateInput) (jsonutils.JSONObject, error)
func (*SFedClusterRoleBindingCluster) GetResourceUpdateData ¶
func (obj *SFedClusterRoleBindingCluster) GetResourceUpdateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, resObj IClusterModel, base api.NamespaceResourceUpdateInput) (jsonutils.JSONObject, error)
type SFedClusterRoleBindingClusterManager ¶
type SFedClusterRoleBindingClusterManager struct {
SFedJointClusterManager
}
+onecloud:swagger-gen-model-singular=federatedclusterrolebindingcluster +onecloud:swagger-gen-model-plural=federatedclusterrolebindingclusters
var (
FedClusterRoleBindingClusterManager *SFedClusterRoleBindingClusterManager
)
func (*SFedClusterRoleBindingClusterManager) ListItemFilter ¶
func (m *SFedClusterRoleBindingClusterManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.FedClusterRoleBindingClusterListInput) (*sqlchemy.SQuery, error)
type SFedClusterRoleBindingManager ¶
type SFedClusterRoleBindingManager struct {
SFedResourceBaseManager
}
+onecloud:swagger-gen-model-singular=federatedclusterrolebinding +onecloud:swagger-gen-model-plural=federatedclusterrolebindings
func GetFedClusterRoleBindingManager ¶
func GetFedClusterRoleBindingManager() *SFedClusterRoleBindingManager
func (*SFedClusterRoleBindingManager) ValidateCreateData ¶
func (m *SFedClusterRoleBindingManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.FederatedClusterRoleBindingCreateInput) (*api.FederatedClusterRoleBindingCreateInput, error)
type SFedClusterRoleCluster ¶
type SFedClusterRoleCluster struct {
SFedJointCluster
}
func (*SFedClusterRoleCluster) Detach ¶
func (obj *SFedClusterRoleCluster) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SFedClusterRoleCluster) GetFedClusterRole ¶
func (obj *SFedClusterRoleCluster) GetFedClusterRole() (*SFedClusterRole, error)
func (*SFedClusterRoleCluster) GetResourceCreateData ¶
func (obj *SFedClusterRoleCluster) GetResourceCreateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, base api.NamespaceResourceCreateInput) (jsonutils.JSONObject, error)
func (*SFedClusterRoleCluster) GetResourceUpdateData ¶
func (obj *SFedClusterRoleCluster) GetResourceUpdateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, resObj IClusterModel, base api.NamespaceResourceUpdateInput) (jsonutils.JSONObject, error)
type SFedClusterRoleClusterManager ¶
type SFedClusterRoleClusterManager struct {
SFedJointClusterManager
}
+onecloud:swagger-gen-model-singular=federatedclusterrolecluster +onecloud:swagger-gen-model-plural=federatedclusterroleclusters
var (
FedClusterRoleClusterManager *SFedClusterRoleClusterManager
)
func (*SFedClusterRoleClusterManager) ListItemFilter ¶
func (m *SFedClusterRoleClusterManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.FederatedClusterRoleClusterListInput) (*sqlchemy.SQuery, error)
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 (m *SFedClusterRoleManager) GetPropertyApiResources(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (api.ClusterAPIGroupResources, error)
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)
func (*SFedClusterRoleManager) ValidateCreateData ¶
func (m *SFedClusterRoleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.FederatedClusterRoleCreateInput) (*api.FederatedClusterRoleCreateInput, 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 ¶
func (m *SFedJointClusterManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.FedJointClusterListInput) (*sqlchemy.SQuery, error)
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) PerformAttachCluster ¶
func (obj *SFedNamespace) PerformAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *api.FederatedNamespaceAttachClusterInput) (*api.FederatedNamespaceAttachClusterInput, error)
func (*SFedNamespace) PerformDetachCluster ¶
func (obj *SFedNamespace) PerformDetachCluster(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *api.FederatedNamespaceDetachClusterInput) (*api.FederatedNamespaceDetachClusterInput, error)
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 ¶
func (obj *SFedNamespace) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.FedNamespaceUpdateInput) (*api.FedNamespaceUpdateInput, error)
type SFedNamespaceCluster ¶
type SFedNamespaceCluster struct {
SFedJointCluster
}
func (*SFedNamespaceCluster) Detach ¶
func (obj *SFedNamespaceCluster) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
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 (obj *SFedNamespaceCluster) GetResourceCreateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, base api.NamespaceResourceCreateInput) (jsonutils.JSONObject, error)
func (*SFedNamespaceCluster) GetResourceUpdateData ¶
func (obj *SFedNamespaceCluster) GetResourceUpdateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, resObj IClusterModel, base api.NamespaceResourceUpdateInput) (jsonutils.JSONObject, error)
type SFedNamespaceClusterManager ¶
type SFedNamespaceClusterManager struct {
SFedJointClusterManager
}
+onecloud:swagger-gen-model-singular=federatednamespacecluster +onecloud:swagger-gen-model-plural=federatednamespaceclusters
var (
FedNamespaceClusterManager *SFedNamespaceClusterManager
)
func (*SFedNamespaceClusterManager) ListItemFilter ¶
func (m *SFedNamespaceClusterManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.FederatedNamespaceClusterListInput) (*sqlchemy.SQuery, error)
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 ¶
func (m *SFedNamespaceJointClusterManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.FedNamespaceJointClusterListInput) (*sqlchemy.SQuery, error)
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)
func (*SFedNamespaceManager) ValidateCreateData ¶
func (m *SFedNamespaceManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.FederatedNamespaceCreateInput) (*api.FederatedNamespaceCreateInput, 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 (obj *SFedNamespaceResource) PerformAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SFedNamespaceResource) ValidateAttachCluster ¶
func (obj *SFedNamespaceResource) ValidateAttachCluster(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SFedNamespaceResource) ValidateUpdateData ¶
func (obj *SFedNamespaceResource) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.FedNamespaceResourceUpdateInput) (*api.FedNamespaceResourceUpdateInput, 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 ¶
func (m *SFedNamespaceResourceManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.FederatedNamespaceResourceListInput) (*sqlchemy.SQuery, error)
func (*SFedNamespaceResourceManager) ValidateCreateData ¶
func (m *SFedNamespaceResourceManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.FederatedNamespaceResourceCreateInput) (*api.FederatedNamespaceResourceCreateInput, error)
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 (obj *SFedResourceBase) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SFedResourceBase) PerformSyncCluster ¶
func (obj *SFedResourceBase) PerformSyncCluster(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *api.FederatedResourceJointClusterInput) (*api.FederatedResourceJointClusterInput, error)
func (*SFedResourceBase) PostCreate ¶
func (obj *SFedResourceBase) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
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 (obj *SFedResourceBase) ValidateJointCluster(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject) (IFedJointClusterModel, jsonutils.JSONObject, error)
func (*SFedResourceBase) ValidateUpdateData ¶
func (m *SFedResourceBase) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.FedResourceUpdateInput) (*api.FedResourceUpdateInput, error)
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 (m *SFedResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.FederatedResourceListInput) (*sqlchemy.SQuery, error)
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)
func (*SFedResourceBaseManager) ValidateCreateData ¶
func (m *SFedResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.FederatedResourceCreateInput) (*api.FederatedResourceCreateInput, error)
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 ¶
func (obj *SFedRoleBinding) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.FedRoleBindingUpdateInput) (*api.FedRoleBindingUpdateInput, error)
type SFedRoleBindingCluster ¶
type SFedRoleBindingCluster struct {
SFederatedNamespaceJointCluster
}
func (*SFedRoleBindingCluster) Detach ¶
func (obj *SFedRoleBindingCluster) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SFedRoleBindingCluster) GetResourceCreateData ¶
func (obj *SFedRoleBindingCluster) GetResourceCreateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, base api.NamespaceResourceCreateInput) (jsonutils.JSONObject, error)
func (*SFedRoleBindingCluster) GetResourceUpdateData ¶
func (obj *SFedRoleBindingCluster) GetResourceUpdateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, resObj IClusterModel, base api.NamespaceResourceUpdateInput) (jsonutils.JSONObject, error)
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
func (*SFedRoleBindingManager) ValidateCreateData ¶
func (m *SFedRoleBindingManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.FederatedRoleBindingCreateInput) (*api.FederatedRoleBindingCreateInput, error)
type SFedRoleCluster ¶
type SFedRoleCluster struct {
SFederatedNamespaceJointCluster
}
func (*SFedRoleCluster) Detach ¶
func (obj *SFedRoleCluster) Detach(ctx context.Context, userCred mcclient.TokenCredential) error
func (*SFedRoleCluster) GetResourceCreateData ¶
func (obj *SFedRoleCluster) GetResourceCreateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, base api.NamespaceResourceCreateInput) (jsonutils.JSONObject, error)
func (*SFedRoleCluster) GetResourceUpdateData ¶
func (obj *SFedRoleCluster) GetResourceUpdateData(ctx context.Context, userCred mcclient.TokenCredential, fObj IFedModel, resObj IClusterModel, base api.NamespaceResourceUpdateInput) (jsonutils.JSONObject, error)
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 ¶
func (m *SFedRoleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.FedRoleCreateInput) (*api.FedRoleCreateInput, error)
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 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 (*SJob) GetExtraDetails ¶
func (job *SJob) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.JobDetailV2, error)
func (*SJob) GetPodInfo ¶
func (*SJob) GetRawPods ¶
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 ¶
func (m *SJobManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query *jsonutils.JSONDict, input *api.JobCreateInputV2) (*api.JobCreateInputV2, error)
type SK8sOwnedResourceBaseManager ¶
type SK8sOwnedResourceBaseManager struct {
// contains filtered or unexported fields
}
func (SK8sOwnedResourceBaseManager) CustomizeFilterList ¶
func (m SK8sOwnedResourceBaseManager) CustomizeFilterList(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*db.CustomizeListFilters, error)
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 ¶
func (m *SLimitRangeManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
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 (*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) GetCluster ¶
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) 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 (*SMachine) GetPrivateIP ¶
func (*SMachine) GetResourceId ¶
func (*SMachine) IsControlplane ¶
func (*SMachine) IsEnableNativeIPAlloc ¶
func (*SMachine) IsFirstNode ¶
func (*SMachine) IsInClassicNetwork ¶
func (*SMachine) PerformAttachNetworkaddress ¶
func (m *SMachine) PerformAttachNetworkaddress(ctx context.Context, userCred mcclient.TokenCredential, _ jsonutils.JSONObject, input *api.MachineAttachNetworkAddressInput) (jsonutils.JSONObject, error)
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 (m *SMachine) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject)
func (*SMachine) RealDelete ¶
func (*SMachine) SetHypervisor ¶
func (*SMachine) SetPrivateIP ¶
func (*SMachine) SetResourceId ¶
func (*SMachine) StartMachineCreateTask ¶
func (*SMachine) StartPrepareTask ¶
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 (*SMachine) SyncK8sConfig ¶
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 (man *SMachineManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
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 ¶
func (m SMinioBaseComponentManager) GetHelmManager() HelmComponentManager
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 ¶
type SNamespace struct { SClusterResourceBase SFederatedManagedResourceBase }
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) 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 ¶
type SNamespaceManager struct { SClusterResourceBaseManager SFederatedManagedResourceBaseManager }
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 (m *SNamespaceManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.NamespaceListInput) (*sqlchemy.SQuery, error)
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 ¶
func (m *SNamespaceManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, query jsonutils.JSONObject, data *api.NamespaceCreateInputV2) (*api.NamespaceCreateInputV2, error)
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 (res *SNamespaceResourceBase) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) error
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 (res *SNamespaceResourceBase) GetDetailsRawdata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)
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 ¶
func (res *SNamespaceResourceBase) UpdateRawdata(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
type SNamespaceResourceBaseManager ¶
type SNamespaceResourceBaseManager struct {
SClusterResourceBaseManager
}
+onecloud:swagger-gen-ignore
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 (m *SNamespaceResourceBaseManager) FetchUniqValues(ctx context.Context, data jsonutils.JSONObject) jsonutils.JSONObject
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 (m *SNamespaceResourceBaseManager) FilterByUniqValues(q *sqlchemy.SQuery, values jsonutils.JSONObject) *sqlchemy.SQuery
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 (m *SNamespaceResourceBaseManager) GetGCQuery() *sqlchemy.SQuery
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 (m *SNamespaceResourceBaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.NamespaceResourceListInput) (*sqlchemy.SQuery, error)
func (*SNamespaceResourceBaseManager) NewFromRemoteObject ¶
func (res *SNamespaceResourceBaseManager) NewFromRemoteObject( ctx context.Context, userCred mcclient.TokenCredential, cluster *SCluster, remoteObj interface{}) (IClusterModel, error)
func (SNamespaceResourceBaseManager) ValidateCreateData ¶
func (m SNamespaceResourceBaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, query jsonutils.JSONObject, data *api.NamespaceResourceCreateInput) (*api.NamespaceResourceCreateInput, 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 (*SNode) GetExtraDetails ¶
func (node *SNode) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.NodeDetailV2, error)
func (*SNode) GetRawPods ¶
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 (*SNode) SetStatusByRemoteObject ¶
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 ¶
func (m *SNodeManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, query jsonutils.JSONObject, data *api.NodeCreateInput) (*api.NodeCreateInput, error)
type SPVC ¶
type SPVC struct {
SNamespaceResourceBase
}
func (*SPVC) GetDetails ¶
func (*SPVC) GetMountPodNames ¶
func (obj *SPVC) GetMountPodNames(cli *client.ClusterManager, pvc *v1.PersistentVolumeClaim) ([]string, error)
func (*SPVC) GetRawPods ¶
func (*SPVC) SetStatusByRemoteObject ¶
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 (m *SPVCManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.PersistentVolumeClaimListInput) (*sqlchemy.SQuery, error)
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 (*SPod) GetExtraDetails ¶
func (p *SPod) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, isList bool) (api.PodDetailV2, error)
func (*SPod) SetStatusByRemoteObject ¶
func (*SPod) UpdateFromRemoteObject ¶
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 ¶
func (m *SPodManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
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 (*SRelease) GetChartClient ¶
func (r *SRelease) GetChartClient() (*helm.ChartClient, error)
func (*SRelease) GetDetails ¶
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) GetHelmRelease ¶
func (r *SRelease) GetHelmRelease(isList bool) (*api.ReleaseDetail, error)
func (*SRelease) GetHelmValues ¶
func (*SRelease) GetRemoteObject ¶
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 (*SRelease) UpdateFromRemoteObject ¶
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 (m *SReleaseManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.ReleaseListInputV2) (*sqlchemy.SQuery, error)
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) ValidateCreateData ¶
func (m *SReleaseManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerCred mcclient.IIdentityProvider, query jsonutils.JSONObject, data *api.ReleaseCreateInput) (*api.ReleaseCreateInput, error)
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 ¶
func (m *SReplicaSetManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
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) 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 (*SRepo) PerformSync ¶
func (r *SRepo) PerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SRepo) PerformUploadChart ¶
func (r *SRepo) PerformUploadChart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)
func (*SRepo) ValidateDeleteCondition ¶
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 ¶
func (man *SRepoManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *api.RepoCreateInput) (*api.RepoCreateInput, error)
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 ¶
func (m *SResourceQuotaManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
type SRole ¶
type SRole struct {
SNamespaceResourceBase
}
func (*SRole) GetDetails ¶
func (*SRole) NewRemoteObjectForUpdate ¶
func (obj *SRole) NewRemoteObjectForUpdate(cli *client.ClusterManager, remoteObj interface{}, data jsonutils.JSONObject) (interface{}, error)
func (*SRole) UpdateFromRemoteObject ¶
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 (m *SRoleBindingManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.NamespaceResourceListInput) (*sqlchemy.SQuery, error)
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 (m *SRoleBindingManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.RoleBindingCreateInput) (*api.RoleBindingCreateInput, error)
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 (m *SRoleManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, input *api.NamespaceResourceListInput) (*sqlchemy.SQuery, error)
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 (m *SRoleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.RoleCreateInput) (*api.RoleCreateInput, error)
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 (*SSecret) GetRawPods ¶
func (*SSecret) UpdateFromRemoteObject ¶
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 ¶
func (m *SSecretManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.SecretCreateInput) (*api.SecretCreateInput, error)
type SService ¶
type SService struct {
SNamespaceResourceBase
}
func (*SService) GetDetails ¶
func (*SService) GetRawPods ¶
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 ¶
func (m *SServiceAccountManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)
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 (m *SServiceManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *api.ServiceCreateInput) (*api.ServiceCreateInput, error)
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 (m *SStatefulSetManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.StatefulsetCreateInput) (*api.StatefulsetCreateInput, error)
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 (m *SStorageClassManager) PerformConnectionTest(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, input *api.StorageClassCreateInput) (*api.StorageClassTestResult, error)
func (*SStorageClassManager) RegisterDriver ¶
func (m *SStorageClassManager) RegisterDriver(provisioner string, driver IStorageClassDriver)
func (*SStorageClassManager) ValidateCreateData ¶
func (m *SStorageClassManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, input *api.StorageClassCreateInput) (*api.StorageClassCreateInput, error)
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) MarkEndSync(ctx context.Context, userCred mcclient.TokenCredential, obj IK8sSyncModel) error
func (*SSyncableK8sBaseResource) MarkErrorSync ¶
func (_ *SSyncableK8sBaseResource) MarkErrorSync(ctx context.Context, obj IK8sSyncModel, err error) error
func (*SSyncableK8sBaseResource) MarkSyncing ¶
func (_ *SSyncableK8sBaseResource) MarkSyncing(obj IK8sSyncModel, userCred mcclient.TokenCredential) error
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 ¶
func (m *SSyncableK8sBaseResourceManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query api.SyncableK8sBaseResourceListInput) (*sqlchemy.SQuery, error)
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 (res UnstructuredResourceBase) GetRawJSONObject(m model.IK8sModel) (jsonutils.JSONObject, error)
func (UnstructuredResourceBase) GetUnstructuredObject ¶
func (_ UnstructuredResourceBase) GetUnstructuredObject(m model.IK8sModel) *unstructured.Unstructured
Source Files ¶
- ansibleplaybooks.go
- ansibleplaybooktemplates.go
- auth.go
- cluster_api.go
- cluster_drivers.go
- clustercomponents.go
- clusterjoints.go
- clusterresource.go
- clusterrolebindings.go
- clusterroles.go
- clusters.go
- common.go
- compare.go
- component_base.go
- component_minio_base.go
- component_monitor_minio.go
- component_thanos.go
- components.go
- components_cephcsi.go
- components_fluent_bit.go
- components_minio.go
- components_monitor.go
- configmap.go
- container_registries.go
- container_registry_drivers.go
- cronjobs.go
- daemonsets.go
- deployment.go
- endpoints.go
- events.go
- fed_api.go
- federated_clusterrole_clusters.go
- federated_clusterrolebinding_clusters.go
- federated_clusterrolebindings.go
- federated_clusterroles.go
- federated_joint_namespace_resource.go
- federated_joint_resource.go
- federated_managed_resource.go
- federated_namespace_clusters.go
- federated_namespace_resource.go
- federated_namespaces.go
- federated_resource.go
- federated_role_clusters.go
- federated_rolebinding_clusters.go
- federated_rolebindings.go
- federated_roles.go
- federated_utils.go
- helper.go
- ingresses.go
- initdb.go
- jobs.go
- k8smodels.go
- k8ssync.go
- limitranges.go
- machine_drivers.go
- machines.go
- namespace.go
- namespaceresource.go
- nodes.go
- pods.go
- pvcs.go
- pvs.go
- register_types.go
- release.go
- replicasets.go
- repo_drivers.go
- repos.go
- resourcequotas.go
- rolebindings.go
- roleref.go
- roles.go
- secrets.go
- serviceaccounts.go
- services.go
- statefulsets.go
- storageclasses.go
- syncbase.go
- syncworkers.go
- virtualmachines.go
- worker.go