Method and system for automatically upgrading container cloud cluster operators in batches
Through the version control platform and automated work order processing system, the operator version automatic upgrade of multi-resource pools and multi-container cloud clusters is achieved, solving the problems of low efficiency and error-prone traditional manual upgrades, and improving operation and maintenance efficiency and management cost control.
Patent Information
- Application Number
- CN202411940187.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-28
AI Technical Summary
In multi-resource pool and multi-container cloud cluster scenarios, the traditional operator version upgrade method relies on manual operations, resulting in low upgrade deployment efficiency, difficult operation and maintenance, and prone to errors, which may lead to production problems.
Through the version control platform, maintain cross-version upgrade relationships and operator version information of each resource pool container cloud, receive new versions of operators and generate upgrade tickets to be reviewed, and issue upgrade charts to automatically complete operator version upgrade after review.
The batch automation management of operator version upgrades in cross-resource pools and cross-container cloud clusters has been realized, reducing the cost of operator version management in multi-resource pools and container cloud clusters, and improving operation and maintenance efficiency.
Smart Images

Figure CN119718383A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automatic upgrade technology, and specifically to a method for batch automatic upgrade of container cloud cluster operators, a system for batch automatic upgrade of container cloud cluster operators, an electronic device and a corresponding storage medium. Background Art
[0002] In the application scenario of PaaS platform, PaaS component instances are generally deployed directly on physical machines or cloud hosts. With the rise and rapid development of Kubernetes (also known as k8s or kube), PaaS components have also begun to be deployed on Kubernetes containers. Kubernetes is an open source container orchestration platform that has been widely used in various application deployment and operation scenarios. As a controller for specific applications, k8soperator can extend the functions of Kubernetes API and is gradually used in the full life cycle management of PaaS component instance deployment, upgrade, operation and maintenance control.
[0003] By implementing containerization of PaaS components through the operator controller, you can achieve automated operation and maintenance management of PaaS components and improve the deployment and operation efficiency of components. However, the component operator version itself also needs to be managed and maintained. For operators deployed on a single resource pool container cloud cluster, if a new version needs to be upgraded and deployed, the traditional method requires first evaluating whether it can be directly upgraded to the latest operator version based on the actual version of the operator, and then the operation and maintenance personnel manually upload the image and push the chart to the container cluster to update the operator version for upgrading. If the upgrade fails, the old version of the operator needs to be manually rolled back. If you manage multiple resource pools and multiple container cloud clusters, each container cloud cluster of each resource needs to perform the above upgrade operation.
[0004] The existing technical solution for operator version upgrade mainly relies on manual operations of operation and maintenance personnel. The manual operations mainly include: evaluating whether the version upgrade is supported based on the current actual deployed operator version, manually uploading the management area image to the resource pool image repository, manually pushing the new version chart to upgrade the operator version, etc. The upgrade operation is cumbersome, and only the operator version on one resource pool cluster can be upgraded at a time. In large-scale resource pool and container cloud cluster scenarios, each resource pool and each container cluster needs to perform the upgrade operation. The upgrade deployment efficiency is low, the operation and maintenance are difficult to implement, and it is easy to make mistakes, which may cause production problems. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a method and system for batch automated upgrading of container cloud cluster operators. The cross-version upgrade relationship and operator version information of each resource pool container cloud are maintained through a version control platform, and new operator versions are uploaded. The upgrade work order needs to wait for the administrator to review and approve it before the operator upgrade chart is actually issued to complete the operator upgrade, so as to at least solve some of the problems in the background technology.
[0006] In order to achieve the above-mentioned purpose, a method for batch automatic upgrading of container cloud cluster operators is provided in the present application, the method comprising: receiving a new version of the operator and obtaining a version upgrade relationship between the configured existing version of the operator and the new version of the operator; judging whether the container cloud cluster of each resource pool has an operator service corresponding to the new version of the operator based on the version control information in the version control platform; generating an upgrade work order to be reviewed for each container cloud cluster that has the operator service and whose current version is lower than the new version of the operator based on the version upgrade relationship; in response to the approval of the upgrade work order to be reviewed, issuing an upgrade chart to the container cloud cluster in the approved upgrade work order; after monitoring that the new version of the operator in the container cloud cluster is pulled up and runs normally, determining that the container cloud cluster has been successfully upgraded.
[0007] Optionally, receiving the new version of the operator is performed by a medium upload module in the version control platform, and obtaining the version upgrade relationship between the configured existing version of the operator and the new version of the operator is performed by an upgrade relationship management module in the version control platform.
[0008] Optionally, an upgrade work order to be reviewed is generated based on the version upgrade relationship for each container cloud cluster that has the operator service and whose current version is lower than the new version of the operator, including: obtaining the current version of the container cloud cluster that has the operator service; if the current version of the container cloud cluster is lower than the new version of the operator, generating an upgrade path from the current version to the new version of the operator; if the upgrade path exists in the version upgrade relationship, generating an upgrade work order to be reviewed; if the upgrade path does not exist in the version upgrade relationship, generating a prompt suggestion including the upgrade path.
[0009] Optionally, generating a prompt suggestion including the upgrade path, including: generating a first prompt suggestion on whether to add the upgrade path to the version upgrade relationship; if the user chooses to ignore or reject the first prompt suggestion, obtaining the relationship between the lowest version of the upgrade path and the lowest version of the version upgrade relationship; if the lowest version of the upgrade path is higher than the lowest version of the version upgrade relationship, generating a second prompt suggestion to downgrade the current version to the lowest version of the version upgrade relationship before upgrading; if the lowest version of the upgrade path is lower than the lowest version of the version upgrade relationship, generating a third prompt suggestion to upgrade the current version to at least the lowest version of the version upgrade relationship.
[0010] Optionally, in response to the upgrade work order to be reviewed being approved, an upgrade chart is issued to the container cloud cluster in the approved upgrade work order, including: after receiving the approval instruction of the upgrade work order to be reviewed, deploying the chart template based on the new version of the operator; obtaining the configuration information of the container cloud cluster in the upgraded work order that has been approved and filling it into the chart template to construct a chart document; issuing the upgrade chart based on the chart document to the container cloud cluster in the upgraded work order, and the upgrade chart is used to automatically pull up the new version of the operator.
[0011] Optionally, the method further includes: after monitoring that the new version of the operator in the container cloud cluster has not been pulled up or the pulled up new version of the operator does not run normally, determining that the container cloud cluster upgrade has failed.
[0012] Optionally, the method further includes: after determining that the upgrade has failed, obtaining the current rollback mode, and when the current rollback mode is automatic rollback, sending a rollback chart to the container cloud cluster where the upgrade has failed, and when the current rollback mode is manual rollback, generating operation suggestions based on the cause of the upgrade failure and accepting user operations.
[0013] The present application also provides a system for batch automatic upgrading of container cloud cluster operators, which includes a version control platform and a work order scheduling subsystem; the version control platform includes: a media upload module for receiving a new version of the operator; an upgrade relationship management module for obtaining the version upgrade relationship between the existing version of the configured operator and the new version of the operator; the work order scheduling subsystem is used to determine whether the container cloud cluster of each resource pool has an operator service corresponding to the new version of the operator based on the version control information in the version control platform; generate an upgrade work order to be reviewed for each container cloud cluster that has the operator service and whose current version is lower than the new version of the operator based on the version upgrade relationship; the version control platform also includes: a chart sending module for sending an upgrade chart to the container cloud cluster in the upgrade work order that has passed the review in response to the upgrade work order to be reviewed being reviewed; and a result confirmation module for determining that the container cloud cluster has been successfully upgraded after monitoring that the new version of the operator in the container cloud cluster has been pulled up and is running normally.
[0014] The present application also provides an electronic device, comprising: at least one processor; a memory connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the aforementioned method of batch automatic upgrading of container cloud cluster operators by executing the instructions stored in the memory.
[0015] The present application also provides a machine-readable storage medium on which instructions are stored. When the instructions are executed by a processor, the processor is configured to execute the method for implementing the aforementioned batch automatic upgrade of the container cloud cluster operator.
[0016] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the aforementioned method for batch automatic upgrading of container cloud cluster operators.
[0017] The above technical solution has the following beneficial effects:
[0018] The implementation method of this application solves the problem of quickly, smoothly and stably performing batch automatic upgrades of operators in different resource pools and different container cloud clusters. It can realize batch automatic management of operator version upgrades across resource pools and across container cloud clusters, reduce the cost of operator version management in multiple resource pools and container cloud clusters, and improve operation and maintenance efficiency.
[0019] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0021] Figure 1 A schematic diagram of the steps of a method for batch automatic upgrading of a container cloud cluster operator according to an embodiment of the present application is schematically shown;
[0022] Figure 2 The schematic diagram schematically shows an operator management solution in the prior art;
[0023] Figure 3 A schematic diagram schematically shows a method for batch automatic upgrading of container cloud cluster operators according to an embodiment of the present application;
[0024] Figure 4 A schematic diagram of the structure of a system for batch automatic upgrading of container cloud cluster operators according to an embodiment of the present application is shown;
[0025] Figure 5 The internal structure of an electronic device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0026] The specific implementation of the embodiment of the present application is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present application, and is not used to limit the embodiment of the present application.
[0027] Figure 1 The following is a schematic diagram showing the steps of a method for batch automatic upgrading of container cloud cluster operators according to an embodiment of the present application. Figure 1 As shown, a method for batch automatic upgrading of container cloud cluster operators includes:
[0028] S01. Receive a new version of the operator and obtain a version upgrade relationship between the configured existing version of the operator and the new version of the operator;
[0029] S02. Based on the version control information in the version control platform, it is determined whether the container cloud cluster of each resource pool has an operator service corresponding to the new version of the operator;
[0030] S03. Generate an upgrade work order to be reviewed based on the version upgrade relationship for each container cloud cluster that has the operator service and whose current version is lower than the new version of the operator;
[0031] S04. In response to the approval of the pending upgrade work order, an upgrade chart is issued to the container cloud cluster in the approved upgrade work order; a chart is a collection of predefined application resources that are packaged together for deployment on a Kubemetes cluster. A chart contains one or more Kubernetes resource files, such as Deployment, Service, ConfgMap, etc. Applications can be easily created, shared, and deployed by using the Helm tool.
[0032] S05. After monitoring that the new version of the operator in the container cloud cluster is launched and runs normally, it is determined that the container cloud cluster has been successfully upgraded.
[0033] Through the above implementation methods, batch automatic management of operator version upgrades across resource pools and container cloud clusters can be achieved, reducing the operator version management cost in multiple resource pools and container cloud clusters and improving operation and maintenance efficiency.
[0034] Figure 2 The schematic diagram of the operator management solution in the prior art is shown schematically. As shown in the figure, it uses the container management service to directly manage the upgrade process, and the container management service sends the operator upgrade chart or the operator rollback chart, and its main operation is still based on the implementation of the system operator. Figure 3 The schematic diagram schematically shows a method for batch automatic upgrading of container cloud cluster operators according to an embodiment of the present application. Figure 3 As shown, the method in the present application is introduced between the container cloud cluster and the system operator. The system operator only needs to push the new version of the operator, configure the version upgrade relationship and review the upgrade work orders to be reviewed. A large number of operations are automatically performed by the system for batch automatic upgrade of the container cloud cluster operator in the public area, which significantly reduces management costs and improves management efficiency.
[0035] In some optional implementations of the present application, receiving the new version of the operator is performed by the media upload module in the version control platform, and obtaining the version upgrade relationship between the configured existing version of the operator and the new version of the operator is performed by the upgrade relationship management module in the version control platform. This implementation provides the deployment method in the aforementioned step S01, which is implemented through the version control platform. The version control platform in this implementation includes the following functions: controlling the operator version, which requires supporting the upload of the operator version media, controlling the cross-version upgrade relationship of the operator, and controlling the actual operator version information deployed in the resource pool container cluster managed by the current PaaS platform. The new version of the operator media uploaded by the version control platform will be stored in the management area media center, and a media synchronization resource pool work order will be generated to automatically synchronize the new version of the media to different resource pools; the version control platform also maintains the cross-version upgrade relationship of the operator, maintains the version information of each container cloud operator in each resource pool, and provides a basis for the upgrade management of the operator.
[0036] In some optional implementations of the present application, for each container cloud cluster that has the operator service and whose current version is lower than the new version of the operator, an upgrade work order to be reviewed is generated based on the version upgrade relationship, including: obtaining the current version of the container cloud cluster that has the operator service; if the current version of the container cloud cluster is lower than the new version of the operator, generating an upgrade path from the current version to the new version of the operator; if the upgrade path exists in the version upgrade relationship, generating an upgrade work order to be reviewed; if the upgrade path does not exist in the version upgrade relationship, generating a prompt suggestion including the upgrade path. The system operator pushes the new version of the operator on the version control platform. After the new version is successfully pushed, an operator version upgrade message will be triggered to the work order scheduling center. The work order scheduling center determines whether the container cloud cluster of each resource pool of the platform has the current operator service. If so, it determines whether the current cluster operator version is less than the latest version of the operator. If so, an operator upgrade work order is generated for the container cloud cluster of this resource pool. The work order needs to be reviewed and approved by the administrator before the operator upgrade is actually executed. In a multi-resource pool and multi-container cloud cluster, batch operator upgrade work orders will be generated. Now let's take the operatorCache version control of the cache component as an example. The current version control platform cache operatorCache has two versions, version 1 and version 2. Version 1 supports direct upgrade to version 2. The operatorCache version of resource pool 1 cluster A is version 1, and the operatorCache of resource pool 2 cluster B is version 2. Since the function iteration of the cache component involves operator function changes, version 3 needs to be pushed. The cache developer provides version 3 of operatorCache. Version 3 supports direct upgrade from version 1 or version 2 to version 3. The system operator uploads version 3 on the version control platform. Version 3 will be stored in the media center of the management area, and a work order for version 3 media synchronization to the resource pool media center will be generated to automatically complete the media synchronization. After uploading the media, the version upgrade relationship between version 1 and version 2 can be directly upgraded to version 3, and the cross-version upgrade relationship is maintained. Then the corresponding version is updated to the pushed successfully status.When the version is pushed successfully, a version 3 upgrade message of operatorCache will be triggered to the work order dispatch center. The work order dispatch center obtains from the version control platform that both resource pool 1 cluster A and resource pool 2 cluster B have operatorCache, and the version is lower than version 3. At the same time, according to the version upgrade relationship, it is determined that the operatorCache of resource pool 1 cluster A and resource pool 2 cluster B can be upgraded, so an upgrade work order of operatorCache version 3 is generated for each. The work order needs to be reviewed and approved by the administrator before the upgrade logic is actually carried out. According to actual production needs, the management personnel batch review and approve the work orders that need to be upgraded, and upgrade the operator in the resource pool container cloud cluster.
[0037] In some optional implementations of the present application, generating a prompt suggestion including the upgrade path includes: generating a first prompt suggestion of whether to add the upgrade path to the version upgrade relationship; if the user chooses to ignore or reject the first prompt suggestion, obtaining the relationship between the minimum version of the upgrade path and the minimum version of the version upgrade relationship; if the minimum version of the upgrade path is higher than the minimum version of the version upgrade relationship, generating a second prompt suggestion of downgrading the current version to the minimum version of the version upgrade relationship before upgrading; if the minimum version of the upgrade path is lower than the minimum version of the version upgrade relationship, generating a third prompt suggestion of upgrading the current version to at least the minimum version of the version upgrade relationship. This implementation provides a processing measure when the upgrade work order to be reviewed cannot be generated, so as to maximize the upgrade success rate of the entire system. When the upgrade path does not exist in the version upgrade relationship, it may be that the user missed configuration. At this time, the user can be reminded to add the content in the version upgrade relationship to meet the upgrade requirements of certain versions that are not in the original version upgrade relationship. When the user chooses to ignore or reject the first prompt suggestion, it means that the user does not miss configuration at this time, so it is not necessary to process the original version upgrade relationship. However, this embodiment still provides upgrade suggestions. For example, if the lowest version of the upgrade path is higher than the lowest version of the version upgrade relationship, the version upgrade is completed by downgrading the version and then upgrading. If the lowest version of the upgrade path is higher than the lowest version of the version upgrade relationship, the third prompt suggestion reminds the user that the current version should at least be upgraded to the lowest version of the version upgrade relationship in order to achieve the version upgrade, which is conducive to the user's targeted processing of lower versions.
[0038] In some optional implementations of the present application, in response to the approval of the upgrade work order to be reviewed, an upgrade chart is issued to the container cloud cluster in the approved upgrade work order, including: after receiving the approval instruction of the upgrade work order to be reviewed, deploying the chart template based on the new version of the operator; obtaining the configuration information of the container cloud cluster in the approved upgrade work order and filling it into the chart template to construct a chart document; issuing the upgrade chart based on the chart document to the container cloud cluster in the upgrade work order, and the upgrade chart is used to automatically pull up the new version of the operator. Similarly, taking the operatorCache version control of the aforementioned cache component as an example, when the upgrade work order of resource pool 1 cluster A is approved, the operatorCache version3 work order upgrade logic will be officially executed. The upgrade work order first obtains the operatorCache version of resource pool 1 cluster A as version1, and according to the version upgrade constraint defined by the version control platform that supports the upgrade of version1 to version3, it is judged that the work order can be executed, and the work order begins to be executed. The work order first deploys the chart template based on version 3 of operatorCache, constructs a specific chart document based on the relevant information of resource pool 1 cluster A, and after the construction is completed, sends the upgrade chart to cluster A through the interface of resource pool 1 cluster A to automatically pull up version 3 of operatorCache. This implementation method provides a chart-based upgrade deployment method.
[0039] In some optional implementations of the present application, the method further includes: after monitoring that the new version of the operator in the container cloud cluster has not been pulled up or the new version of the operator after being pulled up does not run normally, determining that the upgrade of the container cloud cluster has failed. After the upgrade chart is successfully issued, the upgrade work order will continuously and cyclically call the interface of cluster A at a certain interval to query whether operatorCache version3 is running normally. If the operator is already running normally, the work order updates the platform version control platform resource pool 1 cluster A operatorCache version 3, and the upgrade work order is executed successfully. If the operator has not run normally after a fixed timeout period, it is determined that the operatorCache upgrade version 3 has failed, and the result is notified to the system operator, who will troubleshoot the problem and handle it, and finally complete the upgrade.
[0040] In some optional implementations of the present application, the method further includes: after determining that the upgrade has failed, obtaining the current rollback mode, and when the current rollback mode is automatic rollback, sending a rollback chart to the container cloud cluster where the upgrade has failed, and when the current rollback mode is manual rollback, generating operation suggestions based on the reasons for the upgrade failure and accepting user operations. This implementation provides a processing mechanism after an upgrade failure. The work order scheduling subsystem can set whether an upgrade work order needs to be automatically rolled back after an upgrade fails. If automatic rollback is set, when the work order determines that the operatorCache upgrade version 3 has failed, the work order scheduling center will send an operatorCache version 1 rollback chart to roll back the operatorCache version to the version before the upgrade. If automatic rollback is not set, the operation and maintenance personnel can manually fix the upgrade failure problem and retry the upgrade work order to complete the operatorCache version 3 upgrade, or manually roll back the work order after finding that it cannot be repaired, and roll back to the old version.
[0041] Through the above implementation methods, batch automatic management of operator version upgrades across resource pools and container cloud clusters can be achieved, reducing the operator version management cost in multiple resource pools and container cloud clusters and improving operation and maintenance efficiency.
[0042] Based on the same inventive concept, the present application also provides a system for batch automatic upgrading of container cloud cluster operators. Figure 4 The schematic diagram shows the structure of the system for batch automatic upgrading of container cloud cluster operators according to the implementation mode of the present application. Figure 4 As shown, the system includes a version control platform and a work order scheduling subsystem; the version control platform includes: a media upload module for receiving a new version of the operator; an upgrade relationship management module for obtaining the version upgrade relationship between the existing version of the configured operator and the new version of the operator; the work order scheduling subsystem is used to determine whether the container cloud cluster of each resource pool has an operator service corresponding to the new version of the operator based on the version control information in the version control platform; for each container cloud cluster that has the operator service and the current version is lower than the new version of the operator, based on the version upgrade relationship, generate an upgrade work order to be reviewed; the version control platform also includes: a chart sending module for sending an upgrade chart to the container cloud cluster in the upgrade work order that has passed the review in response to the upgrade work order to be reviewed being reviewed and approved; and a result confirmation module for determining that the container cloud cluster has been successfully upgraded after monitoring that the new version of the operator in the container cloud cluster has been pulled up and is running normally.
[0043] In some optional implementations of the present application, receiving the new version of the operator is executed by a media upload module in the version control platform, and obtaining the version upgrade relationship between the configured existing version of the operator and the new version of the operator is executed by an upgrade relationship management module in the version control platform.
[0044] In some optional implementations of the present application, an upgrade work order to be reviewed is generated based on the version upgrade relationship for each container cloud cluster that has the operator service and whose current version is lower than the new version of the operator, including: obtaining the current version of the container cloud cluster that has the operator service; if the current version of the container cloud cluster is lower than the new version of the operator, generating an upgrade path from the current version to the new version of the operator; if the upgrade path exists in the version upgrade relationship, generating an upgrade work order to be reviewed; if the upgrade path does not exist in the version upgrade relationship, generating a prompt suggestion including the upgrade path.
[0045] In some optional embodiments of the present application, a prompt suggestion including the upgrade path is generated, including: generating a first prompt suggestion on whether to add the upgrade path to the version upgrade relationship; if the user chooses to ignore or reject the first prompt suggestion, obtaining the relationship between the lowest version of the upgrade path and the lowest version of the version upgrade relationship; if the lowest version of the upgrade path is higher than the lowest version of the version upgrade relationship, generating a second prompt suggestion to downgrade the current version to the lowest version of the version upgrade relationship before upgrading; if the lowest version of the upgrade path is lower than the lowest version of the version upgrade relationship, generating a third prompt suggestion to upgrade the current version to at least the lowest version of the version upgrade relationship.
[0046] In some optional implementations of the present application, in response to the upgrade work order to be reviewed being reviewed and approved, an upgrade chart is issued to the container cloud cluster in the reviewed and approved upgrade work order, including: after receiving the review and approval instruction of the upgrade work order to be reviewed, deploying the chart template based on the new version of the operator; obtaining the configuration information of the container cloud cluster in the reviewed and approved upgrade work order and filling it into the chart template to construct a chart document; issuing the upgrade chart based on the chart document to the container cloud cluster in the upgrade work order, and the upgrade chart is used to automatically pull up the new version of the operator.
[0047] In some optional implementations of the present application, the result confirmation module is also used to: determine that the container cloud cluster upgrade has failed after monitoring that the new version of the operator in the container cloud cluster has not been pulled up or the pulled up new version of the operator does not run normally.
[0048] In some optional embodiments of the present application, the system also includes a rollback processing module, which is used to: after determining that the upgrade has failed, obtain the current rollback mode, and when the current rollback mode is automatic rollback, send a rollback chart to the container cloud cluster where the upgrade failed; when the current rollback mode is manual rollback, generate operation suggestions based on the cause of the upgrade failure and accept user operations.
[0049] The specific definition of each functional module in the system for batch automatic upgrade of container cloud cluster operator can be found in the definition of the method for batch automatic upgrade of container cloud cluster operator above, which will not be repeated here. Each module in the above system can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the electronic device in hardware form, or stored in the memory of the electronic device in software form, so that the processor can call and execute the operations corresponding to the above modules. It also achieves the advantages of reducing version management costs and improving operation and maintenance efficiency.
[0050] In some embodiments of the present application, an electronic device is also provided, comprising: at least one processor; a memory connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the aforementioned method for batch automatic upgrading of container cloud cluster operators. Its internal structure diagram can be as follows Figure 5 shown. Figure 5 The internal structure diagram of an electronic device according to an embodiment of the present application is schematically shown. The electronic device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected via a system bus. Among them, the processor A01 of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The network interface A02 of the electronic device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a method for batch automatic upgrading of a container cloud cluster operator is implemented.
[0051] Those skilled in the art will understand that Figure 5The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0052] In one embodiment provided in the present application, a machine-readable storage medium is provided, on which instructions are stored. When the instructions are executed by a processor, the processor is configured to execute the aforementioned method for batch automatic upgrading of container cloud cluster operators.
[0053] In one embodiment provided in the present application, a computer program product is provided, including a computer program, which, when executed by a processor, implements the aforementioned method for batch automatic upgrading of container cloud cluster operators.
[0054] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0055] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0056] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0057] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0058] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0059] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0060] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0061] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0062] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for batch automatic upgrading of container cloud cluster operators, characterized in that: The method includes: Receive a new version of the operator and obtain the version upgrade relationship between the existing version of the configured operator and the new version of the operator; Based on the version control information in the version control platform, determine whether the container cloud cluster of each resource pool has an operator service corresponding to the new version of the operator; Generate an upgrade work order to be reviewed based on the version upgrade relationship for each container cloud cluster that has the operator service and whose current version is lower than the new version of the operator; In response to the upgrade work order to be reviewed being reviewed and approved, issuing an upgrade chart to the container cloud cluster in the upgrade work order that has passed the review; After monitoring that the new version of the operator in the container cloud cluster is pulled up and runs normally, it is determined that the container cloud cluster is upgraded successfully.
2. The method according to claim 1, characterized in that The receiving of the new version of the operator is performed by the medium uploading module in the version control platform, and the obtaining of the version upgrade relationship between the configured existing version of the operator and the new version of the operator is performed by the upgrade relationship management module in the version control platform.
3. The method according to claim 1, characterized in that Generate an upgrade work order to be reviewed for each container cloud cluster that has the operator service and whose current version is lower than the new version of the operator based on the version upgrade relationship, including: Get the current version of the container cloud cluster where the operator service exists; If the current version of the container cloud cluster is lower than the new version of the operator, generate an upgrade path from the current version to the new version of the operator; If the upgrade path exists in the version upgrade relationship, generate an upgrade work order to be reviewed; If the upgrade path does not exist in the version upgrade relationship, a prompt suggestion including the upgrade path is generated.
4. The method according to claim 3, characterized in that Generate a prompt suggestion including the upgrade path, including: generating a first prompt suggestion on whether to add the upgrade path to the version upgrade relationship; If the user chooses to ignore or reject the first prompt suggestion, obtaining the relationship between the minimum version of the upgrade path and the minimum version of the version upgrade relationship; If the lowest version of the upgrade path is higher than the lowest version of the version upgrade relationship, generate a second prompt suggestion to downgrade the current version to the lowest version of the version upgrade relationship before upgrading; If the lowest version of the upgrade path is lower than the lowest version of the version upgrade relationship, a third prompt suggestion is generated to upgrade the current version to at least the lowest version of the version upgrade relationship.
5. The method according to claim 1, characterized in that: In response to the upgrade work order to be reviewed being reviewed and approved, an upgrade chart is issued to the container cloud cluster in the upgrade work order that has passed the review, including: After receiving the approval instruction of the upgrade work order to be reviewed, the chart template is deployed based on the new version of the operator; Obtain the configuration information of the container cloud cluster in the approved upgrade work order and fill it into the chart template to construct a chart document; An upgrade chart based on the chart document is sent to the container cloud cluster in the upgrade work order, and the upgrade chart is used to automatically pull up a new version of the operator.
6. The method according to claim 1, characterized in that The method further includes: after monitoring that the new version of the operator in the container cloud cluster has not been pulled up or the pulled up new version of the operator does not run normally, determining that the container cloud cluster upgrade has failed.
7. The method according to claim 6, characterized in that The method further includes: after determining that the upgrade has failed, obtaining the current rollback mode, and when the current rollback mode is automatic rollback, sending a rollback chart to the container cloud cluster where the upgrade has failed, and when the current rollback mode is manual rollback, generating operation suggestions based on the cause of the upgrade failure and accepting user operations.
8. A system for batch automatic upgrading of container cloud cluster operators, characterized in that: The system includes a version control platform and a work order scheduling subsystem; The version control platform includes: a medium upload module for receiving a new version of the operator; an upgrade relationship management module for obtaining a version upgrade relationship between the configured existing version of the operator and the new version of the operator; The work order scheduling subsystem is used to determine whether the container cloud cluster of each resource pool has an operator service corresponding to the new version of the operator based on the version control information in the version control platform; generate an upgrade work order to be reviewed based on the version upgrade relationship for each container cloud cluster that has the operator service and the current version is lower than the new version of the operator; The version control platform also includes: a chart issuing module, which is used to issue an upgrade chart to the container cloud cluster in the approved upgrade work order in response to the approval of the upgrade work order to be reviewed; and a result confirmation module, which is used to determine that the container cloud cluster has been successfully upgraded after monitoring that the new version of the operator in the container cloud cluster is pulled up and runs normally.
9. An electronic device, characterized in that: include: at least one processor; a memory connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the steps of the method for batch automatic upgrading of container cloud cluster operators as described in any one of claims 1 to 7 by executing the instructions stored in the memory.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method for batch automatic upgrading of container cloud cluster operators described in any one of claims 1 to 7 are implemented.