Provided are techniques for a lightweight rolling update technique for applications. It is determined that a monitored item of a pod has been updated based on monitoring a pod object associated with the pod, where the pod includes a container, and where the container includes an application. A policy is retrieved for the pod, where the policy identifies the container and specifies one or more actions to be performed on the container. The one or more actions are performed on the container. Annotations to the pod object are updated to indicate that the one or more actions have been completed.
Legal claims defining the scope of protection, as filed with the USPTO.
determining that a monitored item of a pod has been updated based on monitoring a pod object associated with the pod, wherein the pod includes a container, and wherein the container includes an application; retrieving a policy for the pod, wherein the policy identifies the container and specifies one or more actions to be performed on the container; performing the one or more actions on the container; and updating annotations to the pod object to indicate that the one or more actions have been completed. . A computer-implemented method, comprising operations for:
claim 1 . The computer-implemented method of, wherein the monitored item is an item selected from a group consisting of a secret and a configmap.
claim 1 . The computer-implemented method of, wherein the one or more actions are selected from a group consisting of creating a new container, deleting an existing container, executing the existing container with a preStop property, and executing the existing container with a postStart property.
claim 1 adding the annotations to the pod object, wherein the annotations comprise an identifier of the container, the one or more actions, and a status of each of the one or more actions. . The computer-implemented method of, wherein the operations further comprise:
claim 1 for another pod, determining that a policy has not been created; and creating a default policy with actions for a container in that pod. . The computer-implemented method of, wherein the operations further comprise:
claim 1 . The computer-implemented method of, wherein the one or more actions are performed for the container without recreating the pod object.
claim 1 . The computer-implemented method of, wherein the policy comprises the monitored item, related subjects, and the one or more actions.
one or more computer-readable storage media; and program instructions stored on the one or more storage media to perform operations comprising: determining that a monitored item of a pod has been updated based on monitoring a pod object associated with the pod, wherein the pod includes a container, and wherein the container includes an application; retrieving a policy for the pod, wherein the policy identifies the container and specifies one or more actions to be performed on the container; performing the one or more actions on the container; and updating annotations to the pod object to indicate that the one or more actions have been completed. . A computer program product comprising:
claim 8 . The computer program product of, wherein the monitored item is an item selected from a group consisting of a secret and a configmap.
claim 8 . The computer program product of, wherein the one or more actions are selected from a group consisting of creating a new container, deleting an existing container, executing the existing container with a preStop property, and executing the existing container with a postStart property.
claim 8 adding the annotations to the pod object, wherein the annotations comprise an identifier of the container, the one or more actions, and a status of each of the one or more actions. . The computer program product of, wherein the operations further comprise:
claim 8 for another pod, determining that a policy has not been created; and creating a default policy with actions for a container in that pod. . The computer program product of, wherein the operations further comprise:
claim 8 . The computer program product of, wherein the one or more actions are performed for the container without recreating the pod object.
claim 8 . The computer program product of, wherein the policy comprises the monitored item, related subjects, and the one or more actions.
a processor set; one or more computer-readable storage media; and program instructions stored on the one or more storage media to cause the processor set to perform operations comprising: determining that a monitored item of a pod has been updated based on monitoring a pod object associated with the pod, wherein the pod includes a container, and wherein the container includes an application; retrieving a policy for the pod, wherein the policy identifies the container and specifies one or more actions to be performed on the container; performing the one or more actions on the container; and updating annotations to the pod object to indicate that the one or more actions have been completed. . A computer system comprising:
claim 15 . The computer system of, wherein the monitored item is an item selected from a group consisting of a secret and a configmap.
claim 15 . The computer system of, wherein the one or more actions are selected from a group consisting of creating a new container, deleting an existing container, executing the existing container with a preStop property, and executing the existing container with a postStart property.
claim 15 adding the annotations to the pod object, wherein the annotations comprise an identifier of the container, the one or more actions, and a status of each of the one or more actions. . The computer system of, wherein the operations further comprise:
claim 15 for another pod, determining that a policy has not been created; and creating a default policy with actions for a container in that pod. . The computer system of, wherein the operations further comprise:
claim 15 . The computer system of, wherein the one or more actions are performed for the container without recreating the pod object.
Complete technical specification and implementation details from the patent document.
Embodiments of the invention relate to a lightweight rolling update technique for applications. For example, the applications may be cloud native applications.
For both public cloud and hybrid cloud, cloud native applications may be updated via a rolling update to avoid disruption. The cloud native applications may be stored in containers, which are stored in pods. The rolling update deletes some pods and recreates those pods, while keeping some other pods still running. It may take several hours to recreate all of the pods when rolling out new versions of the cloud native applications in production. Recreating the pods includes initializing Virtual Machines (VMs) and pulling images of the cloud native applications.
In addition, recreating pods consumes a lot of time because: a) pods usually are running in separate VM boundaries and initializing the VM takes a lot of time; and b) some computing requires pulling an image, and recreating the pods means images are pulled again. In a cloud environment, the image pull occurs on a node (i.e., a compute node) one time to create multiple pods. However, on a VM based pod, the image pull occurs for each of the multiple pods.
In accordance with certain embodiments, a computer-implemented method comprising operations is provided for a lightweight rolling update technique for applications. In such embodiments, It is determined that a monitored item of a pod has been updated based on monitoring a pod object associated with the pod, where the pod includes a container, and where the container includes an application. A policy is retrieved for the pod, where the policy identifies the container and specifies one or more actions to be performed on the container. The one or more actions are performed on the container. Annotations to the pod object are updated to indicate that the one or more actions have been completed.
In accordance with other embodiments, a computer program product comprising a computer readable storage medium having program code embodied therewith is provided, where the program code is executable by at least one computer processor to perform operations for a lightweight rolling update technique for applications. In such embodiments, It is determined that a monitored item of a pod has been updated based on monitoring a pod object associated with the pod, where the pod includes a container, and where the container includes an application. A policy is retrieved for the pod, where the policy identifies the container and specifies one or more actions to be performed on the container. The one or more actions are performed on the container. Annotations to the pod object are updated to indicate that the one or more actions have been completed.
In accordance with yet other embodiments, a computer system comprises one or more computer processors, one or more computer-readable memories and one or more computer-readable, tangible storage devices; and program instructions, stored on at least one of the one or more computer-readable, tangible storage devices for execution by at least one of the one or more computer processors via at least one of the one or more memories, to perform operations for a lightweight rolling update technique for applications. In such embodiments, It is determined that a monitored item of a pod has been updated based on monitoring a pod object associated with the pod, where the pod includes a container, and where the container includes an application. A policy is retrieved for the pod, where the policy identifies the container and specifies one or more actions to be performed on the container. The one or more actions are performed on the container. Annotations to the pod object are updated to indicate that the one or more actions have been completed.
Various aspects of the present disclosure are described by narrative text, flowcharts, block diagrams of computer systems and/or block diagrams of the machine logic included in computer program product (CPP) embodiments. With respect to any flowcharts, depending upon the technology involved, the operations can be performed in a different order than what is shown in a given flowchart. For example, again depending upon the technology involved, two operations shown in successive flowchart blocks may be performed in reverse order, as a single integrated step, concurrently, or in a manner at least partially overlapping in time.
A computer program product embodiment (“CPP embodiment” or “CPP”) is a term used in the present disclosure to describe any set of one, or more, storage media (also called “mediums”) collectively included in a set of one, or more, storage devices that collectively include machine readable code corresponding to instructions and/or data for performing computer operations specified in a given CPP claim. A “storage device” is any tangible device that can retain and store instructions for use by a computer processor. Without limitation, the computer-readable storage medium may be an electronic storage medium, a magnetic storage medium, an optical storage medium, an electromagnetic storage medium, a semiconductor storage medium, a mechanical storage medium, or any suitable combination of the foregoing. Some known types of storage devices that include these mediums include: diskette, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), static random access memory (SRAM), compact disc read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanically encoded device (such as punch cards or pits / lands formed in a major surface of a disc) or any suitable combination of the foregoing. A computer-readable storage medium, as that term is used in the present disclosure, is not to be construed as storage in the form of transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide, light pulses passing through a fiber optic cable, electrical signals communicated through a wire, and/or other transmission media. As will be understood by those of skill in the art, data is typically moved at some occasional points in time during normal operations of a storage device, such as during access, de-fragmentation or garbage collection, but this does not render the storage device as transitory because the data is not transitory while it is stored.
100 220 230 200 200 100 101 102 103 104 105 106 101 110 120 121 111 112 113 122 200 114 123 124 125 115 104 130 105 140 141 142 143 144 1 FIG.A Computing environmentofcontains an example of an environment for the execution of at least some of the computer code involved in performing the inventive methods, such as a pod rolling updaterand an extension deployment controllerof block. In addition to block, computing environmentincludes, for example, computer, wide area network (WAN), end user device (EUD), remote server, public cloud, and private cloud. In this embodiment, computerincludes processor set(including processing circuitryand cache), communication fabric, volatile memory, persistent storage(including operating systemand block, as identified above), peripheral device set(including user interface (UI) device set, storage, and Internet of Things (IoT) sensor set), and network module. Remote serverincludes remote database. Public cloudincludes gateway, cloud orchestration module, host physical machine set, virtual machine set, and container set.
101 130 100 101 101 101 1 FIG. COMPUTERmay take the form of a desktop computer, laptop computer, tablet computer, smart phone, smart watch or other wearable computer, mainframe computer, quantum computer or any other form of computer or mobile device now known or to be developed in the future that is capable of running a program, accessing a network or querying a database, such as remote database. As is well understood in the art of computer technology, and depending upon the technology, performance of a computer-implemented method may be distributed among multiple computers and/or between multiple locations. On the other hand, in this presentation of computing environment, detailed discussion is focused on a single computer, specifically computer, to keep the presentation as simple as possible. Computermay be located in a cloud, even though it is not shown in a cloud in. On the other hand, computeris not required to be in a cloud except to any extent as may be affirmatively indicated.
110 120 120 121 110 110 110 PROCESSOR SETincludes one, or more, computer processors of any type now known or to be developed in the future. Processing circuitrymay be distributed over multiple packages, for example, multiple, coordinated integrated circuit chips. Processing circuitrymay implement multiple processor threads and/or multiple processor cores. Cacheis memory that is located in the processor chip package(s) and is typically used for data or code that should be available for rapid access by the threads or cores running on processor set. Cache memories are typically organized into multiple levels depending upon relative proximity to the processing circuitry. Alternatively, some, or all, of the cache for the processor setmay be located “off chip.” In some computing environments, processor setmay be designed for working with qubits and performing quantum computing.
101 110 101 121 110 100 200 113 Computer-readable program instructions are typically loaded onto computerto cause a series of operational steps to be performed by processor setof computerand thereby effect a computer-implemented method, such that the instructions thus executed will instantiate the methods specified in flowcharts and/or narrative descriptions of computer-implemented methods included in this document (collectively referred to as “the inventive methods”). These computer-readable program instructions are stored in various types of computer-readable storage media, such as cacheand the other storage media discussed below. The program instructions, and associated data, are accessed by processor setto control and direct performance of the inventive methods. In computing environment, at least some of the instructions for performing the inventive methods may be stored in blockin persistent storage.
111 101 COMMUNICATION FABRICis the signal conduction path that allows the various components of computerto communicate with each other. Typically, this fabric is made of switches and electrically conductive paths, such as the switches and electrically conductive paths that make up buses, bridges, physical input/output ports and the like. Other types of signal communication paths may be used, such as fiber optic communication paths and/or wireless communication paths.
112 112 101 112 101 101 VOLATILE MEMORYis any type of volatile memory now known or to be developed in the future. Examples include dynamic type random access memory (RAM) or static type RAM. Typically, volatile memoryis characterized by random access, but this is not required unless affirmatively indicated. In computer, the volatile memoryis located in a single package and is internal to computer, but, alternatively or additionally, the volatile memory may be distributed over multiple packages and/or located externally with respect to computer.
113 101 113 113 122 200 PERSISTENT STORAGEis any form of non-volatile storage for computers that is now known or to be developed in the future. The non-volatility of this storage means that the stored data is maintained regardless of whether power is being supplied to computerand/or directly to persistent storage. Persistent storagemay be a read only memory (ROM), but typically at least a portion of the persistent storage allows writing of data, deletion of data and re-writing of data. Some familiar forms of persistent storage include magnetic disks and solid state storage devices. Operating systemmay take several forms, such as various known proprietary operating systems or open source Portable Operating System Interface-type operating systems that employ a kernel. The code included in blocktypically includes at least some of the computer code involved in performing the inventive methods.
114 101 101 123 124 124 124 101 101 125 PERIPHERAL DEVICE SETincludes the set of peripheral devices of computer. Data communication connections between the peripheral devices and the other components of computermay be implemented in various ways, such as Bluetooth connections, Near-Field Communication (NFC) connections, connections made by cables (such as universal serial bus (USB) type cables), insertion-type connections (for example, secure digital (SD) card), connections made through local area communication networks and even connections made through wide area networks such as the internet. In various embodiments, UI device setmay include components such as a display screen, speaker, microphone, wearable devices (such as goggles and smart watches), keyboard, mouse, printer, touchpad, game controllers, and haptic devices. Storageis external storage, such as an external hard drive, or insertable storage, such as an SD card. Storagemay be persistent and/or volatile. In some embodiments, storagemay take the form of a quantum computing storage device for storing data in the form of qubits. In embodiments where computeris required to have a large amount of storage (for example, where computerlocally stores and manages a large database) then this storage may be provided by peripheral storage devices designed for storing very large amounts of data, such as a storage area network (SAN) that is shared by multiple, geographically distributed computers. IoT sensor setis made up of sensors that can be used in Internet of Things applications. For example, one sensor may be a thermometer and another sensor may be a motion detector.
115 101 102 115 115 115 101 115 NETWORK MODULEis the collection of computer software, hardware, and firmware that allows computerto communicate with other computers through WAN. Network modulemay include hardware, such as modems or Wi-Fi signal transceivers, software for packetizing and/or de-packetizing data for communication network transmission, and/or web browser software for communicating data over the internet. In some embodiments, network control functions and network forwarding functions of network moduleare performed on the same physical hardware device. In other embodiments (for example, embodiments that utilize software-defined networking (SDN)), the control functions and the forwarding functions of network moduleare performed on physically separate devices, such that the control functions manage several different network hardware devices. Computer-readable program instructions for performing the inventive methods can typically be downloaded to computerfrom an external computer or external storage device through a network adapter card or network interface included in network module.
102 102 WANis any wide area network (for example, the internet) capable of communicating computer data over non-local distances by any technology for communicating computer data, now known or to be developed in the future. In some embodiments, the WANmay be replaced and/or supplemented by local area networks (LANs) designed to communicate data between devices located in a local area, such as a Wi-Fi network. The WAN and/or LANs typically include computer hardware such as copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and edge servers.
103 101 101 103 101 101 115 101 102 103 103 103 END USER DEVICE (EUD)is any computer system that is used and controlled by an end user (for example, a customer of an enterprise that operates computer), and may take any of the forms discussed above in connection with computer. EUDtypically receives helpful and useful data from the operations of computer. For example, in a hypothetical case where computeris designed to provide a recommendation to an end user, this recommendation would typically be communicated from network moduleof computerthrough WANto EUD. In this way, EUDcan display, or otherwise present, the recommendation to an end user. In some embodiments, EUDmay be a client device, such as thin client, heavy client, mainframe computer, desktop computer and so on.
104 101 104 101 104 101 101 101 130 104 REMOTE SERVERis any computer system that serves at least some data and/or functionality to computer. Remote servermay be controlled and used by the same entity that operates computer. Remote serverrepresents the machine(s) that collect and store helpful and useful data for use by other computers, such as computer. For example, in a hypothetical case where computeris designed and programmed to provide a recommendation based on historical data, then this historical data may be provided to computerfrom remote databaseof remote server.
105 105 141 105 142 105 143 144 141 140 105 102 PUBLIC CLOUDis any computer system available for use by multiple entities that provides on-demand availability of computer system resources and/or other computer capabilities, especially data storage (cloud storage) and computing power, without direct active management by the user. Cloud computing typically leverages sharing of resources to achieve coherence and economies of scale. The direct and active management of the computing resources of public cloudis performed by the computer hardware and/or software of cloud orchestration module. The computing resources provided by public cloudare typically implemented by virtual computing environments that run on various computers making up the computers of host physical machine set, which is the universe of physical computers in and/or available to public cloud. The virtual computing environments (VCEs) typically take the form of virtual machines from virtual machine setand/or containers from container set. It is understood that these VCEs may be stored as images and may be transferred among and between the various physical machine hosts, either as images or after instantiation of the VCE. Cloud orchestration modulemanages the transfer and storage of images, deploys new instantiations of VCEs and manages active instantiations of VCE deployments. Gatewayis the collection of computer software, hardware, and firmware that allows public cloudto communicate through WAN.
Some further explanation of virtualized computing environments (VCEs) will now be provided. VCEs can be stored as “images.” A new active instance of the VCE can be instantiated from the image. Two familiar types of VCEs are virtual machines and containers. A container is a VCE that uses operating-system-level virtualization. This refers to an operating system feature in which the kernel allows the existence of multiple isolated user-space instances, called containers. These isolated user-space instances typically behave as real computers from the point of view of programs running in them. A computer program running on an ordinary operating system can utilize all resources of that computer, such as connected devices, files and folders, network shares, CPU power, and quantifiable hardware capabilities. However, programs running inside a container can only use the contents of the container and devices assigned to the container, a feature which is known as containerization.
106 105 106 102 105 106 PRIVATE CLOUDis similar to public cloud, except that the computing resources are only available for use by a single enterprise. While private cloudis depicted as being in communication with WAN, in other embodiments a private cloud may be disconnected from the internet entirely and only accessible through a local/private network. A hybrid cloud is a composition of multiple clouds of different types (for example, private, community or public cloud types), often respectively implemented by different vendors. Each of the multiple clouds remains a separate and discrete entity, but the larger hybrid cloud architecture is bound together by standardized or proprietary technology that enables orchestration, management, and/or data/application portability between the multiple constituent clouds. In this embodiment, public cloudand private cloudare both part of a larger hybrid cloud.
1 FIG. 106 CLOUD COMPUTING SERVICES AND/OR MICROSERVICES (not separately shown in): private and public cloudsare programmed and configured to deliver cloud computing services and/or microservices (unless otherwise indicated, the word “microservices” shall be interpreted as inclusive of larger “services” regardless of size). Cloud services are infrastructure, platforms, or software that are typically hosted by third-party providers and made available to users through the internet. Cloud services facilitate the flow of user data from front-end clients (for example, user-side servers, tablets, desktops, laptops), through the internet, to the provider's systems, and back. In some embodiments, cloud services may be configured and orchestrated according to as “as a service” technology paradigm where something is being presented to an internal or external customer in the form of a cloud computing service. As-a-Service offerings typically provide endpoints with which various customers interface. These endpoints are typically based on a set of APIs. One category of as-a-service offering is Platform as a Service (PaaS), where a service provider provisions, instantiates, runs, and manages a modular bundle of code that customers can use to instantiate a computing platform and one or more applications, without the complexity of building and maintaining the infrastructure typically associated with these things. Another category is Software as a Service (SaaS) where software is centrally hosted and allocated on a subscription basis. SaaS is also known as on-demand software, web-based software, or web-hosted software. Four technological sub-fields involved in cloud services are: deployment, integration, on demand, and virtual private networks.
1 FIG.B 1 FIG.A 1 100 200 b is similar to, but in FIB., the computing environmentof contains an example of an environment for the execution of at least some of the computer code involved in performing the inventive methods, such as a rolling update plugin of block.
Embodiments provide lightweight rolling updates for applications, such as cloud native applications, without recreating pods. A rolling update may be described as an incremental update in which update actions are taken on the pods one by one.
Embodiments of the invention update containers in pods, where the containers include the applications. Updating the containers also updates the applications.
Embodiments avoid recreating VMs and pulling images, and so embodiments improve the performance for rolling updates of the applications. The lightweight rolling update technique is a low overhead technique.
The following list of terms and their definitions are provided to enhance understanding of embodiments:
A container may be described as a namespace isolated and container group (cgroup) restricted application. A namespace enables organizing clusters into virtual sub-clusters. A cgroup enables efficient resource management, isolation, and monitoring. The container includes an application, such as a cloud native application.
An image may be described as ready-to-run software package of an application and its dependencies that contain everything used to run the application.
Pods may be described as collections of related containers. That is, a pod may include one or more containers. A pod shares network/storage among containers in the pod.
Initialization (init) containers may be described as ones that are run before the application containers are started in a pod. The init containers may include utilities or setup scripts that are not available in the application containers. Each application container includes an application.
A secret may be described as an object that contains a small amount of sensitive data and is associated with a pod.
A configmap may be described as an API object used to store non-confidential data in key-value pairs and is associated with a pod.
A deployment describes a desired state, and a deployment controller changes the actual state to the desired state at a controlled rate. The desired state may be described as a configuration of a pod and indicates the state of the pod (e.g., running, pending, complete, etc.).
A lightweight rolling update allows a deployment update to take place with no downtime to incrementally update pods (i.e., pod instances) by updating containers within the pods. The newly updated pods may be scheduled on nodes with available resources.
A secret container may be described as a secure container runtime with lightweight virtual machines that feel and perform like containers, but provide stronger workload isolation using hardware virtualization technology.
A confidential container may be described as enabling confidential computing (e.g., cloud native confidential computing) by leveraging Trusted Execution Environments (TEEs) to protect containers and data. In certain embodiments, use of “container”herein refers to a “confidential container”.
2 FIG. 2 FIG. 280 205 245 245 280 282 284 284 284 a m illustrates a computing environment for lightweight rolling updates for applications in accordance with certain embodiments. In, an API serveris connected to a control planeand to one or more nodes. . .. The API serverstores pod objectsand receives inputs for a pod of a policy and a deployment (i.e., a desired state). The policy identifies a secret and/or a configmap(i.e., a monitored item) to be monitored for an update and actions to be taken on containers when the monitored item is updated. Thus, the secret or the configmap may be described as a monitored item. In certain embodiments, a user (e.g., a system administrator) provides the inputs. In certain embodiments, a pod object may be described as a pod instance or as the descriptor or definition of the pod, and the pod object may be modified (e.g., by taking actions on the pod object). The policy and deployment may be provided in a data serialization language for different programming languages.
205 101 205 101 205 220 230 220 222 224 230 1 FIG.A 1 FIG.A The control planemay be implemented using the computerof. In certain embodiments, the control planeis a virtual machine on the computerof. The control planeincludes a pod rolling updaterand an extension deployment controller. The pod rolling updaterincludes a policywith actions. The extension deployment controllermay be described as an extension to the deployment controller.
245 245 101 245 245 101 245 245 245 245 250 260 270 270 270 272 272 270 272 272 a m a m a m a a b n b c r n d t. 1 FIG.B 1 FIG.B In certain embodiments, each of the nodes. . .may be implemented using the computerof. In certain embodiments, each of the nodes. . .is a virtual machine on the computerof. Each of the nodes. . .may have the components shown for node. In particular, nodeincludes a rolling update plugin, a container runtime interface, and one or more pods. . .. Each pod includes one or more containers, and each of the containers includes an application (e.g., a cloud native application). For example, the podincludes containers. . ., while the podincludes containers. . .
205 245 245 205 245 245 a m a m In certain embodiments, the control planeand nodes. . .may be virtual machines on separate computers. In other embodiments, the control planeand nodes. . .may be virtual machines on one computer.
220 230 250 210 The pod rolling updater, the extension deployment controller, and the rolling update plugintogether may be referred to as a lightweight rolling update system.
3 FIG. 300 300 310 320 320 270 270 300 b n illustrates further details of a podin accordance with certain embodiments. The podincludes an init containerand an application container. The application containerincludes a cloud native application (i.e., an example of an application). Updating the application container also updates the cloud native application. Each of pods. . .may take the form of pod.
Each container (in a pod) has its own path (e.g. /path/to/certificate_file) that points to a file on a node (e.g. /data/configure/container/network_certificate), and the volume (of storage) is set in the pod descriptor and/or the container descriptor.
210 210 250 250 With embodiments, the lightweight rolling update systeminnovates a technique of low overhead, lightweight rolling updates, without recreating a pod completely. The lightweight rolling update systemintroduces a new plugin, the rolling update plugin, to perform actions for a container that is automatically created by the rolling update plugin. With embodiments, a default policy is restarting each of the containers inside the pod, however, a user may optimize the default policies based on real cases. For example, when the environment or mount is changed, a user may specify a policy that says a subset of related containers are restarted (without restarting all of the containers). The environment or mount may be described as a configuration file or as one or more configuration parameters.
210 250 210 250 210 210 In certain embodiments, the lightweight rolling update systemprovides a more granular rolling update technique based on containers. The rolling update pluginperforms lightweight rolling updates for pods. The lightweight rolling update systemenables defining a fine-grained group of container actions to be taken by the rolling update plugin. The lightweight rolling update systemenables a user to define a well-defined policy to trigger the container actions. The lightweight rolling update systemalso enables automatic creation of policies and actions according to annotations of pods.
4 FIG. 400 400 400 400 illustrates an example Customer Resource Definition (CRD) policyin accordance with certain embodiments. The CRD policydefines a policy including: version “update.company.com/v1alpha1”, kind: Policy, and metadata (name and namespace). In addition, the policyincludes a monitor portion describing data to be monitored in a secret or a configmap; a subjects portion describing one or more subjects (e.g., deployment or pod); and an action portion describes actions to be taken to update a specified container (e.g., the recreate property is false; the prestop property is true; and the poststart property is false). The policymay be described as a policy object. When the recreate property is true, the container is recreated; and, when the recreate property is false, the container is not recreated. When the preStop property is true, the action is performed before the container is stopped. When the postStart property is true, the action is performed after the container is started.
5 FIG. 500 500 illustrates a schemaof the monitor portion of a policy in accordance with certain embodiments. The schemadefines, for the monitor portion, properties of: APIversion, kind, name, namespace, and keys.
6 FIG. 600 600 illustrates a schemaof the subject portion of a policy in accordance with certain embodiments. The schemadefines, for the subject portion, properties of: APIversion, kind, name, and namespace.
7 FIG. 700 700 illustrates a schemaof the action portion of a policy in accordance with certain embodiments. The schemadefines, for the action portion, properties of containers which have properties of: name, recreate, preStop, and postStart.
8 FIG. 8 FIG. 245 245 810 205 820 a a illustrates a computing environment for implementing a policy in accordance with certain embodiments. In, one nodeis illustrated, but there may be any number of nodes. The nodeincludes a node agent. The control planeincludes a deployment controller adaptor.
230 280 284 Initially, a user defines a deployment (i.e., a desired state), a secret and/or a configmap that are monitored by the extension deployment controller, and a policy with actions that are to be triggered when there is a lightweight rolling update. The API serverstores the policy and the deployment.
4 FIG. The user may create the deployment to a cluster. The deployment consists of pods, and each of the pods consists of at least two containers. One container is an init-container, while another container is an application container (e.g., for container myContainer in). The myContainer container includes environment variables defined by a secret.
Then, the user changes the deployment to either change the image or to change the secret or the configmap.
230 820 230 220 If the changes to the deployment result in the image (e.g., for a cloud native application or other application in a container) being changed, the extension deployment controllercalls the deployment controller adaptorto start a legacy (i.e., normal or conventional) pod update process. However, if the changes to the deployment result in the items of a pod object that are monitored being changed (e.g., the secret or the configmap), the extension deployment controllercalls the pod rolling updater.
220 220 280 280 The pod rolling updaterupdates (i.e., annotates) the pod object with the action that is to be taken. In certain embodiments, the pod rolling updatersends the annotations of actions for pod objects to the API server. The API serveradds the annotations of actions to the pod objects.
810 282 The node agentmonitors the pod objectsand determines, from the annotations, that there is an action to be taken.
810 Then, the node agenttriggers the related pre-defined actions (i.e., actions for one or more containers in a policy associated with the pod). The action may be: to restart an app container (e.g., the myContainer container), to reload an environment of a secret (e.g., to reload a configuration file or one or more configuration parameters), recreate an init-container and app container in sequence, or trigger some other container lifecycle hook.
250 810 810 282 When the action is completed, the rolling update pluginnotifies the node agent, and the node agentupdates the annotations to a pod objectto indicate that the action has been performed.
260 260 The container runtime interfacecreates containers in memory. The container runtime interfacealso sends instructions to the pod objects to take actions.
220 282 The pod rolling updaterdetermines that the action of the pod objectis marked as done and continues to handle another pod object.
810 250 250 250 250 250 In particular, the node agenttriggers the rolling update pluginbased on determining that there is an action to be taken. The rolling update plugingets a policy with actions for the pod associated with the pod object that has been annotated. In certain embodiments, the rolling update plugincreates the policy with actions automatically according to the annotations of the pod object. In other embodiments, the rolling update pluginretrieves an existing policy with actions for the pod associated with the annotated pod object. The rolling update pluginperforms the actions in the policy. Examples of the actions include: StopContainer to stop executing the application in the container, StartContainer to start executing the application in the container, RemoveContainer to remove the container from the pod object (while keeping the pod object), and CreateContainer to create a container in the pod object.
9 FIG. 905 910 915 920 940 950 930 935 925 illustrates a legacy pod update process in accordance with certain embodiments. In the control plane, the deployment controlleris connected to the old replicasetsand to the new replicasets. In the legacy embodiment, an old pod object is deleted and a new pod object is created (rather than just performing an operation on a container). In the node, the node agentwatches the new pod objectsand the old pod objectson the API serverfor actions (e.g., a create action).
955 955 Then, the container runtime interfaceperforms: RunPodSandbox, CreateContainer, and StartContainer for the new pods. Also, the container runtime interfaceperforms: StopContainer, RemoveContainer, and RemovePodSandbox for the old pod.
10 FIG. 1000 1000 illustrates annotationsfor a pod in accordance with certain embodiments. In the annotations, the action for the myContainer container is recreate. At various points in time, the recreate action has a status of: done, running, pending or initial.
11 11 FIGS.A andB 1100 280 1102 280 illustrate, in a flowchart, operations for lightweight rolling updates to containers in pods in accordance with certain embodiments. Control begins at blockwith the API serverreceiving (from a user) and storing a policy and a deployment, where the policy identifies a secret and/or a configmap to be monitored for an update and actions to be taken on containers when the monitored item is updated. In block, in response to receiving a request to deploy the deployment, the API servercreates the pod on a node. The pod includes at least an init container and an application container. The application container includes an application.
1104 230 In block, the extension deployment controllerreceives an update to an image (of an application in a container of a pod) or receives an update to the secret and/or the configmap.
1106 230 1108 230 1112 1110 In block, the extension deployment controllerinitiates a lightweight rolling update check. In block, the extension deployment controllerdetermines whether to perform a lightweight rolling update. If the lightweight rolling update is to be performed, processing continues to block, otherwise, processing continues to block. In certain embodiments, if an image of an application in a container of a pod is updated, then the legacy pod update process is performed, while, if a monitored item (i.e., a secret or a configmap) is updated, the lightweight rolling update is performed.
1110 230 720 1110 1130 11 FIG.A 11 FIG.B In block, the extension deployment controllernotifies the deployment controller adaptorto perform the legacy pod update process. Once the legacy pod update process completes, from block(), processing continues to block().
1112 230 220 In block, the extension deployment controllernotifies the pod rolling updaterto perform the lightweight rolling update.
1114 220 220 1114 1116 11 FIG.A 11 FIG.B In block, the pod rolling updateradds annotations with at least one action to an existing pod object that is associated with the pod. In certain embodiments, the pod rolling updateridentifies the policy associated with the pod, determines one or more actions for the one or more containers in the pod, and annotates the pod object with information, including at least one of the actions. From block(), processing continues to block().
1116 710 1118 710 250 In block, the node agentidentifies that the annotations with the at least one action has been added to the pod object based on monitoring of the pod object. In block, the node agentsends a notification to the rolling update pluginto perform the action.
1120 250 1124 1122 In block, the rolling update plugindetermines whether a policy exists for the pod associated with the annotated pod object. If yes, processing continues to block, otherwise, processing continues to block.
1122 250 250 1122 1126 In block, the rolling update plugincreates a default policy with actions for the pod. For example, the default policy may indicate that the containers in the pod object are to be recreated. In certain embodiments, the rolling update plugincreates the default policy based on the annotations. The default policy may be stored for future use. From block, processing continues to block.
1124 250 In block, the rolling update pluginretrieves an existing policy for the pod.
1126 250 1122 1124 1128 250 260 250 250 810 810 In block, the rolling update pluginperforms one or more actions specified in the policy for one or more containers in the pod (e.g., the application container). The policy is either the default policy (block) or the existing policy (block). In block, the rolling update pluginmarks the at least one action in the annotations as done. In certain embodiments, the container runtime interfacenotifies the rolling update pluginthat the actions are done, the rolling update pluginnotifies the node agentthat the actions are done, and the node agentmarks the actions in the annotations as done.
1130 230 1106 In block, the extension deployment controllerdetermines whether another update has been received. If yes, processing continue to block, otherwise, monitoring/waiting for another update continues.
12 FIG. illustrates, in a flowchart, operations for performing actions on a container in a pod without recreating the pod in accordance with certain embodiments.
1200 210 1202 210 1204 210 210 1206 210 Control begins at blockwith the lightweight rolling update systemdetermining that a monitored item of a pod has been updated based on monitoring a pod object associated with the pod (where the monitoring identifies new annotations to the pod object), where the pod includes a container, and where the container includes an application (e.g., a cloud native application). In block, the lightweight rolling update systemretrieves a policy for the pod, where the policy identifies the container and specifies one or more actions to be performed on the container. In block, the lightweight rolling update systemperforms the one or more actions on the container. By performing the one or more actions on the container, the lightweight rolling update systemperforms the one or more actions on the application. For example, if the container is restarted, the application is restarted. In block, the lightweight rolling update systemupdates annotations to the pod object to indicate that the one or more actions have been completed.
In certain embodiments, the monitored item is an item selected from a group consisting of a secret and a configmap. In certain embodiments, the one or more actions are selected from a group consisting of creating a new container, deleting an existing container, executing the existing container with a preStop property (i.e., a preStop hook), and executing the existing container with a postStart property (i.e., a postStart hook).
210 In certain embodiments, the lightweight rolling update systemadds the annotations to the pod object, where the annotations comprise an identifier of the container, the one or more actions, and a status of each of the one or more actions.
210 In certain embodiments, the lightweight rolling update system, for another pod, determines that a policy has not been created and creates a default policy with actions for a container in that pod.
In certain embodiments, the one or more actions are performed for the container without recreating the pod object.
In certain embodiments, the policy comprises the monitored item, related subjects (e.g., a deployment or a pod), and the one or more actions.
210 210 210 Thus, the lightweight rolling update systemprovides a lightweight update of a pod by introducing a new granularity of pod update. With the lightweight rolling update system, since containers in a pod are restarted, without pod recreation, images are not pulled again for the pod, virtual machines are not created for the pod, etc. In addition, the lightweight rolling update systemsaves time by avoiding pod recreation, which is especially useful for secret containers and confidential containers.
Also, with embodiments, the lightweight rolling update may be completed in minutes (instead of hours), which minimizes disruption to use of the applications.
Confidential Artificial Intelligence (AI) computing may use confidential containers, which are stored in a pod. In confidential AI, usually, model hyperparameters for a confidential container are changed to tune an AI model, while the AI model code image and the AI model are kept unchanged. With embodiments, instead of updating (i.e., recreating) the pod storing the confidential container, the lightweight rolling update updates the confidential container for the changed model hyperparameters to take effect. Some examples of model hyperparameters include: the learning rate for training a neural network, the C and sigma hyperparameters for support vector machines, and the k in k-nearest neighbors.
Confidential AI also exposes web Application Programming Interfaces (APIs). In this case, certificates are used to guarantee service integrity, which are mount as volume from configmap. To rotate the certificates, the configmap is changed. With embodiments, instead of updating (i.e., recreating) the pod to sync the changed configmap to the pod, the lightweight rolling update updates one or more containers in the pod.
The letter designators, such as i, among others, are used to designate an instance of an element, i.e., a given element, or a variable number of instances of that element when used with the same or different elements.
The terms “an embodiment”, “embodiment”, “embodiments”, “the embodiment”, “the embodiments”, “one or more embodiments”, “some embodiments”, and “one embodiment” mean “one or more (but not all) embodiments of the present invention(s)”unless expressly specified otherwise.
The terms “including”, “comprising”, “having” and variations thereof mean “including but not limited to”, unless expressly specified otherwise.
The enumerated listing of items does not imply that any or all of the items are mutually exclusive, unless expressly specified otherwise.
The terms “a”, “an” and “the” mean “one or more”, unless expressly specified otherwise.
Devices that are in communication with each other need not be in continuous communication with each other, unless expressly specified otherwise. In addition, devices that are in communication with each other may communicate directly or indirectly through one or more intermediaries.
A description of an embodiment with several components in communication with each other does not imply that all such components are required. On the contrary a variety of optional components are described to illustrate the wide variety of possible embodiments of the present invention.
When a single device or article is described herein, it will be readily apparent that more than one device/article (whether or not they cooperate) may be used in place of a single device/article. Similarly, where more than one device or article is described herein (whether or not they cooperate), it will be readily apparent that a single device/article may be used in place of the more than one device or article or a different number of devices/articles may be used instead of the shown number of devices or programs. The functionality and/or the features of a device may be alternatively embodied by one or more other devices which are not explicitly described as having such functionality/features. Thus, other embodiments of the present invention need not include the device itself.
The foregoing description of various embodiments of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be limited not by this detailed description, but rather by the claims appended hereto. The above specification, examples and data provide a complete description of the manufacture and use of the composition of the invention. Since many embodiments of the invention can be made without departing from the spirit and scope of the invention, the invention resides in the claims herein after appended.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
September 18, 2024
April 2, 2026
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.