CN111984369A - Container calling method and device - Google Patents
Container calling method and device Download PDFInfo
- Publication number
- CN111984369A CN111984369A CN202010745763.4A CN202010745763A CN111984369A CN 111984369 A CN111984369 A CN 111984369A CN 202010745763 A CN202010745763 A CN 202010745763A CN 111984369 A CN111984369 A CN 111984369A
- Authority
- CN
- China
- Prior art keywords
- request
- management platform
- container management
- response
- function
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 230000004044 response Effects 0.000 claims abstract description 79
- 238000011161 development Methods 0.000 claims abstract description 66
- 230000008569 process Effects 0.000 claims abstract description 30
- 238000012545 processing Methods 0.000 claims abstract description 12
- 230000006870 function Effects 0.000 claims description 152
- 230000001172 regenerating effect Effects 0.000 claims description 6
- 230000008571 general function Effects 0.000 claims description 3
- 238000012423 maintenance Methods 0.000 abstract description 9
- 230000000694 effects Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45579—I/O management, e.g. providing access to device drivers or storage
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a container calling method and a device, wherein the method comprises the following steps: receiving, by the gateway module, an access request for a particular container and forwarding the request to the authentication module in response to the request requiring authentication; selectively forwarding, by the gateway module, the request to the container management platform or the business module based on predetermined rules without requiring authentication or the authentication module to feed back that the request passes authentication in response to the request; invoking a specific container to process the request using a generic function provided in the container management platform; calling a specific container to process the request by using a secondary development function provided in the service module; and re-implementing the common function based on the updated container management platform in response to the update of the container management platform, and processing the request based on the re-implemented common function and the existing secondary development function. The invention can separate the development function from the container management platform, reduce the workload of updating and maintenance and improve the stability of the maintenance work.
Description
Technical Field
The present invention relates to the field of fault warning, and more particularly, to a method and an apparatus for container calling.
Background
While the containerization is prevailing, the operation and maintenance of many projects are realized by docker and k8s (Kubernetes, container management application), and for a technical team with difficulties in using docker and k8s, a ranker (container management platform) provides a visual interface and interface, and the functions of docker and k8s can be conveniently used at the interface. Many enterprises also choose to use the ranker for containerization, and the more enterprises have special requirements but the ranker cannot realize the containerization, and choose to perform secondary development on the source code of the ranker to realize the requirement of the enterprises.
However, because of the activity of the ran cher community, the version is changed more quickly, if development is carried out on the basis of a certain version, great jump is faced to upgrade, development codes have to be extracted, the same modification is carried out on the new version, and if the new version codes are changed, the development codes cannot be used and can only be developed again.
Aiming at the problems that development functions need to be realized again for many times and time and labor are wasted due to updating of a container management platform in the prior art, no effective solution is available at present.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a container calling method and apparatus, which can separate a development function from a container management platform, reduce the workload of updating and maintaining and maintain the stability of the operation.
In view of the foregoing, a first aspect of the embodiments of the present invention provides a container calling method, including the following steps:
receiving, by the gateway module, an access request for a particular container and forwarding the request to the authentication module in response to the request requiring authentication;
selectively forwarding, by the gateway module, the request to the container management platform or the service module based on a predetermined rule without requiring authentication in response to the request or the authentication module feeding back that the request passes authentication;
in response to forwarding the request to the container management platform, invoking a particular container using a generic function provided in the container management platform to process the request and provide feedback to the gateway module;
in response to forwarding the request to the service module, invoking a particular container using a secondary development function provided in the service module to process the request and further selectively forwarding the request to a container management platform or providing feedback for the gateway module based on predetermined rules;
and re-implementing the common function based on the updated container management platform in response to the update of the container management platform, and processing the request based on the re-implemented common function and the existing secondary development function.
In some embodiments, the authentication module feeding back that the request passes the identity verification comprises:
acquiring and communicably connecting a login interface of a container management platform and a service module;
feeding back a pass authentication in response to the request including legitimate identity information;
responding to the request which does not include legal identity information but includes a user name and a password, connecting the container management platform and the service module through a login interface by using the user name and the password, and responding to the successful connection and feeding back that the identity authentication is passed;
in response to the request not including legitimate identity information and not including the username and password, the feedback is not authenticated and causes the gateway module to reject the request.
In some embodiments, selectively forwarding, by the gateway module, the request to the container management platform or the traffic module based on the predetermined rule comprises:
determining all functions requested to be called;
in response to the generic function being sufficient to override all functions called by the request, setting a request path of the request to point to the container management platform;
setting a request path of the request to be directed to the service module in response to the generic function not being sufficient to cover all functions of the request call;
the request is forwarded to a container management platform or business module based on the request path.
In some embodiments, selectively forwarding the request to the container management platform or providing feedback to the gateway module based on the predetermined rules further comprises:
providing feedback to the gateway module in response to the secondary development function being sufficient to override all functions requested to be invoked;
and in response to the secondary development function not being enough to cover all functions called by the request, setting a request path of the request to point to the container management platform, and forwarding the request to the container management platform based on the request path.
In some embodiments, the method further comprises: after the request is forwarded to the container management platform based on the request path, the function called by the request, which is not covered by the secondary development function in the general functions, is also used for calling the specific container to process the request, and feedback is provided for the gateway module.
In some embodiments, re-implementing the generic functionality based on the updated container management platform includes: and regenerating the universal script for realizing the universal function based on the updated container management platform, and realizing the universal function based on the universal script again.
In some embodiments, the general-purpose function and the secondary development function are independent of each other, and the general-purpose script that implements the general-purpose function and the secondary development script that implements the secondary development function are also not coupled to each other.
A second aspect of an embodiment of the present invention provides a container calling apparatus, including:
a processor; and
a memory storing program code executable by the processor, the program code when executed performing the steps of:
receiving, by the gateway module, an access request for a particular container and forwarding the request to the authentication module in response to the request requiring authentication;
selectively forwarding, by the gateway module, the request to the container management platform or the service module based on a predetermined rule without requiring authentication in response to the request or the authentication module feeding back that the request passes authentication;
in response to forwarding the request to the container management platform, invoking a particular container using a generic function provided in the container management platform to process the request and provide feedback to the gateway module;
in response to forwarding the request to the service module, invoking a particular container using a secondary development function provided in the service module to process the request and further selectively forwarding the request to a container management platform or providing feedback for the gateway module based on predetermined rules;
and re-implementing the common function based on the updated container management platform in response to the update of the container management platform, and processing the request based on the re-implemented common function and the existing secondary development function.
In some embodiments, selectively forwarding, by the gateway module, the request to the container management platform or the traffic module based on the predetermined rule comprises: determining all functions requested to be called; in response to the generic function being sufficient to override all functions called by the request, setting a request path of the request to point to the container management platform; setting a request path of the request to be directed to the service module in response to the generic function not being sufficient to cover all functions of the request call; forwarding the request to a container management platform or a service module based on the request path;
and, further selectively forwarding the request to the container management platform or providing feedback to the gateway module based on the predetermined rules comprises: providing feedback to the gateway module in response to the secondary development function being sufficient to override all functions requested to be invoked; and in response to the secondary development function not being enough to cover all functions called by the request, setting a request path of the request to point to the container management platform and forwarding the request path to the container management platform based on the request path.
In some embodiments, re-implementing the generic functionality based on the updated container management platform includes: regenerating a universal script for realizing the universal function based on the updated container management platform, and realizing the universal function again based on the universal script; the universal function and the secondary development function are independent from each other, and the universal script for realizing the universal function and the secondary development script for realizing the secondary development function are not coupled with each other.
The invention has the following beneficial technical effects: according to the container calling method and device provided by the embodiment of the invention, the gateway module receives the access request aiming at the specific container, and responds to the request needing identity verification and forwards the request to the authentication module; selectively forwarding, by the gateway module, the request to the container management platform or the service module based on a predetermined rule without requiring authentication in response to the request or the authentication module feeding back that the request passes authentication; in response to forwarding the request to the container management platform, invoking a particular container using a generic function provided in the container management platform to process the request and provide feedback to the gateway module; in response to forwarding the request to the service module, invoking a particular container using a secondary development function provided in the service module to process the request and further selectively forwarding the request to a container management platform or providing feedback for the gateway module based on predetermined rules; the technical scheme that the universal function is realized again based on the updated container management platform in response to the update of the container management platform, and the request is processed based on the realized universal function and the existing secondary development function can separate the development function from the container management platform, reduce the update and maintenance workload and improve the maintenance work stability.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a container calling method according to the present invention;
fig. 2 is a schematic structural diagram of a container calling method provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In view of the above, a first aspect of the embodiments of the present invention provides an embodiment of a container calling method capable of separating a development function from a container management platform. Fig. 1 is a flowchart illustrating a container calling method provided by the present invention.
The container calling method, as shown in fig. 1, includes the following steps:
step S101: receiving, by the gateway module, an access request for a particular container and forwarding the request to the authentication module in response to the request requiring authentication;
step S103: selectively forwarding, by the gateway module, the request to the container management platform or the service module based on a predetermined rule without requiring authentication in response to the request or the authentication module feeding back that the request passes authentication;
step S105: in response to forwarding the request to the container management platform, invoking a particular container using a generic function provided in the container management platform to process the request and provide feedback to the gateway module;
step S107: in response to forwarding the request to the service module, invoking a particular container using a secondary development function provided in the service module to process the request and further selectively forwarding the request to a container management platform or providing feedback for the gateway module based on predetermined rules;
step S109: and re-implementing the common function based on the updated container management platform in response to the update of the container management platform, and processing the request based on the re-implemented common function and the existing secondary development function.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program to instruct relevant hardware to perform the processes, and the processes can be stored in a computer readable storage medium, and when executed, the processes can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like. Embodiments of the computer program may achieve the same or similar effects as any of the preceding method embodiments to which it corresponds.
In some embodiments, the authentication module feeding back that the request passes the identity verification comprises:
acquiring and communicably connecting a login interface of a container management platform and a service module;
feeding back a pass authentication in response to the request including legitimate identity information;
responding to the request which does not include legal identity information but includes a user name and a password, connecting the container management platform and the service module through a login interface by using the user name and the password, and responding to the successful connection and feeding back that the identity authentication is passed;
in response to the request not including legitimate identity information and not including the username and password, the feedback is not authenticated and causes the gateway module to reject the request.
In some embodiments, selectively forwarding, by the gateway module, the request to the container management platform or the traffic module based on the predetermined rule comprises:
determining all functions requested to be called;
in response to the generic function being sufficient to override all functions called by the request, setting a request path of the request to point to the container management platform;
setting a request path of the request to be directed to the service module in response to the generic function not being sufficient to cover all functions of the request call;
the request is forwarded to a container management platform or business module based on the request path.
In some embodiments, selectively forwarding the request to the container management platform or providing feedback to the gateway module based on the predetermined rules further comprises:
providing feedback to the gateway module in response to the secondary development function being sufficient to override all functions requested to be invoked;
and in response to the secondary development function not being enough to cover all functions called by the request, setting a request path of the request to point to the container management platform, and forwarding the request to the container management platform based on the request path.
In some embodiments, the method further comprises: after the request is forwarded to the container management platform based on the request path, the function called by the request, which is not covered by the secondary development function in the general functions, is also used for calling the specific container to process the request, and feedback is provided for the gateway module.
In some embodiments, re-implementing the generic functionality based on the updated container management platform includes: and regenerating the universal script for realizing the universal function based on the updated container management platform, and realizing the universal function based on the universal script again.
In some embodiments, the general-purpose function and the secondary development function are independent of each other, and the general-purpose script that implements the general-purpose function and the secondary development script that implements the secondary development function are also not coupled to each other.
The following further illustrates embodiments of the invention in accordance with the specific example shown in fig. 2.
Corresponding to fig. 2, the present invention includes a gateway apparatus (gateway module), an authentication apparatus (authentication module), and a service apparatus (service module). The business device is a device for secondary code development, comprises a code developed by the business device, and realizes the function which cannot be realized by a ran (container management platform); the gateway device distributes and identifies the request, selects whether to send the request to the rancher or the service device, and if finding that the request needs identity authentication, the gateway device requires the authentication device to be requested to perform authentication; the authentication device carries out identity authentication on the information carried by the request, judges whether the authentication can be passed or not, and informs the gateway device that the request is invalid if the authentication cannot be passed.
The method separates the rancher project from the code developed by the rancher project and divides the rancher project into two different projects. The gateway device distributes the request to the ran cher or the service device according to the request path. Setting a request path, wherein if the ranker can independently complete the request, the request path is set to directly access the ranker service; if the ranker cannot complete the request and additional operations are required, the request path is set to access the service device. The authentication device solves the identity problem of the ranker and the service device, and if the authentication is passed, the login interfaces of the ranker and the service device are respectively called, so that the two items can identify the identity. The specific implementation process is as follows:
1) when a request reaches a gateway device, it is first determined whether the request requires identity information. Forwarding the request to the authentication device if necessary; if the follow-up forwarding is not needed;
2) the authentication device judges whether the identity information is legal. If it is not
a. If the identity information is legal, the authenticated identity information is returned to the gateway device;
b. if the user name and the password are not legal but carried in the request (if the user name and the password are carried in the request, the login interface of the ran-cher and the login interface of the service device are called respectively, after login, the two pieces of identity information are combined into one, and the information is returned to the gateway device;
c. if the user name and the password are illegal, the user name and the password are not carried, the user is considered as illegal operation, the gateway device is warned, and the request is abandoned;
3) after passing the authentication or without the authentication, the gateway device distributes the request to the service device or the ran cher according to the rule;
4) if the request is distributed to the RANCHER, the RANCHER returns information to the gateway device after processing the request;
5) if the data is distributed to the service device;
a. if the service device can complete the request, the processing result is returned to the gateway device;
b. if the service device needs further processing by the ranker after operating, the request is transferred to the ranker processing, and the whole result is returned to the gateway device after the ranker processing.
As can be seen from the foregoing embodiments, the container calling method provided in the embodiments of the present invention receives, by a gateway module, an access request for a specific container, and forwards the request to an authentication module in response to the request requiring authentication; selectively forwarding, by the gateway module, the request to the container management platform or the service module based on a predetermined rule without requiring authentication in response to the request or the authentication module feeding back that the request passes authentication; in response to forwarding the request to the container management platform, invoking a particular container using a generic function provided in the container management platform to process the request and provide feedback to the gateway module; in response to forwarding the request to the service module, invoking a particular container using a secondary development function provided in the service module to process the request and further selectively forwarding the request to a container management platform or providing feedback for the gateway module based on predetermined rules; the technical scheme that the universal function is realized again based on the updated container management platform in response to the update of the container management platform, and the request is processed based on the realized universal function and the existing secondary development function can separate the development function from the container management platform, reduce the update and maintenance workload and improve the maintenance work stability.
It should be particularly noted that, the steps in the embodiments of the container calling method described above can be mutually intersected, replaced, added, or deleted, and therefore, these reasonable permutation and combination transformations should also fall within the scope of the present invention, and should not limit the scope of the present invention to the described embodiments.
In view of the above-mentioned objects, a second aspect of the embodiments of the present invention provides an embodiment of a container calling apparatus capable of separating development functions from a container management platform. The container calling device includes:
a processor; and
a memory storing program code executable by the processor, the program code when executed performing the steps of:
receiving, by the gateway module, an access request for a particular container and forwarding the request to the authentication module in response to the request requiring authentication;
selectively forwarding, by the gateway module, the request to the container management platform or the service module based on a predetermined rule without requiring authentication in response to the request or the authentication module feeding back that the request passes authentication;
in response to forwarding the request to the container management platform, invoking a particular container using a generic function provided in the container management platform to process the request and provide feedback to the gateway module;
in response to forwarding the request to the service module, invoking a particular container using a secondary development function provided in the service module to process the request and further selectively forwarding the request to a container management platform or providing feedback for the gateway module based on predetermined rules;
and re-implementing the common function based on the updated container management platform in response to the update of the container management platform, and processing the request based on the re-implemented common function and the existing secondary development function.
In some embodiments, selectively forwarding, by the gateway module, the request to the container management platform or the traffic module based on the predetermined rule comprises: determining all functions requested to be called; in response to the generic function being sufficient to override all functions called by the request, setting a request path of the request to point to the container management platform; setting a request path of the request to be directed to the service module in response to the generic function not being sufficient to cover all functions of the request call; forwarding the request to a container management platform or a service module based on the request path;
and, further selectively forwarding the request to the container management platform or providing feedback to the gateway module based on the predetermined rules comprises: providing feedback to the gateway module in response to the secondary development function being sufficient to override all functions requested to be invoked; and in response to the secondary development function not being enough to cover all functions called by the request, setting a request path of the request to point to the container management platform and forwarding the request path to the container management platform based on the request path.
In some embodiments, re-implementing the generic functionality based on the updated container management platform includes: regenerating a universal script for realizing the universal function based on the updated container management platform, and realizing the universal function again based on the universal script; the universal function and the secondary development function are independent from each other, and the universal script for realizing the universal function and the secondary development script for realizing the secondary development function are not coupled with each other.
As can be seen from the foregoing embodiments, the container invoking apparatus provided in the embodiments of the present invention receives, by the gateway module, an access request for a specific container, and forwards the request to the authentication module in response to the request requiring authentication; selectively forwarding, by the gateway module, the request to the container management platform or the service module based on a predetermined rule without requiring authentication in response to the request or the authentication module feeding back that the request passes authentication; in response to forwarding the request to the container management platform, invoking a particular container using a generic function provided in the container management platform to process the request and provide feedback to the gateway module; in response to forwarding the request to the service module, invoking a particular container using a secondary development function provided in the service module to process the request and further selectively forwarding the request to a container management platform or providing feedback for the gateway module based on predetermined rules; the technical scheme that the universal function is realized again based on the updated container management platform in response to the update of the container management platform, and the request is processed based on the realized universal function and the existing secondary development function can separate the development function from the container management platform, reduce the update and maintenance workload and improve the maintenance work stability.
It should be particularly noted that the above embodiment of the container calling apparatus employs the embodiment of the container calling method to specifically describe the working process of each module, and those skilled in the art can easily think that these modules are applied to other embodiments of the container calling method. Of course, since the steps in the embodiment of the container calling method may be intersected, replaced, added, or deleted, these reasonable permutations and combinations should also fall within the scope of the present invention, and should not limit the scope of the present invention to the embodiment.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of an embodiment of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (10)
1. A container calling method, comprising performing the steps of:
receiving, by a gateway module, an access request for a particular container and forwarding the request to an authentication module in response to the request requiring authentication;
selectively forwarding, by the gateway module, the request to a container management platform or a business module based on a predetermined rule in response to the request not requiring authentication or the authentication module feeding back that the request passes authentication;
in response to forwarding the request to the container management platform, invoking the particular container using a generic function provided in the container management platform to process the request and provide feedback for the gateway module;
in response to forwarding the request to the business module, invoking the particular container using a secondary development function provided in the business module to process the request and further selectively forwarding the request to the container management platform or providing feedback for the gateway module based on predetermined rules;
re-implementing the generic function based on the updated container management platform in response to an update of the container management platform, and processing the request based on the re-implemented generic function and the existing secondary development function.
2. The method of claim 1, wherein the authentication module feeding back that the request is authenticated comprises:
obtaining and communicably connecting a login interface of the container management platform and the service module;
feeding back a pass authentication in response to the request including legitimate identity information;
in response to the request not including legal identity information but including a username and password, connecting the container management platform and the service module through the login interface using the username and password, and in response to a successful connection, feeding back that authentication is passed;
in response to the request not including legitimate identity information and not including a username and password, feedback is not authenticated and the gateway module is caused to reject the request.
3. The method of claim 1, wherein selectively forwarding, by the gateway module, the request to a container management platform or a traffic module based on a predetermined rule comprises:
determining all functions called by the request;
in response to the generic function being sufficient to override all functions called by the request, setting a request path of the request to point to the container management platform;
in response to the generic function not being sufficient to cover all functions invoked by the request, setting a request path of the request to point to the traffic module;
forwarding the request to the container management platform or the business module based on the request path.
4. The method of claim 3, wherein selectively forwarding the request to the container management platform or providing feedback to the gateway module based on a predetermined rule further comprises:
providing feedback to the gateway module in response to the secondary development function being sufficient to override all functions called by the request;
in response to the secondary development function not being sufficient to cover all functions called by the request, setting a request path of the request to point to the container management platform, and forwarding the request to the container management platform based on the request path.
5. The method of claim 4, further comprising: after the request is forwarded to the container management platform based on the request path, the specific container is also called by using a function called by the request, which is not covered by the secondary development function, in the general functions to process the request, so as to provide feedback for the gateway module.
6. The method of claim 1, wherein re-implementing the generic functionality based on the updated container management platform comprises: and regenerating a universal script for realizing the universal function based on the updated container management platform, and realizing the universal function based on the universal script again.
7. The method of claim 6, wherein the generic function and the secondary development function are independent of each other, and wherein the generic script that implements the generic function and the secondary development script that implements the secondary development function are also uncoupled from each other.
8. A container recall device, comprising:
a processor; and
a memory storing program code executable by the processor, the program code when executed performing the steps of:
receiving, by a gateway module, an access request for a particular container and forwarding the request to an authentication module in response to the request requiring authentication;
selectively forwarding, by the gateway module, the request to a container management platform or a business module based on a predetermined rule in response to the request not requiring authentication or the authentication module feeding back that the request passes authentication;
in response to forwarding the request to the container management platform, invoking the particular container using a generic function provided in the container management platform to process the request and provide feedback for the gateway module;
in response to forwarding the request to the business module, invoking the particular container using a secondary development function provided in the business module to process the request and further selectively forwarding the request to the container management platform or providing feedback for the gateway module based on predetermined rules;
re-implementing the generic function based on the updated container management platform in response to an update of the container management platform, and processing the request based on the re-implemented generic function and the existing secondary development function.
9. The apparatus of claim 8, wherein selectively forwarding, by the gateway module, the request to a container management platform or a traffic module based on a predetermined rule comprises: determining all functions called by the request; in response to the generic function being sufficient to override all functions called by the request, setting a request path of the request to point to the container management platform; in response to the generic function not being sufficient to cover all functions invoked by the request, setting a request path of the request to point to the traffic module; forwarding the request to the container management platform or the business module based on the request path;
and further selectively forwarding the request to the container management platform or providing feedback to the gateway module based on predetermined rules comprises: providing feedback to the gateway module in response to the secondary development function being sufficient to override all functions called by the request; in response to the secondary development function not being sufficient to cover all functions called by the request, setting a request path of the request to point to the container management platform, and forwarding the request to the container management platform based on the request path.
10. The apparatus of claim 9, wherein the re-implementing the generic function based on the updated container management platform comprises: regenerating a universal script for realizing the universal function based on the updated container management platform, and realizing the universal function based on the universal script again; wherein the general-purpose function and the secondary development function are independent of each other, and the general-purpose script that realizes the general-purpose function and the secondary development script that realizes the secondary development function are not coupled to each other.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010745763.4A CN111984369B (en) | 2020-07-29 | 2020-07-29 | Container calling method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010745763.4A CN111984369B (en) | 2020-07-29 | 2020-07-29 | Container calling method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111984369A true CN111984369A (en) | 2020-11-24 |
CN111984369B CN111984369B (en) | 2022-11-22 |
Family
ID=73444398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010745763.4A Active CN111984369B (en) | 2020-07-29 | 2020-07-29 | Container calling method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111984369B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105354037A (en) * | 2015-11-30 | 2016-02-24 | 用友优普信息技术有限公司 | Modularized software developing method and software developing device |
CN105893045A (en) * | 2016-03-31 | 2016-08-24 | 金电技术开发中心 | Service assembly loading method and device and service assembly running system |
CN106202429A (en) * | 2016-07-13 | 2016-12-07 | 武大吉奥信息技术有限公司 | GIS cloud service based on mixing container with virtualized host provides method and device |
CN110912734A (en) * | 2019-10-31 | 2020-03-24 | 北京浪潮数据技术有限公司 | Method and device for realizing multi-dimensional gray scale release of container application by cloud management platform |
CN111143028A (en) * | 2019-12-13 | 2020-05-12 | 深圳微品致远信息科技有限公司 | LXC container-based SaaS platform implementation method and system |
-
2020
- 2020-07-29 CN CN202010745763.4A patent/CN111984369B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105354037A (en) * | 2015-11-30 | 2016-02-24 | 用友优普信息技术有限公司 | Modularized software developing method and software developing device |
CN105893045A (en) * | 2016-03-31 | 2016-08-24 | 金电技术开发中心 | Service assembly loading method and device and service assembly running system |
CN106202429A (en) * | 2016-07-13 | 2016-12-07 | 武大吉奥信息技术有限公司 | GIS cloud service based on mixing container with virtualized host provides method and device |
CN110912734A (en) * | 2019-10-31 | 2020-03-24 | 北京浪潮数据技术有限公司 | Method and device for realizing multi-dimensional gray scale release of container application by cloud management platform |
CN111143028A (en) * | 2019-12-13 | 2020-05-12 | 深圳微品致远信息科技有限公司 | LXC container-based SaaS platform implementation method and system |
Also Published As
Publication number | Publication date |
---|---|
CN111984369B (en) | 2022-11-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109510846B (en) | API calling system, method and device, electronic equipment and storage medium | |
US9690822B2 (en) | System and method for metadata level validation of custom setup objects | |
US10667123B2 (en) | Method for installing subscription profile, terminal, and server | |
CN111176858A (en) | Data request processing method and device | |
CN108416199B (en) | User permission control method and device of application and server | |
US9858065B2 (en) | Methods and systems for dynamic upgrade of an access manager | |
CN108965107B (en) | Friend adding method, device, system, client and server | |
CN111831365A (en) | Interface route forwarding method, system, computer equipment and readable storage medium | |
US9122718B2 (en) | Dynamic directory control execution | |
CN113872951B (en) | Hybrid cloud security policy issuing method and device, electronic equipment and storage medium | |
CN114386934A (en) | Method and device for generating business process, server and storage medium | |
CN111984369B (en) | Container calling method and device | |
CN113839865B (en) | Management method and system for cross-domain call service | |
CN113468446B (en) | Method, system and equipment for supporting identification of third party two-dimensional code data | |
US20130340054A1 (en) | Credential collection in an authentication server employing diverse authentication schemes | |
WO2021103644A1 (en) | Data structure, communication method and apparatus, storage medium and device | |
CN108052380B (en) | Business function docking method and device, computer equipment and storage medium | |
KR101351867B1 (en) | Method of handling step execution result in software and application control management object | |
CN115001718B (en) | Data processing method and device, computer equipment and readable storage medium | |
CN116760682B (en) | Log acquisition and filtration method, device, equipment and medium | |
US20240243931A1 (en) | Edge blockchain authentication | |
CN117391202B (en) | Method and system for obtaining analysis decision result based on central control knowledge graph | |
CN114756573B (en) | Data processing method, device and system | |
US20230319025A1 (en) | Methods and systems for implementing unique session number sharing to ensure traceability | |
CN117270950A (en) | Method, device, terminal equipment and storage medium for adding verification function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |