Accelerating sub-operator reconciliation
A method, computer system, and a computer program product are provided. A child container orchestrator in a resource distribution hierarchical relationship with a parent container orchestrator is identified. Child container orchestrator-relevant resources of a parent container are automatically monitored for a state modification. The automatic monitoring is not comprehensive monitoring of all resources of the parent container. In response to the monitoring recognizing the state modification, the child container orchestrator is updated with the state modification.
1 . A computer-implemented method comprising:
identifying, via automated parsing of a software code list of mappings of custom resources, a child container orchestrator in a resource distribution hierarchical relationship with a parent container orchestrator;
creating a respective monitoring predicate for a name of the identified child container orchestrator;
automatically monitoring a parent container for a state modification of resources related to the child container orchestrator, wherein the automatic monitoring is limited to configuration-scoped resources out of all resources of the parent container, and wherein the automatic monitoring uses the respective monitoring predicate to filter events based on the configuration-scoped resources;
in response to the monitoring recognizing the state modification, dispatching, by a listener module, an event message to an action module and updating the child container orchestrator with the state modification by updating a corresponding child custom resource to reflect a configuration change; and
running a first application that utilizes the updated child container orchestrator.
2 . The computer-implemented method of claim 1 , wherein the automatic monitoring is performed via a listener module and the updating is performed via an action module.
3 . The computer-implemented method of claim 2 , wherein: the listener module dispatches an event message to the action module in response to recognizing the state modification, and the action module performs the updating in response to receiving the event message.
4 . The computer-implemented method of claim 1 , further comprising receiving a designation of the child container orchestrator and adding a name of the designated child container orchestrator to a software code list of mappings of custom resources.
5 . The computer-implemented method of claim 1 , wherein the updating the child container orchestrator with the state modification comprises updating custom resources of the child container orchestrator and applying the updated custom resources of the child container orchestrator.
6 . The computer-implemented method of claim 1 , further comprising restarting an operator pod of the parent container orchestrator in response to the child container orchestrator being updated with the state modification.
7 . The computer-implemented method of claim 1 , further comprising deploying the first application that utilizes the updated child container orchestrator.
8 . A computer system comprising:
one or more processors, one or more computer-readable memories, and program instructions stored on at least one of the one or more computer-readable memories for execution by at least one of the one or more processors to cause the computer system to:
identify, via automated parsing of a software code list of mappings of custom resources, a child container orchestrator in a resource distribution hierarchical relationship with a parent container orchestrator;
create a respective monitoring predicate for a name of the identified child container orchestrator;
automatically monitoring a parent container for a state modification of resources related to the child container orchestrator, wherein the automatic monitoring is limited to configuration-scoped resources out of all resources of the parent container, and wherein the automatic monitoring uses the respective monitoring predicate to filter events based on the configuration-scoped resources;
in response to the monitoring recognizing the state modification, dispatching, by a listener module, an event message to an action module and updating the child container orchestrator with the state modification by updating a corresponding child custom resource to reflect a configuration change; and
run a first application that utilizes the updated child container orchestrator.
9 . The computer system of claim 8 , wherein the automatic monitoring is performed via a listener module and the updating is performed via an action module.
10 . The computer system of claim 9 , wherein: the listener module dispatches an event message to the action module in response to recognizing the state modification, and the action module performs the updating in response to receiving the event message.
11 . The computer system of claim 8 , wherein the program instructions are further for execution to cause the computer system to: receive a designation of the child container orchestrator and add a name of the designated child container orchestrator to a software code list of mappings of custom resources.
12 . The computer system of claim 8 , wherein the updating the child container orchestrator with the state modification comprises updating custom resources of the child container orchestrator and applying the updated custom resources of the child container orchestrator.
13 . The computer system of claim 8 , wherein the program instructions are further for execution to cause the computer system to restart an operator pod of the parent container orchestrator in response to the child container orchestrator being updated with the state modification.
14 . The computer system of claim 8 , wherein the program instructions further cause the computer system to deploy the first application that utilizes the updated child container orchestrator.
15 . A computer program product comprising a computer-readable storage medium having program instructions embodied therewith, the program instructions executable by a computer to cause the computer to:
identify, via automated parsing of a software code list of mappings of custom resources, a child container orchestrator in a resource distribution hierarchical relationship with a parent container orchestrator;
create a respective monitoring predicate for a name of the identified child container orchestrator;
automatically monitoring a parent container for a state modification of resources related to the child container orchestrator, wherein the automatic monitoring is limited to configuration-scoped resources out of all resources of the parent container, and wherein the automatic monitoring uses the respective monitoring predicate to filter events based on the configuration-scoped resources;
in response to the monitoring recognizing the state modification, dispatching, by a listener module, an event message to an action module and updating the child container orchestrator with the state modification by updating a corresponding child custom resource to reflect a configuration change; and
run a first application that utilizes the updated child container orchestrator.
16 . The computer program product of claim 15 , wherein the automatic monitoring is performed via a listener module and the updating is performed via an action module.
17 . The computer program product of claim 16 , wherein: the listener module dispatches an event message to the action module in response to recognizing the state modification, and the action module performs the updating in response to receiving the event message.
18 . The computer program product of claim 15 , wherein the program instructions are further for execution to cause the computer to: receive a designation of the child container orchestrator and add a name of the designated child container orchestrator to a software code list of mappings of custom resources.
19 . The computer program product of claim 15 , wherein the updating the child container orchestrator with the state modification comprises updating custom resources of the child container orchestrator and applying the updated custom resources of the child container orchestrator.
20 . The computer program product of claim 15 , wherein the program instructions further cause the computer program product to deploy the first application that utilizes the updated child container orchestrator.