A version management automatic embedding agent, device and storage medium
By adding tags to the YAML file and leveraging the K8S cluster to extend the configuration and automatically embed the agent using Webhook, the problems of complex embedding process and inconsistent versions are solved, achieving agent version consistency and simplified configuration.
Patent Information
- Application Number
- CN202411774593.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-12-05
AI Technical Summary
In a microservice Kubernetes container environment, embedding a tracing agent is complex and error-prone. Managing multiple agent versions is inconvenient, leading to version inconsistencies in different environments and impacting system stability and performance.
By adding a first tag to the YAML file, the extended configuration of the K8S cluster is updated. The Mutating Webhook and Mutating controller are used to intercept and modify the YAML file, call the Webhook to obtain agent configuration information, and automatically embed the specified version of the agent.
It enables the automatic embedding of a tracing agent in a container environment, ensuring that the same application is version consistent across different environments and simplifying the configuration work for developers.
Smart Images

Figure CN119806617B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer science and technology, particularly to the fields of distributed link tracing and automatic embedding of agents in container environments, and especially to a method, apparatus, and storage medium for automatic embedding of agents in version management. Background Technology
[0002] Tracing the call chain between microservices in a distributed system is a crucial step in ensuring system stability and performance optimization. To achieve this tracing, an agent needs to be embedded in the application to collect call chain data and report it to the backend of the call chain tracing system for aggregation, analysis, storage, and display. Different languages require different language agents for different applications; however, as the number of microservices increases, applications using the same programming language may also embed different versions of agents, making the agent embedding process increasingly complex. To ensure that the application's business logic is unaware of the agent's existence, embedding an agent typically requires complex configuration by developers. For example, in the currently popular Kubernetes container environment, developers need to perform complex configuration work in the application's deployment YAML file to achieve seamless embedding.
[0003] Nevertheless, as the process of embedding agents becomes increasingly complex, embedding tracing agents into applications requires complex manual configuration work, which is prone to errors if not handled carefully. Furthermore, managing multiple agent versions is difficult, easily leading to unforeseen results due to the same application using different agent versions in test and production environments. This application aims to automatically embed tracing agents into container environments, replacing manual configuration work. Simultaneously, by embedding the agent version in the configuration file, it facilitates the management of multiple agent versions and ensures consistency of the agent version embedded in different environments for the same application. Summary of the Invention
[0004] To address these shortcomings, this application provides one or more technical solutions to overcome the aforementioned deficiencies in the prior art, enabling the automatic embedding of a tracing agent in a container environment. Furthermore, by embedding the agent version in a configuration file, it facilitates the management of multiple agent versions and ensures consistency of the agent version embedded in different environments for the same application. This invention provides a method, apparatus, and storage medium for version management and automatic agent embedding to solve at least one of the aforementioned technical problems.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a method for automatically embedding an agent in version management, comprising:
[0006] Add the first tag to the YAML file, and set the version corresponding to the first tag to be consistent with the version of the access agent;
[0007] Update the first extended configuration in the K8S cluster. The first extended configuration sets up an interception function, which is specified to intercept YAML files containing the first tag. When an interception occurs, the first extended configuration calls the modification service to modify the YAML file.
[0008] When a YAML file containing the first tag is detected and submitted to the K8S cluster for deployment, the second extended configuration intercepts the YAML file containing the first tag. The second extended configuration calls the Webhook, which obtains the first tag and queries the agent configuration information corresponding to the first tag version.
[0009] Modify the YAML file using the retrieved agent configuration information so that the modified YAML file can be automatically embedded into the agent application of that version, and then return the modified YAML file to the K8S cluster.
[0010] Furthermore, the first extended configuration employs MutatingWebhook to modify or process the resource object in a customized manner before the resource object is created or updated.
[0011] Furthermore, the second extended configuration employs a Mutating controller, which intercepts resource objects when they are submitted to the API server and modifies them according to predefined rules. The Mutating controller is used to extend Kubernetes functionality by performing custom transformations and modifications on resource objects before they are processed.
[0012] Furthermore, the modification service is an external Webhook service, and the modification method is any one of adding a field, deleting a field, or changing the attribute value.
[0013] Secondly, the present invention also provides an apparatus for automatically embedding an agent in version management, the apparatus comprising: a deployment unit, a first extension unit, a second extension unit, and a configuration unit;
[0014] The deployment unit is used to add a first tag to the YAML file, wherein the version corresponding to the first tag is set to be consistent with the version of the access agent;
[0015] The first extension unit is used to update the first extension configuration in the K8S cluster. The first extension configuration sets an interception function, which is specified to intercept YAML files containing the first tag. When an interception occurs, the first extension configuration calls a modification service to modify the YAML file.
[0016] The second extension unit is used to intercept the YAML file containing the first tag when it is detected that the YAML file containing the first tag is submitted to the K8S cluster for deployment. The second extension configuration calls the Webhook, which obtains the first tag and queries the agent configuration information of the corresponding version according to the version of the first tag.
[0017] The configuration unit is used to modify the YAML file based on the queried agent configuration information so that the modified YAML file can be automatically embedded in the agent application of the specified version, and to return the modified YAML file to the K8S cluster.
[0018] Furthermore, the first extended configuration employs MutatingWebhook to modify or process the resource object in a customized manner before the resource object is created or updated.
[0019] Furthermore, the second extended configuration employs a Mutating controller, which intercepts resource objects when they are submitted to the API server and modifies them according to predefined rules. The Mutating controller is used to extend Kubernetes functionality by performing custom transformations and modifications on resource objects before they are processed.
[0020] Furthermore, the modification service is an external Webhook service, and the modification method is any one of adding a field, deleting a field, or changing the attribute value.
[0021] Thirdly, the present invention provides a computing device, comprising:
[0022] Memory, used to store program instructions;
[0023] The processor is used to call program instructions stored in the memory and execute the above-described method for automatically embedding an agent for version management according to the obtained program instructions.
[0024] Fourthly, the present invention provides a computer-readable storage medium, including computer-readable instructions, which, when read and executed by a computer, implement the aforementioned method for automatically embedding a version management agent. The readable medium can be multiple, and the multiple readable media can operate independently of each other.
[0025] Compared to existing technologies, this solution adds a first tag to the YAML file, with the version corresponding to the first tag set to match the access agent version; updates a first extended configuration in the Kubernetes cluster, which is designated to intercept YAML files containing the first tag; when interception occurs, the first extended configuration calls a modification service to modify the YAML file; when a YAML file containing the first tag is detected and submitted to the Kubernetes cluster for deployment, a second extended configuration intercepts the YAML file containing the first tag, calls a Webhook, which obtains the first tag and queries the corresponding version of the agent configuration information based on the first tag version; modifies the YAML file using the queried agent configuration information so that the modified YAML file can be automatically embedded into the agent application of that version, and returns the modified YAML file to the Kubernetes cluster to continue creating resources and deploying the application. This achieves automatic embedding of the tracing agent in the container environment, and by fixing the agent version in the configuration file, it facilitates the management of multiple agent versions and ensures that the agent version embedded in the same application is consistent across different environments. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 A flowchart illustrating an embodiment of the version management automatic embedding agent method provided by the present invention;
[0028] Figure 2 A framework diagram of an embodiment of the version management automatic embedding agent method provided by the present invention;
[0029] Figure 3 A structural block diagram of an embodiment of the version management automatically embedded agent provided by the present invention. Detailed Implementation
[0030] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0031] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in the specification of this application means the presence of features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0032] To make the objectives, technical solutions, and advantages of this application clearer, the specific embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0033] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0034] Agent: A common technical term that refers to an agent that performs certain operations or provides certain services on behalf of other programs or users, thereby automating and making the system more intelligent.
[0035] Webhook: An automated notification service implemented through an HTTP callback mechanism. When a specific event occurs (such as code submission, resource creation or update), it triggers a predefined URL or API endpoint to execute the corresponding operation or logic.
[0036] Mutating Webhook: An extension mechanism that allows users to modify and automate resource objects before they are created or updated via a custom webhook.
[0037] The core of this invention is to provide a method for automatically embedding an agent in version management. Figure 1 The diagram shown is a flowchart illustrating the method for automatically embedding an agent in version management provided in this embodiment. Figure 2 The diagram shown is a framework diagram of the method for automatically embedding an agent in version management provided in this embodiment. To better understand this method, it is now combined with... Figure 1 and Figure 2 The technical solution of this embodiment will be described in detail:
[0038] Step S1: Add the first tag to the YAML file, and set the version of the first tag to be consistent with the version of the access agent;
[0039] In a preferred embodiment, an agent-version tag is added to the application deployment YAML file, and the value of the tag specifies the agent version for access.
[0040] Step S2: Update the first extended configuration in the K8S cluster. The first extended configuration sets an interception function, which is specified to intercept YAML files containing the first tag. When an interception occurs, the first extended configuration calls the modification service to modify the YAML file.
[0041] In a preferred embodiment, the Mutating Webhook configuration is updated in the K8S cluster. This configuration specifies that YAML files containing the agent-version tag should be intercepted and an external Webhook service should be invoked to modify the YAML files.
[0042] Step S3: When a YAML file containing the first tag is detected and submitted to the K8S cluster for deployment, the second extended configuration intercepts the YAML file containing the first tag. The second extended configuration calls the Webhook, which obtains the first tag and queries the agent configuration information of the corresponding version based on the version of the first tag.
[0043] Step S4: Modify the YAML file using the queried agent configuration information so that the modified YAML file can be automatically embedded in the agent application of the specified version, and return the modified YAML file to the K8S cluster.
[0044] In a preferred implementation, when a YAML file containing the agent-version tag is submitted to the Kubernetes cluster for deployment, the Mutating controller intercepts the YAML file and invokes a Webhook for additional processing. The Webhook performs the following three steps:
[0045] Step S401: Extract the version number from the agent-version label and query the corresponding version of the agent configuration information, such as the agent mirror address, from the configuration center based on the version number.
[0046] Step S402: Modify the application's YAML file using the configuration information of the current agent version to automatically embed the agent of that version into the application.
[0047] Step S403: Return the modified YAML file to the K8S cluster to continue creating resources and deploying applications. When the application starts, it will be connected to the specified version of the agent.
[0048] In a preferred embodiment, the first extended configuration employs a mutating webhook to modify or process the resource object in a custom manner before the resource object is created or updated.
[0049] In a preferred embodiment, the second extended configuration employs a mutating controller, which intercepts resource objects when they are submitted to the API server and modifies them according to predefined rules. The mutating controller is used to extend Kubernetes functionality by performing custom transformations and modifications on resource objects before they are processed.
[0050] In a preferred embodiment, the modification service is an external Webhook service, and the modification method is any one of adding a field, deleting a field, or changing the attribute value.
[0051] In this embodiment, a first tag is added to the YAML file, and the version corresponding to the first tag is set to be consistent with the access agent version. The first extended configuration in the K8S cluster is updated. The first extended configuration is specified to intercept YAML files containing the first tag. When interception occurs, the first extended configuration calls a modification service to modify the YAML file. When a YAML file containing the first tag is detected and submitted to the K8S cluster for deployment, the second extended configuration intercepts the YAML file containing the first tag. The second extended configuration calls a Webhook, which obtains the first tag and queries the agent configuration information corresponding to the first tag version. The YAML file is modified using the queried agent configuration information so that the modified YAML file can be automatically embedded in the agent application of the version. The modified YAML file is then returned to the K8S cluster to continue creating resources and deploying applications.
[0052] This embodiment ensures that the agent version embedded in the same YAML file is consistent when deployed in different environments by embedding the agent version in the application YAML file. At the same time, by automatically embedding the agent, it greatly simplifies the manual configuration work of developers.
[0053] In one embodiment, an apparatus for automatically embedding an agent in version management is provided, see [link to previous document]. Figure 3The diagram shown is a structural block diagram of a device for automatically embedding an agent in version management according to this embodiment. The device includes: a deployment unit 10, a first extension unit 20, a second extension unit 30, and a configuration unit 40.
[0054] Deployment Unit 10: Used to add the first tag to the yaml file, and the version corresponding to the first tag is set to be consistent with the version of the access agent.
[0055] In a preferred embodiment, an agent-version tag is added to the application deployment YAML file, and the value of the tag specifies the agent version for access.
[0056] First extension unit 20: used to update the first extension configuration in the K8S cluster. The first extension configuration sets an interception function, which is specified to intercept yaml files containing the first tag. When an interception occurs, the first extension configuration calls a modification service to modify the yaml file.
[0057] In a preferred embodiment, the MutatingWebhook configuration is updated in the K8S cluster. This configuration specifies that YAML files containing the agent-version tag should be intercepted and an external Webhook service should be invoked to modify the YAML files.
[0058] The second extension unit 30 is used to intercept the YAML file containing the first tag when a YAML file containing the first tag is detected and submitted to the K8S cluster for deployment. The second extension configuration calls a Webhook, which obtains the first tag and queries the agent configuration information of the corresponding version based on the version of the first tag.
[0059] Configuration unit 40: Used to modify the YAML file based on the queried agent configuration information so that the modified YAML file can be automatically embedded in the agent application of the specified version, and return the modified YAML file to the K8S cluster.
[0060] In a preferred embodiment, when a YAML file containing the agent-version tag is submitted to the Kubernetes cluster for deployment, the Mutating controller intercepts the YAML file and invokes a Webhook for additional processing. The configuration unit 40 invokes the Webhook to perform three steps:
[0061] Step S401: Extract the version number from the agent-version label and query the corresponding version of the agent configuration information, such as the agent mirror address, from the configuration center based on the version number.
[0062] Step S402: Modify the application's YAML file using the configuration information of the current agent version to automatically embed the agent of that version into the application.
[0063] Step S403: Return the modified YAML file to the K8S cluster to continue creating resources and deploying applications. When the application starts, it will be connected to the specified version of the agent.
[0064] In a preferred embodiment, the first extended configuration employs a mutatingWebhook to modify or process the resource object in a custom manner before the resource object is created or updated.
[0065] In a preferred embodiment, the second extended configuration employs a mutating controller, which intercepts resource objects when they are submitted to the API server and modifies them according to predefined rules. The mutating controller is used to extend Kubernetes functionality by performing custom transformations and modifications on resource objects before they are processed.
[0066] In a preferred embodiment, the modification service is an external Webhook service, and the modification method is any one of adding a field, deleting a field, or changing the attribute value.
[0067] In this embodiment, a first tag is added to the YAML file, and the version corresponding to the first tag is set to be consistent with the access agent version. The first extended configuration in the K8S cluster is updated. The first extended configuration is specified to intercept YAML files containing the first tag. When interception occurs, the first extended configuration calls a modification service to modify the YAML file. When a YAML file containing the first tag is detected and submitted to the K8S cluster for deployment, the second extended configuration intercepts the YAML file containing the first tag. The second extended configuration calls a Webhook, which obtains the first tag and queries the agent configuration information corresponding to the first tag version. The YAML file is modified using the queried agent configuration information so that the modified YAML file can be automatically embedded in the agent application of the version. The modified YAML file is then returned to the K8S cluster to continue creating resources and deploying applications.
[0068] This embodiment ensures that the agent version embedded in the same YAML file is consistent when deployed in different environments by embedding the agent version in the application YAML file. At the same time, by automatically embedding the agent, it greatly simplifies the manual configuration work of developers.
[0069] The device for automatically embedding the version management agent in this embodiment is used to implement the aforementioned method for automatically embedding the version management agent. Therefore, the specific implementation of the device for automatically embedding the version management agent can be found in the specific implementation section of the method for automatically embedding the version management agent described above. For example, the deployment unit 10 is used to implement step S1 in the method for automatically embedding the version management agent, and the first extension unit 20 is used to implement step S2 in the method for automatically embedding the version management agent. Therefore, the specific implementation can be referred to the description of the corresponding embodiments. The device provided by the present invention is attached to the method provided by the present invention, and its specific effects can be referred to the above method, which will not be repeated here.
[0070] In one embodiment, a computing device is provided, comprising:
[0071] Memory, used to store program instructions;
[0072] A processor, configured to execute the computer program, implements the steps of the version management automatic agent embedding method as described above. This invention provides a version management automatic agent embedding method, which, compared to existing technologies, has significant advantages and beneficial effects. It involves adding a first tag to a YAML file, setting the version corresponding to the first tag to be consistent with the access agent version; updating a first extended configuration in the K8S cluster, the first extended configuration being designated to intercept YAML files containing the first tag; when interception occurs, the first extended configuration calls a modification service to modify the YAML file; when a YAML file containing the first tag is detected and submitted to the K8S cluster for deployment, a second extended configuration intercepts the YAML file containing the first tag, the second extended configuration calls a Webhook, the Webhook obtains the first tag, and queries the corresponding version of the agent configuration information based on the first tag version; modifying the YAML file using the queried agent configuration information so that the modified YAML file can be automatically embedded into the version of the agent application; and returning the modified YAML file to the K8S cluster to continue creating resources and deploying applications. By embedding the agent version in the application's YAML file, it ensures that the agent version embedded in the same YAML file is consistent when deployed in different environments. At the same time, by automating the embedding of the agent, it greatly simplifies the manual configuration work for developers.
[0073] In one embodiment, a computer-readable storage medium is provided, including computer-readable instructions. When a computer reads and executes the computer-readable instructions, it implements the steps of the above-described method for automatically embedding an agent in version management. This method for automatically embedding an agent in version management has significant advantages and beneficial effects compared to existing technologies. It involves adding a first tag to a YAML file and setting the version corresponding to the first tag to be consistent with the access agent version; updating a first extended configuration in the K8S cluster, the first extended configuration being designated to intercept YAML files containing the first tag; when interception occurs, the first extended configuration calls a modification service to modify the YAML file; when a YAML file containing the first tag is detected and submitted to the K8S cluster for deployment, a second extended configuration intercepts the YAML file containing the first tag, the second extended configuration calls a Webhook, the Webhook obtains the first tag, and queries the corresponding version of the agent configuration information based on the first tag version; modifying the YAML file using the queried agent configuration information so that the modified YAML file can be automatically embedded into the version of the agent application; and returning the modified YAML file to the K8S cluster to continue creating resources and deploying applications. By embedding the agent version in the application's YAML file, it ensures that the agent version embedded in the same YAML file is consistent when deployed in different environments. At the same time, by automating the embedding of the agent, it greatly simplifies the manual configuration work for developers.
[0074] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the specific device can be divided into different functional modules to complete all or part of the functions described above.
[0075] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0076] In the embodiments covered by this application, it should be understood that the disclosed apparatus, devices, and methods can be implemented in other ways. For example, the division of modules is merely a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple modules or components may be combined or integrated into another device, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, or it may be an electrical, mechanical, or other form of connection.
[0077] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0078] Furthermore, the functional modules in the various embodiments of this application can be implemented either in hardware or as software functional modules. If these functional modules are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a computer program product, which includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program product is stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid state disks (SSDs)).
[0079] The above description is merely an example and illustration of the structure of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the structure of the invention or exceed the scope defined in the claims, all of which should fall within the protection scope of the present invention.
Claims
1. A method for automatically embedding an agent in version management, characterized in that, include: Add the first tag to the YAML file, and set the version corresponding to the first tag to be consistent with the version of the access agent; Update the first extended configuration in the K8S cluster, the first extended configuration sets an interception function, the interception function is specified to intercept YAML files containing the first tag; When an interception occurs, the first extended configuration calls the modification service to modify the YAML file; When a YAML file containing the first tag is detected and submitted to the K8S cluster for deployment, the second extended configuration intercepts the YAML file containing the first tag. The second extended configuration calls the Webhook, which obtains the first tag and queries the agent configuration information corresponding to the first tag version. Modify the YAML file using the retrieved agent configuration information so that the modified YAML file can be automatically embedded into the agent application of that version, and then return the modified YAML file to the K8S cluster.
2. The method for automatically embedding an agent in version management according to claim 1, characterized in that, The first extended configuration uses MutatingWebhook to modify or process the resource object in a custom way before the resource object is created or updated.
3. The method for automatically embedding an agent in version management according to claim 1, characterized in that, The second extended configuration uses a Mutating controller, which intercepts resource objects when they are submitted to the API server and modifies them according to predefined rules. The Mutating controller is used to extend Kubernetes functionality by performing custom transformations and modifications on resource objects before they are processed.
4. The method for automatically embedding an agent in version management according to claim 1, characterized in that, The modification service is an external Webhook service, and the modification method is any one of adding a field, deleting a field, or changing the attribute value.
5. A device for automatically embedding an agent in version management, characterized in that, include: Deployment unit, first expansion unit, second expansion unit, configuration unit; The deployment unit is used to add a first tag to the YAML file, wherein the version corresponding to the first tag is set to be consistent with the version of the access agent; The first extension unit is used to update the first extension configuration in the K8S cluster. The first extension configuration sets an interception function, which is specified to intercept YAML files containing the first tag. When an interception occurs, the first extended configuration calls the modification service to modify the YAML file; The second extension unit is used to intercept the YAML file containing the first tag when it is detected that the YAML file containing the first tag is submitted to the K8S cluster for deployment. The second extension configuration calls the Webhook, which obtains the first tag and queries the agent configuration information of the corresponding version according to the version of the first tag. The configuration unit is used to modify the YAML file based on the queried agent configuration information so that the modified YAML file can be automatically embedded in the agent application of the specified version, and to return the modified YAML file to the K8S cluster.
6. The device for automatically embedding an agent in version management according to claim 5, characterized in that, The first extended configuration uses MutatingWebhook to modify or process the resource object in a custom way before the resource object is created or updated.
7. The device for automatically embedding an agent in version management according to claim 5, characterized in that, The second extended configuration uses a Mutating controller, which intercepts resource objects when they are submitted to the API server and modifies them according to predefined rules. The Mutating controller is used to extend Kubernetes functionality by performing custom transformations and modifications on resource objects before they are processed.
8. The device for automatically embedding an agent in version management according to claim 5, characterized in that, The modification service is an external Webhook service, and the modification method is any one of adding a field, deleting a field, or changing the attribute value.
9. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method as described in any one of claims 1 to 4 according to the obtained program instructions.
10. A computer-readable storage medium, characterized in that, It includes computer-readable instructions, which, when read and executed by a computer, implement the method of any one of claims 1 to 4. The readable medium may be multiple, and the multiple readable media can operate independently of each other.
Citation Information
Patent Citations
Method and system for automatically deploying IAST agent in k8s
CN113722048A
K8s-based yaml adaptive deployment method and device
CN116795386A