Processing method and device of virtual machine management component, equipment, storage medium and program product

During the deployment of virtual machine management components, the configuration storage resource object of CR resources is mounted on the task execution resource object of the update operation and a delayed execution hook is installed, which solves the problem that CR resource parameters cannot be updated smoothly, and an efficient deployment and update process is achieved.

CN119536909APending Publication Date: 2025-02-28CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411633803.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

When deploying virtual machine management components, the delayed execution hook of CR resources causes CR resources to be unable to be tracked by the package manager in the future, resulting in the parameters in the CR resources being unable to be smoothly updated.

Method used

By configuring the configuration storage resource object of CR resources, mounted on the task execution resource object of the update operation, and a delay execution hook is provided. The package manager can track and process the delay execution hook to ensure that the parameters of the CR resource can be updated smoothly.

Benefits of technology

It realizes smooth update of CR resource parameters, avoids resource tracking problems caused by delayed execution hooks, and improves the deployment and update efficiency of virtual machine management components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536909A_ABST
    Figure CN119536909A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer processing, and provides a processing method and device for a virtual machine management component, equipment, a storage medium and a program product, and after a delayed execution hook is added, CR resources of the virtual machine management component can be tracked by a package manager. The method comprises the following steps: deploying non-CR resources and CR resources of a virtual machine management component in a cluster of a target application according to an application resource packet; the CR resource is configured as a configuration storage resource object of the target application, and the updating operation of the CR resource is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resource is mounted on the task execution resource object of the update operation; the task execution resource object of the updating operation is provided with a delayed execution hook; when updating parameters aiming at the virtual machine management component are obtained, on the basis of tracking of the delayed execution hook, the non-CR resources are updated firstly, then the updating parameters are sent to the configuration storage resource object, and the task execution resource object of the updating operation is triggered to update the CR resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer processing technology, and in particular to a processing method, apparatus, computer equipment, storage medium and computer program product for a virtual machine management component. Background Art

[0002] Some applications are containerized applications that can be used to manage multiple hosts in a cloud platform. These applications are called target applications. Virtual machines of target applications can be created through the virtual machine management component.

[0003] When creating a virtual machine through the capabilities of the virtual machine management component, you need to first deploy the virtual machine management component on the cluster of the target application.

[0004] You can use the package manager to deploy the virtual machine management component. When deploying, you need to first deploy the non-CR resources of the virtual machine management component, and then deploy the CR resources of the virtual machine management component. CR stands for Custom Resource in English and its Chinese name is Custom Resource.

[0005] There is a sequential deployment relationship between these two types of resources. To handle this sequential deployment relationship, if a delayed execution hook is directly added to the CR resources of the virtual machine management component, the CR resources of the virtual machine management component will not be tracked by the package manager later, and the parameters in the CR resources cannot be updated smoothly. Summary of the invention

[0006] Based on this, it is necessary to provide a processing method, apparatus, computer equipment, storage medium and computer program product for a virtual machine management component in response to the above technical problems.

[0007] The present application provides a method for processing a virtual machine management component, wherein the method includes steps performed by a package manager, and the method includes:

[0008] Acquire an application resource package of a virtual machine management component; the application resource package includes CR resources and non-CR resources of the virtual machine management component; the CR resources are configured as a configuration storage resource object of a target application, and an update operation involved in the CR resources is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resources is mounted on the task execution resource object of the update operation; the task execution resource object of the update operation is provided with a delayed execution hook;

[0009] Deploy non-CR resources and CR resources of the virtual machine management component on a cluster of a target application according to the application resource package;

[0010] When the update parameters for the virtual machine management component are obtained, based on the tracking of the deferred execution hook of the task execution resource object set in the update operation, the non-CR resources are first updated according to the update parameters, and then the update parameters are sent to the configuration storage resource object to trigger the mounted task execution resource object of the update operation to update the CR resources.

[0011] In one embodiment, the uninstall operation involved in the CR resource is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resource is mounted on the task execution resource object of the uninstall operation; the task execution resource object of the uninstall operation is provided with an early execution hook;

[0012] After deploying the non-CR resources and CR resources of the virtual machine management component on the cluster of the target application according to the application resource package, the method further includes:

[0013] When an uninstall instruction for the virtual machine management component is received, based on the tracking of the advance execution hook of the task execution resource object set in the uninstall operation, the mounted task execution resource object of the uninstall operation is first triggered through the configuration storage resource object to uninstall the CR resources. After the CR resources are uninstalled, the non-CR resources are uninstalled.

[0014] In one embodiment, the installation operation involved in the CR resource is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resource is mounted on the task execution resource object of the installation operation; the task execution resource object of the installation operation is provided with a delayed execution hook;

[0015] Deploying non-CR resources and CR resources of the virtual machine management component on a cluster of a target application according to the application resource package includes:

[0016] When an installation instruction for the virtual machine management component is received, based on the tracking of the advance execution hook of the task execution resource object set in the installation operation, the non-CR resources are deployed first, and then the mounted task execution resource object of the installation operation is triggered through the configuration storage resource object to deploy the CR resources.

[0017] In one embodiment, the non-CR resources include manager resources, CRD resources, and rbac resources; deploying the non-CR resources includes:

[0018] The template file containing the non-CR resources in the application resource package is executed to deploy manager resources, CRD resources and rbac resources.

[0019] In one embodiment, deploying the CR resources includes:

[0020] The template file containing the CR resource in the application resource package is executed to deploy the CR resource.

[0021] In one embodiment, the configuration storage resource object is a configmap resource object.

[0022] The present application provides a processing device for a virtual machine management component, the device comprising:

[0023] A resource package acquisition module, used to acquire an application resource package of a virtual machine management component; the application resource package includes CR resources and non-CR resources of the virtual machine management component; the CR resources are configured as a configuration storage resource object of a target application, and the update operation involved in the CR resources is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resources is mounted on the task execution resource object of the update operation; the task execution resource object of the update operation is provided with a delayed execution hook;

[0024] A deployment processing module, configured to deploy non-CR resources and CR resources of the virtual machine management component on a cluster of a target application according to the application resource package;

[0025] An update processing module is used to, when the update parameters for the virtual machine management component are obtained, first update the non-CR resources according to the update parameters based on the tracking of the deferred execution hook of the task execution resource object set in the update operation, and then send the update parameters to the configuration storage resource object to trigger the mounted task execution resource object of the update operation to update the CR resources.

[0026] The present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the above method.

[0027] The present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to execute the above method.

[0028] The present application provides a computer program product, on which a computer program is stored, and the computer program is executed by a processor to perform the above method.

[0029] The processing method, apparatus, computer equipment, storage medium and computer program product of the above-mentioned virtual machine management component, after deploying the non-CR resources and CR resources of the virtual machine management component on the cluster of the target application according to the application resource package of the virtual machine management component; since the CR resources are configured as the configuration storage resource object of the target application, the update operation involved in the CR resources is configured as the task execution resource object of the target application; the configuration storage resource object of the CR resources is mounted on the task execution resource object of the update operation; the task execution resource object of the update operation is provided with a deferred execution hook, so the package manager can track the deferred execution hook set in the task execution resource object of the update operation; when the package manager obtains the update parameters for the virtual machine management component, based on the tracking of the aforementioned deferred execution hook, the non-CR resources can be updated according to the update parameters first, and then the update parameters can be sent to the configuration storage resource object to trigger the mounted task execution resource object of the update operation to update the CR resources, so that the parameters in the CR resources can be smoothly updated. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 A flowchart of a processing method of a virtual machine management component in one embodiment;

[0032] Figure 2 A schematic diagram of an application resource package of a kubevirt component in one embodiment;

[0033] Figure 3 A schematic diagram of the process of installation, update and uninstallation in one embodiment;

[0034] Figure 4 is a structural block diagram of a processing device of a virtual machine management component in one embodiment;

[0035] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0037] The processing method of the virtual machine management component provided in the present application can be executed by a package manager, including: Figure 1 The steps shown are:

[0038] Step S101: obtaining an application resource package of a virtual machine management component.

[0039] The application resource package includes CR resources and non-CR resources of the virtual machine management component; the CR resources are configured as the configuration storage resource objects of the target application, and the update operations involved in the CR resources are configured as the task execution resource objects of the target application; the configuration storage resource objects of the CR resources are mounted on the task execution resource objects of the update operations; and the task execution resource objects of the update operations are provided with a delayed execution hook.

[0040] The target application is a containerized application that can be used to manage multiple hosts in a cloud platform, and the target application can be, for example, an application such as Kubernetes. When the target application is Kubernetes, the package manager can be the helm package manager applicable to Kubernetes.

[0041] The virtual machine management component can create virtual machines and enable them to run in containers. They can be managed and scheduled by target applications such as Kubernetes, allowing a variety of virtualized and containerized workloads to coexist in clusters of target applications such as Kubernetes.

[0042] When the target application is Kubernetes, the virtual machine management component can be the kubevirt component; the kubevirt component runs the virtual machine in a container mode; the kubevirt component abstracts the virtual machine into a Kubernetes resource object through Kubernetes's Custom Resource Definitions (CRD). When users want to create a virtual machine through the kubevirt capability, they need to deploy the kubevirt component on the Kubernetes cluster first.

[0043] The application resource package of the kubevirt component includes two types of template files: one is the kubevirt-operator.yaml template file, and the other is the kubevirt-CR.yaml template file.

[0044] In the traditional way of deploying kubevirt components, first execute the kubevirt-operator.yaml template file on the kubernetes cluster to create virt-operator resources, CRD resources of the kubevirt component, and rbac (Role-Based Access Control) resources; after the virt-operator resources are ready, execute the kubevirt-CR.yaml template file to create CR resources that match the CRD resources of the kubevirt component; the CR resources of the kubevirt component will further create other virt components and create CRD resources related to the virtual machine until they are completed and ready.

[0045] Among them, the role of ‌virt-operator resources in the kubevirt component is mainly to manage the life cycle and configuration of virtual machines. ‌virt-operator resources can be called manager resources. rbac resources mainly control the access rights of users, system processes or system components to Kubernetes resources by defining roles and role bindings.

[0046] In the above deployment process, resources other than CR resources can be called non-CR resources, such as virt-operator resources, CRD resources of kubevirt components, and rbac resources.

[0047] This article takes Kubernetes as the target application and kubevirt as the deployed virtual machine management component as an example:

[0048] The setting of non-CR resources in the application resource package of the kubevirt component provided in this application can be consistent with the setting of non-CR resources in the application resource package of the traditional method; that is, in the application resource package of the kubevirt component provided in this application, non-CR resources such as ‌virt-operator resources, CRD resources of the kubevirt component, and rbac resources are set as ordinary installation resources.

[0049] The setting of CR resources in the application resource package of the kubevirt component provided in this application is different from the setting of non-CR resources in the application resource package of the traditional method. Specifically, CR resources are configured as Kubernetes configuration storage resource objects, and the update operation involving CR resources (which can be recorded as upgrade-CR) is configured as Kubernetes task execution resource objects; the configuration storage resource object of CR resources is mounted on the task execution resource object of the update operation; the task execution resource object of the update operation is provided with a delayed execution hook.

[0050] The configuration storage resource object of Kubernetes can specifically be a configmap resource object. The configmap resource object is mainly used to store configuration data.

[0051] The task execution resource object of Kubernetes can be specifically a job resource object. The job resource object is used to create and manage one-time or batch tasks to ensure that these tasks are successfully executed at least once. At this time, the task execution resource object of the update operation can be recorded as job-upgrade-CR.

[0052] The above resources with sequential deployment dependencies can be integrated into the same application resource package, so that deployment can be completed with one click with the help of a single application resource package, thereby improving deployment efficiency.

[0053] Step S102: deploying non-CR resources and CR resources of a virtual machine management component on a cluster of a target application according to the application resource package.

[0054] This article takes Kubernetes as the target application and kubevirt as the deployed virtual machine management component as an example:

[0055] After obtaining the application resource package of the above-mentioned kubevirt component, in response to the user's installation instructions, the package manager can deploy the non-CR resources such as the ‌virt-operator resources of the virtual machine management component, the CRD resources and the rbac resources of the kubevirt component on the Kubernetes cluster according to the application resource package, and then deploy the CR resources after the non-CR resources are deployed.

[0056] Step S103, when the update parameters for the virtual machine management component are obtained, based on the tracking of the deferred execution hook of the task execution resource object set in the update operation, the non-CR resources are first updated according to the update parameters, and then the update parameters are sent to the configuration storage resource object to trigger the mounted task execution resource object of the update operation to update the CR resources.

[0057] This article takes Kubernetes as the target application and kubevirt as the deployed virtual machine management component as an example:

[0058] After the deployment is completed, since the deferred execution hook is set on job-upgrade-CR, the package manager can track in real time. When the package manager obtains the update parameters for the kubevirt component, the package manager can clearly know that the update of CR resources is later than the update of non-CR resources based on the tracking of the deferred execution hook of job-upgrade-CR. Therefore, the package manager can first update the non-CR resources such as ‌virt-operator resources, CRD resources of kubevirt components, and rbac resources according to the update parameters. After the non-CR resources such as ‌virt-operator resources, CRD resources of kubevirt components, and rbac resources are updated, the update parameters are sent to the configmap resource object of the CR resource. Since the configmap resource object of the CR resource is mounted on job-upgrade-CR, the update parameters are passed to job-upgrade-CR through the configmap resource object of the CR resource, triggering job-upgrade-CR to update the CR resources according to the update parameters.

[0059] In the processing method of the above-mentioned virtual machine management component, after the non-CR resources and CR resources of the virtual machine management component are deployed on the cluster of the target application according to the application resource package of the virtual machine management component; since the CR resources are configured as the configuration storage resource object of the target application, the update operation involving the CR resources is configured as the task execution resource object of the target application; the configuration storage resource object of the CR resources is mounted on the task execution resource object of the update operation; the task execution resource object of the update operation is provided with a deferred execution hook, so the package manager can track the deferred execution hook set in the task execution resource object of the update operation; when the package manager obtains the update parameters for the virtual machine management component, based on the tracking of the aforementioned deferred execution hook, the non-CR resources can be updated according to the update parameters first, and then the update parameters can be sent to the configuration storage resource object to trigger the mounted task execution resource object of the update operation to update the CR resources, so that the parameters in the CR resources can be smoothly updated.

[0060] In one embodiment, the uninstallation operation involving CR resources is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resource is mounted on the task execution resource object of the uninstallation operation; and the task execution resource object of the uninstallation operation is provided with an early execution hook.

[0061] This article takes Kubernetes as the target application and kubevirt as the deployed virtual machine management component as an example:

[0062] The operations involved in CR resources also include uninstallation operations (which can be recorded as delete-CR). delete-CR is configured as a task execution resource object of Kubernetes; when the execution task resource object is a job resource object, the task execution resource object of the uninstallation operation can be recorded as job-delete-CR.

[0063] The configuration storage resource object of the CR resource is mounted on the task execution resource object of the uninstallation operation; the task execution resource object of the uninstallation operation is provided with an early execution hook.

[0064] After deploying non-CR resources and CR resources of the virtual machine management component on the cluster of the target application according to the application resource package, the method provided by the present application further includes:

[0065] When an uninstall instruction for the virtual machine management component is received, based on the tracking of the advance execution hook of the task execution resource object set in the uninstall operation, the task execution resource object of the mounted uninstall operation is first triggered by configuring the storage resource object to uninstall the CR resources. After the CR resources are uninstalled, the non-CR resources are uninstalled.

[0066] This article takes Kubernetes as the target application and kubevirt as the deployed virtual machine management component as an example:

[0067] After the application resource package deployment according to the kubevirt component is completed, the package manager can perform real-time tracking because the pre-execution hook is set on job-delete-CR. When the package manager obtains the uninstallation instruction for the kubevirt component, the package manager can clearly uninstall the CR resources before the non-CR resources based on the tracking of the pre-execution hook of job-delete-CR. Since the configmap resource object of the CR resource is mounted on job-delete-CR, the package manager can trigger job-delete-CR through the configmap resource object of the CR resource to uninstall the CR resource. After the CR resource is uninstalled, the package manager can uninstall non-CR resources such as virt-operator resources, CRD resources of the kubevirt component, and rbac resources.

[0068] In this embodiment, the uninstallation operation involving CR resources is configured as the task execution resource object of the target application; the configuration storage resource object of the CR resources is mounted on the task execution resource object of the uninstallation operation; the task execution resource object of the uninstallation operation is provided with an early execution hook, so during the uninstallation process, the package manager can uninstall the CR resources first, and then uninstall the non-CR resources to ensure that the uninstallation proceeds normally.

[0069] In one embodiment, the installation operation involved in the CR resource is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resource is mounted on the task execution resource object of the installation operation; and the task execution resource object of the installation operation is provided with a delayed execution hook.

[0070] This article takes Kubernetes as the target application and kubevirt as the deployed virtual machine management component as an example:

[0071] The operations involved in CR resources also include installation operations (which can be recorded as install-CR). install-CR is configured as a task execution resource object of Kubernetes; when the execution task resource object is a job resource object, the task execution resource object of the installation operation can be recorded as job-install-CR.

[0072] The configuration storage resource object of the CR resource is mounted on the task execution resource object of the installation operation; the task execution resource object of the installation operation is provided with a delayed execution hook.

[0073] Deploy non-CR resources and CR resources of the virtual machine management component on the target application cluster according to the application resource package, including:

[0074] When an installation instruction for a virtual machine management component is received, based on the tracking of the advance execution hook of the task execution resource object set in the installation operation, non-CR resources are deployed first, and then the task execution resource object of the mounted installation operation is triggered by configuring the storage resource object to deploy the CR resources.

[0075] This article takes Kubernetes as the target application and kubevirt as the deployed virtual machine management component as an example:

[0076] After obtaining the application resource package of the kubevirt component, you can deploy it according to the application resource package. Since the delayed execution hook is set on job-install-CR, the package manager can track it in real time. When the package manager obtains the installation instructions for the kubevirt component, based on the tracking of the delayed execution hook of job-install-CR, it can be clear that the installation of CR resources is after the installation of non-CR resources.

[0077] Therefore, the package manager can first install non-CR resources such as ‌virt-operator resources, CRD resources of kubevirt components, and rbac resources. Since the configmap resource object of CR resources is mounted in job-install-CR, after the non-CR resources are installed, job-install-CR can be triggered through the configmap resource object of CR resources to install CR resources.

[0078] In this embodiment, the installation operation involving CR resources is configured as the task execution resource object of the target application; the configuration storage resource object of the CR resources is mounted on the task execution resource object of the installation operation; the task execution resource object of the installation operation is provided with a delayed execution hook, so the package manager can deploy non-CR resources first and then CR resources, and it will not affect the subsequent tracking of the package manager.

[0079] In one embodiment, non-CR resources include manager resources, CRD resources and rbac resources; deploying non-CR resources includes: executing a template file containing non-CR resources in an application resource package to deploy manager resources, CRD resources and rbac resources.

[0080] This article takes Kubernetes as the target application and kubevirt as the deployed virtual machine management component as an example:

[0081] The application resource package of the kubevirt component includes the kubevirt-operator.yaml template file, which contains non-CR resources such as ‌virt-operator resources, CRD resources of the kubevirt component, and rbac resources. The package manager can execute the kubevirt-operator.yaml template file to install the ‌virt-operator resources, CRD resources of the kubevirt component, and rbac resources in the Kubernetes cluster.

[0082] In one embodiment, deploying the CR resources includes: executing a template file containing the CR resources in an application resource package to deploy the CR resources.

[0083] This article takes Kubernetes as the target application and kubevirt as the deployed virtual machine management component as an example:

[0084] The application resource package of the kubevirt component includes the kubevirt-CR.yaml template file, which contains the CR resource. After the package manager executes the kubevirt-operator.yaml template file, it can execute the kubevirt-CR.yaml template file to install the CR resource in the Kubernetes cluster.

[0085] Reference Figure 2 , Figure 2 An example diagram of the application resource package of the kubevirt component provided for this application. The CR resource of the kubevirt component (which can be recorded as kubevirt-CR) is configured as a configmap resource object of Kubernetes; the update operation involved in the CR resource (which can be recorded as upgrade-CR) is configured as a job resource object of Kubernetes (which can be recorded as job-upgrade-CR); the uninstallation operation involved in the CR resource (which can be recorded as delete-CR) is configured as a job resource object of Kubernetes (which can be recorded as job-delete-CR); the installation operation involved in the CR resource (which can be recorded as install-CR) is configured as a job resource object of Kubernetes (which can be recorded as job-install-CR); job-upgrade-CR is provided with a delayed execution hook, which is recorded as post-upgrade hook; job-install-CR is provided with a delayed execution hook, which is recorded as post-install hook; job-delete-CR is provided with an early execution hook, which is recorded as pre-delete hook.

[0086] ‌ virt-operator resources, CRD resources of kubevirt components, rbac resources and other non-CR resources are set as normal installation resources.

[0087] Based on the application resource package of the kubevirt component provided in this application, the installation, update and uninstallation process is as follows Figure 3 shown.

[0088] In response to the one-click deployment instruction initiated by the user, the helm package manager can first deploy the virt-operator resources, the CRD resources and the rbac resources of the kubevirt component on the Kubernetes cluster, and then deploy the CR resources; when updating, the helm package manager can first update the virt-operator resources, the CRD resources and the rbac resources of the kubevirt component, and then update the CR resources; when uninstalling, the helm package manager can first uninstall the CR resources, and then uninstall the virt-operator resources, the CRD resources and the rbac resources of the kubevirt component.

[0089] Based on the use of the helm package manager to quickly deploy kubevirt components, the dependency problem of deploying non-CR resources and CR resources in sequence is solved to achieve the purpose of one-click rapid deployment, simplify the deployment process of kubevirt components, reduce the complexity and error rate of manual operations, and improve deployment efficiency and user experience; and after the deployment is completed, the parameters of CR resources can still be smoothly updated as needed.

[0090] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0091] Based on the same inventive concept, the embodiment of the present application also provides a processing device of a virtual machine management component for implementing the processing method of the virtual machine management component involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the processing device of one or more virtual machine management components provided below can refer to the limitations of the processing method of the virtual machine management component above, and will not be repeated here.

[0092] In one embodiment, Figure 4 As shown, a processing device of a virtual machine management component is provided, comprising:

[0093] The resource package acquisition module 401 is used to acquire the application resource package of the virtual machine management component; the application resource package includes the CR resources and non-CR resources of the virtual machine management component; the CR resources are configured as the configuration storage resource object of the target application, and the update operation involved in the CR resources is configured as the task execution resource object of the target application; the configuration storage resource object of the CR resources is mounted on the task execution resource object of the update operation; the task execution resource object of the update operation is provided with a delayed execution hook;

[0094] A deployment processing module 402, configured to deploy non-CR resources and CR resources of the virtual machine management component on a cluster of a target application according to the application resource package;

[0095] The update processing module 403 is used to, when the update parameters for the virtual machine management component are obtained, based on the tracking of the deferred execution hook of the task execution resource object set in the update operation, first update the non-CR resources according to the update parameters, and then send the update parameters to the configuration storage resource object to trigger the mounted task execution resource object of the update operation to update the CR resources.

[0096] In one embodiment, the uninstall operation involved in the CR resource is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resource is mounted on the task execution resource object of the uninstall operation; the task execution resource object of the uninstall operation is provided with an early execution hook;

[0097] The device also includes an uninstall processing module, which is used to: when an uninstall instruction for the virtual machine management component is received, based on the tracking of the advance execution hook of the task execution resource object set in the uninstall operation, first trigger the mounted task execution resource object of the uninstall operation through the configuration storage resource object to uninstall the CR resources, and after the CR resources are uninstalled, uninstall the non-CR resources.

[0098] In one embodiment, the installation operation involved in the CR resource is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resource is mounted on the task execution resource object of the installation operation; the task execution resource object of the installation operation is provided with a delayed execution hook;

[0099] The deployment processing module 402 is also used to: when receiving an installation instruction for the virtual machine management component, based on the tracking of the advance execution hook of the task execution resource object set in the installation operation, first deploy the non-CR resources, and then trigger the mounted task execution resource object of the installation operation through the configuration storage resource object to deploy the CR resources.

[0100] In one embodiment, the non-CR resources include manager resources, CRD resources and rbac resources; the deployment processing module 402 is also used to: execute the template file containing the non-CR resources in the application resource package to deploy manager resources, CRD resources and rbac resources.

[0101] In one embodiment, the deployment processing module 402 is further used to: execute the template file containing the CR resource in the application resource package to deploy the CR resource.

[0102] In one embodiment, the configuration storage resource object is a configmap resource object.

[0103] Each module in the processing device of the above-mentioned virtual machine management component can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0104] In an exemplary embodiment, a computer device is provided, the internal structure of which can be shown as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data involved in the above method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a processing method for a virtual machine management component is implemented.

[0105] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0106] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above-mentioned various method embodiments when executing the computer program.

[0107] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0108] In one embodiment, a computer program product is provided, on which a computer program is stored, and the computer program is used by a processor to execute the steps in the above-mentioned various method embodiments.

[0109] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0110] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0111] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0112] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for processing a virtual machine management component, characterized in that: The method comprises steps performed by a package manager, the method comprising: Acquire an application resource package of a virtual machine management component; the application resource package includes CR resources and non-CR resources of the virtual machine management component; the CR resources are configured as a configuration storage resource object of a target application, and an update operation involved in the CR resources is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resources is mounted on the task execution resource object of the update operation; the task execution resource object of the update operation is provided with a delayed execution hook; Deploy non-CR resources and CR resources of the virtual machine management component on a cluster of a target application according to the application resource package; When the update parameters for the virtual machine management component are obtained, based on the tracking of the deferred execution hook of the task execution resource object set in the update operation, the non-CR resources are first updated according to the update parameters, and then the update parameters are sent to the configuration storage resource object to trigger the mounted task execution resource object of the update operation to update the CR resources.

2. The method according to claim 1, characterized in that The uninstallation operation involved in the CR resource is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resource is mounted on the task execution resource object of the uninstallation operation; the task execution resource object of the uninstallation operation is provided with an early execution hook; After deploying the non-CR resources and CR resources of the virtual machine management component on the cluster of the target application according to the application resource package, the method further includes: When an uninstall instruction for the virtual machine management component is received, based on the tracking of the advance execution hook of the task execution resource object set in the uninstall operation, the mounted task execution resource object of the uninstall operation is first triggered through the configuration storage resource object to uninstall the CR resources. After the CR resources are uninstalled, the non-CR resources are uninstalled.

3. The method according to claim 1, characterized in that The installation operation involved in the CR resource is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resource is mounted on the task execution resource object of the installation operation; the task execution resource object of the installation operation is provided with a delayed execution hook; Deploying non-CR resources and CR resources of the virtual machine management component on a cluster of a target application according to the application resource package includes: When an installation instruction for the virtual machine management component is received, based on the tracking of the advance execution hook of the task execution resource object set in the installation operation, the non-CR resources are deployed first, and then the mounted task execution resource object of the installation operation is triggered through the configuration storage resource object to deploy the CR resources.

4. The method according to claim 3, characterized in that The non-CR resources include manager resources, CRD resources and rbac resources; The non-CR resources are deployed, including: The template file containing the non-CR resources in the application resource package is executed to deploy manager resources, CRD resources and rbac resources.

5. The method according to claim 3, characterized in that: Deploying the CR resources includes: The template file containing the CR resource in the application resource package is executed to deploy the CR resource.

6. The method according to any one of claims 1 to 5, characterized in that: The configuration storage resource object is a configmap resource object.

7. A processing device for a virtual machine management component, characterized in that: The device comprises: A resource package acquisition module, used to acquire an application resource package of a virtual machine management component; the application resource package includes CR resources and non-CR resources of the virtual machine management component; the CR resources are configured as a configuration storage resource object of a target application, and the update operation involved in the CR resources is configured as a task execution resource object of the target application; the configuration storage resource object of the CR resources is mounted on the task execution resource object of the update operation; the task execution resource object of the update operation is provided with a delayed execution hook; A deployment processing module, configured to deploy non-CR resources and CR resources of the virtual machine management component on a cluster of a target application according to the application resource package; An update processing module is used to, when the update parameters for the virtual machine management component are obtained, first update the non-CR resources according to the update parameters based on the tracking of the deferred execution hook of the task execution resource object set in the update operation, and then send the update parameters to the configuration storage resource object to trigger the mounted task execution resource object of the update operation to update the CR resources.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.