Cloud-native game cluster orchestration and governance method, device, equipment and storage medium
By transforming deployment intent into target configuration and using decoupled executors to generate and apply Kubernetes resources, and differentiating readiness status according to workload type, the distributed deployment problem of cloud-native game services is solved, realizing automated orchestration and traceable deployment process, and improving orchestration efficiency and accuracy.
Patent Information
- Application Number
- CN202611388514.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-27
AI Technical Summary
In a cloud-native environment, the deployment and management of game services are handled in a decentralized manner, resulting in the dispersion of game services, servers, versions, branches, initialization parameters, deployment plugins, namespaces, and cluster information. This makes it difficult to form an executable, auditable, and reusable deployment model, leading to a severe disconnect between business configuration and cluster resources, and restricting deployment efficiency and accuracy.
By transforming deployment intent into target configuration, decoupled executors are used to generate and apply resources, and readiness status is determined differently according to workload type, thus achieving closed-loop traceable automated orchestration from deployment intent to cluster activation.
It improves the orchestration efficiency of cloud-native game clusters, realizes closed-loop traceable automated orchestration from deployment intent to cluster activation, and solves the problems of inconsistent execution of deployment intent and untraceable state caused by the lack of a unified model and closed-loop mechanism in existing technologies.
Smart Images

Figure CN123167501A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technology, and in particular to cloud-native game cluster orchestration and management methods, apparatus, devices and storage media. Background Technology
[0002] Online game businesses typically feature multiple servers, namespaces, services, versions, configurations, and workload types. A single game project often includes multiple services such as login, gateway, combat, rooms, and chat. Different servers need to run in different Kubernetes namespaces or clusters, and there are complex relationships between services, including dependencies, joint deployments, cross-namespace access, and reuse of common services. Currently, in cloud-native environments, the deployment and management of game services typically adopt a decentralized approach: a configuration center or project management system maintains the game, servers, services, versions, branches, dependencies, and initialization parameters; a continuous integration system pulls code, builds images, uploads images, and generates deployment artifacts; operations personnel or deployment scripts generate Kubernetes YAML based on the configuration and submit it to the target cluster; separate maintenance tools perform routine maintenance, server shutdown, startup, restart, and custom jobs; and manual checks of logs, assessment of deployment status, handling of failure retries, configuration synchronization, and supplementary governance are performed. This model can complete basic deployment, but when the game project scales up, the number of namespaces increases, service dependencies become more complex, and maintenance windows shorten, the traditional approach reveals significant shortcomings. The main drawback of existing technologies is that game services, servers, versions, branches, initialization parameters, deployment plugins, namespaces, and cluster information are scattered across different systems, making it difficult to form an executable, auditable, and reusable deployment model. This results in a severe disconnect between business configuration and cluster resources, limiting deployment efficiency and accuracy.
[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main purpose of this application is to provide a method, apparatus, device and storage medium for orchestration and governance of cloud-native game clusters, aiming to solve the technical problem of cumbersome orchestration and governance processes for cloud-native games.
[0005] To achieve the above objectives, this application proposes a cloud-native game cluster orchestration and governance method, the method comprising: Receive a deployment request based on a target game application, and determine the target state configuration of the target game application based on the deployment request; A deployment task is created based on the target state configuration, and the deployment task is distributed to the target executor corresponding to the target game application; The target executor generates corresponding Kubernetes resources based on the target state configuration, and applies the Kubernetes resources to the target cluster. In the target cluster, a readiness determination is performed according to the workload type of the Kubernetes resource. Once the readiness determination determines that the workload is ready, the deployment success status is recorded.
[0006] In one embodiment, the step of determining the target state configuration of the target game application based on the deployment request includes: Parse the deployment request to determine the target namespace and the functional service to be deployed; Based on the service to be deployed, query and complete the dependent services and joint deployment services associated with the service to be deployed to determine the complete deployment scope; Obtain the namespace functional structure, initialization parameters, namespace configuration, and deployment plugin configuration of the target game application under the target namespace; The target state configuration is generated based on the complete deployment scope, the namespace functional structure, the initialization parameters, the namespace configuration, and the deployment plugin configuration.
[0007] In one embodiment, the step of querying and completing the dependent services and joint deployment services associated with the function service to be deployed, and determining the complete deployment scope, includes: Starting with the function service to be deployed, recursively query the function service structure to obtain the list of dependent functions and the list of jointly deployed functions of the function service to be deployed; The functional services in the dependent functional list and the joint deployment functional list are merged with the functional services to be deployed to remove duplicates and determine the complete deployment scope.
[0008] In one embodiment, the target state configuration includes service group definition, region / server definition, project configuration, version configuration, and deployment strategy configuration. The step of generating the target state configuration based on the complete deployment scope, the namespace functional structure, the initialization parameters, the namespace configuration, and the deployment plugin configuration includes: Map the functional services in the complete deployment scope to the corresponding service groups to generate the service group definitions; The target namespace, the service group definition, and the external service references across namespaces are combined to generate the region service definition; Based on the repository addresses and module paths of each service in the complete deployment scope, the runtime parameters are synthesized to generate the project configuration; The version configuration is generated based on the version number and branch information of each service in the complete deployment scope; The deployment strategy configuration is generated based on the executor name, plugin version, and build method in the deployment plugin configuration.
[0009] In one embodiment, the step of generating corresponding Kubernetes resources by the target executor according to the target state configuration includes: The workload type is determined based on the service export information in the target state configuration and the deployment plugin configuration; Container templates are generated based on the running parameters of each service dimension in the initialization parameters, and container templates belonging to the same workload are merged into multi-container workload templates. Generate corresponding Kubernetes resources based on the workload type and the multi-container workload template.
[0010] In one embodiment, before the step of generating the corresponding Kubernetes resources by the target executor according to the target state configuration, the method further includes: Get historical snapshots of the current deployment configuration; The target state configuration is compared with the historical snapshot to generate structured difference information, which includes differences in plug-in parameters, executor differences, version differences, and runtime parameter differences. In response to the presence of a blocking difference in the structured difference information, the deployment configuration process is aborted and the structured difference information is returned.
[0011] In one embodiment, the step of applying the Kubernetes resources to the target cluster includes: The deployment task is assigned to the task queue, and the status of the deployment task is set to pending. Based on the executor name of the target executor, a deployment task matching the target executor is retrieved; Based on the executor name and the status of the deployment task, a conditional match is performed, the matched deployment task is assigned to the target executor, and the status of the deployment task is updated to "processing".
[0012] Furthermore, to achieve the above objectives, this application also proposes a cloud-native game cluster orchestration and governance device, which includes: A configuration determination module is used to receive a deployment request based on a target game application and determine the target state configuration of the target game application based on the deployment request. The task distribution module is used to create deployment tasks according to the target state configuration and distribute the deployment tasks to the target executor corresponding to the target game application. The resource application module is used to generate corresponding Kubernetes resources according to the target state configuration through the target executor, and apply the Kubernetes resources to the target cluster; The readiness determination module is used to perform a corresponding readiness determination in the target cluster based on the workload type of the Kubernetes resource. When the readiness determination result determines that the workload is ready, the deployment success status is recorded.
[0013] In addition, to achieve the above objectives, this application also proposes a cloud-native game cluster orchestration and governance device, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the cloud-native game cluster orchestration and governance method described above.
[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the cloud-native game cluster orchestration and governance method described above.
[0015] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the cloud-native game cluster orchestration and governance method described above.
[0016] One or more technical solutions proposed in this application have at least the following technical effects: This application proposes a cloud-native game cluster orchestration and governance method, apparatus, device, and storage medium. It receives a deployment request based on a target game application, determines the target state configuration of the target game application based on the deployment request, creates a deployment task according to the target state configuration, and distributes the deployment task to the target executor corresponding to the target game application. The target executor generates corresponding Kubernetes resources according to the target state configuration and applies the Kubernetes resources to the target cluster. In the target cluster, a readiness determination is performed based on the workload type of the Kubernetes resources. When the readiness determination result indicates that the workload is ready, a deployment success status is recorded. By transforming deployment intent into target state configuration, using decoupled executors to complete resource generation and application, and differentiating readiness status according to workload type, a closed-loop, traceable, automated orchestration from deployment intent to cluster activation is achieved, improving orchestration efficiency. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating an embodiment of the cloud-native game cluster orchestration and governance method of this application. Figure 2 This is a schematic diagram of the module structure of the cloud-native game cluster orchestration and governance device according to an embodiment of this application; Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the cloud-native game cluster orchestration and governance method in this application embodiment.
[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0023] The main solution of this application embodiment is as follows: receiving a deployment request based on a target game application, determining the target state configuration of the target game application based on the deployment request; creating a deployment task according to the target state configuration, and distributing the deployment task to the target executor corresponding to the target game application; generating corresponding Kubernetes resources through the target executor according to the target state configuration, and applying the Kubernetes resources to the target cluster; performing a corresponding readiness determination in the target cluster according to the workload type of the Kubernetes resources, and recording a successful deployment status when the result of the readiness determination determines that the workload is ready.
[0024] In this embodiment, for ease of description, the following description will focus on the cloud-native game cluster orchestration and governance device.
[0025] Online game businesses typically feature multiple servers, namespaces, services, versions, configurations, and workload types. A single game project often includes multiple services such as login, gateway, combat, rooms, and chat. Different servers need to run in different Kubernetes namespaces or clusters, and there are complex relationships between services, including dependencies, joint deployments, cross-namespace access, and reuse of common services. Currently, in cloud-native environments, the deployment and management of game services typically adopt a decentralized approach: a configuration center or project management system maintains the game, servers, services, versions, branches, dependencies, and initialization parameters; a continuous integration system pulls code, builds images, uploads images, and generates deployment artifacts; operations personnel or deployment scripts generate Kubernetes YAML based on the configuration and submit it to the target cluster; separate maintenance tools perform routine maintenance, server shutdown, startup, restart, and custom jobs; and manual checks of logs, assessment of deployment status, handling of failure retries, configuration synchronization, and supplementary governance are performed. This model can complete basic deployment, but when the game project scales up, the number of namespaces increases, service dependencies become more complex, and maintenance windows shorten, the traditional approach reveals significant shortcomings. The main drawback of existing technologies is that game services, servers, versions, branches, initialization parameters, deployment plugins, namespaces, and cluster information are scattered across different systems, making it difficult to form an executable, auditable, and reusable deployment model. This results in a severe disconnect between business configuration and cluster resources, limiting deployment efficiency and accuracy.
[0026] This application provides a solution that improves orchestration efficiency by transforming deployment intent into target configuration, using decoupled executors to generate and apply resources, and differentiating readiness status according to workload type. This achieves closed-loop traceable automated orchestration from deployment intent to cluster activation.
[0027] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, a cloud-native game cluster orchestration and governance device, etc. The following description uses a cloud-native game cluster orchestration and governance device as an example to illustrate this embodiment and the subsequent embodiments.
[0028] Based on this, embodiments of this application provide a cloud-native game cluster orchestration and governance method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the cloud-native game cluster orchestration and governance method of this application.
[0029] In this embodiment, the cloud-native game cluster orchestration and governance method includes steps S11 to S14: Step S11: Receive a deployment request based on the target game application, and determine the target state configuration of the target game application based on the deployment request.
[0030] It should be noted that the cloud-native game cluster orchestration and governance method is applied to the cloud-native game cluster orchestration and governance platform. The cloud-native game cluster orchestration and governance platform is an integrated platform for online game business. It integrates game service configuration, namespace configuration, deployment strategy, build execution, Kubernetes resource generation, workload readiness determination, routine maintenance and audit logs into the same domain model and automated process, enabling game services to be automatically orchestrated, differentially verified, stably deployed and maintained in a multi-server, multi-namespace and multi-cluster environment.
[0031] Additionally, it's important to note that a deployment request is a structured instruction initiated by a user or upper-layer system to describe a game service deployment operation. It must include at least the application identifier of the target game application, the target Kubernetes namespace, and a set of identifiers for the functional services to be deployed. Target state configuration refers to a set of structured descriptive information generated by the platform based on the deployment request. This information fully defines the service group divisions, server deployment targets, service operation parameters, version information, and deployment strategies involved in a deployment operation. It includes five types of structured data: service group definition, server definition, project configuration, version configuration, and deployment strategy configuration. These configurations collectively constitute all the intent information required for the executor to complete the deployment. The target state configuration generation technology used here is essentially a declarative deployment intent modeling method. Instead of directly executing the user's deployment instructions, the platform first transforms the user's deployment intent into a structured target state description file. This description file then serves as the sole basis for all subsequent execution stages, ensuring consistency and traceability of the deployment intent across all stages.
[0032] Understandably, the purpose of this step is to transform the user-submitted deployment request from a vague description at the natural language or interface operation level into a structured target configuration that is understandable and executable by machines. This lays a unified semantic foundation for subsequent task creation, distribution, and execution. The principle is to generate a complete target configuration by parsing key parameters in the deployment request and combining them with the platform's pre-maintained game-level, namespace-level, and service-level configurations, according to preset synthesis rules. Once generated, this configuration is immutable, meaning it will not be modified during subsequent deployment and execution. All execution steps are based on this configuration, effectively solving the problems of information attenuation and semantic ambiguity caused by the lack of a unified model when transmitting deployment intentions between multiple systems in existing technologies. This makes the entire deployment process deterministic and reproducible.
[0033] Specifically, upon receiving a deployment request, the cloud-native game cluster orchestration and governance platform first verifies the request's legitimacy, including checking the existence of the application identifier, whether the target namespace has been configured, and whether the service to be deployed has been registered on the platform. After successful verification, the platform uses the application identifier and namespace as indexes to query the game application's namespace functional structure, initialization parameters, namespace configuration, and deployment plugin configuration within that namespace. Then, according to service group division rules, server combination rules, parameter synthesis rules, version generation rules, and deployment strategy generation rules, it synthesizes the various queried configurations into a complete target configuration. During configuration synthesis, if a parameter is defined at multiple levels (game-level, namespace-level, service-level), it is overridden according to preset priority rules—service-level parameters override namespace-level parameters, namespace-level parameters override game-level parameters, and uncovered parameters retain their values from the previous level, thus forming a complete configuration.
[0034] Step S12: Create a deployment task according to the target state configuration, and distribute the deployment task to the target executor corresponding to the target game application.
[0035] It's important to note that a deployment task refers to an executable work unit generated by the platform to perform a deployment operation. It includes all the target state configuration information, as well as metadata such as task identifier, task status, operator, and creation time. A target executor is an independent process running on or network-reachable from the target cluster. It is responsible for the actual execution of the deployment task's building, resource generation, and application operations. Each executor has a unique executor name and is bound to one or more namespaces. The task distribution mechanism used here is essentially a pull-based task allocation model. The control plane is responsible for creating tasks and persisting them to a task queue. However, the control plane does not actively push tasks to the executors. Instead, the executors periodically query the control plane and pull tasks matching their own names. This model eliminates the need for the control plane to maintain long-lived connections with each executor or to monitor the executor's network reachability and liveness.
[0036] Understandably, the purpose of this step is to transform the target configuration from a static descriptive document into a schedulable, traceable, dynamic execution unit, and reliably deliver it to the executor capable of executing the task, thereby decoupling the control plane from the execution plane. The principle is that when the control plane creates a deployment task, it assigns a globally unique deployment ID to the target configuration, initializes the task status to pending, and then persists the task to a shared task queue. The executor retrieves tasks periodically, and the control plane uses a conditional update mechanism when allocating tasks to ensure that each task is successfully preempted and executed by only one executor, thus avoiding duplicate task consumption. This decoupling mechanism eliminates the need for a direct network connection between the control plane and the executor; the executor only needs to access the control plane's API interface to function properly, effectively reducing network coupling and credential management complexity between the console and each target cluster in a multi-cluster environment.
[0037] Specifically, the control plane encapsulates the generated target state configuration into a deployment task structure. This structure includes fields such as application identifier, namespace, deployment ID, deployment service list, operator, whether to use the new version, whether to notify, task status, deployment configuration set, executor name, namespace alias, and last update time. The deployment configuration set is the generated target state configuration, including service group definition, region / server definition, project configuration, version configuration, and deployment strategy configuration. The control plane persists this task structure to the task table in the database and sets the task status to "pending." Subsequently, the executor bound to this namespace sends a pull request to the control plane's API interface at preset time intervals (e.g., every 5 seconds), carrying the executor's own name in the request. Upon receiving the pull request, the control plane queries the task table for deployment tasks with a "pending" status and whose executor name matches the executor name in the request. If a matching task exists, the control plane updates the task's status to "processing" through an atomic database update operation and returns the task content to the executor, thus completing the task allocation.
[0038] Step S13: The target executor generates corresponding Kubernetes resources according to the target state configuration, and applies the Kubernetes resources to the target cluster.
[0039] It's important to note that Kubernetes resources refer to structured objects that conform to the Kubernetes resource specification, including but not limited to standard resource types such as Namespace, Deployment, StatefulSet, Service, ConfigMap, PersistentVolumeClaim, and HorizontalPodAutoscaler (HPA), as well as custom resource types such as GameServerSet. The target cluster refers to the Kubernetes cluster to which the target namespace belongs. When executing deployment tasks, the executor uses the cluster access credentials (kubeconfig) bound to that namespace to communicate with the API Server of the target cluster. Generating the corresponding Kubernetes resources means that the executor, based on the service group definitions, project configurations, version configurations, and deployment policy configurations in the target configuration, and according to preset resource templates and transformation rules, converts the business-level service definitions into a Kubernetes-level resource list. This transformation process includes workload type selection, container template population, generation of auxiliary resources such as Services and HPAs, and merging of multi-container workloads. Applying resources to the target cluster means that the executor submits the generated resource list to the target cluster by calling the create or update interface of the Kubernetes API Server. The Kubernetes cluster then uses the resource list to schedule Pods, start containers, and expose services.
[0040] Understandably, the purpose of this step is to convert the target-state configuration within the platform into resource objects that the Kubernetes cluster can recognize and execute, and then deploy these resources to the target cluster via API calls, thereby achieving a continuous mapping from business configuration to cluster resources. The principle is that after the executor loads the target-state configuration, it first divides each functional service into different service groups according to the service group definitions in the configuration. Then, based on the GameServerSet switch and service export information in the deployment strategy configuration, it determines the workload type that should be generated for each service group. Next, it fills the container template with the runtime parameters (image address, startup command, port, resource specifications, environment variables, health checks, etc.) in the project configuration. Finally, it merges multiple containers belonging to the same workload into a multi-container workload template and generates a complete Kubernetes resource manifest. After generating the resource manifest, the executor submits it to the target cluster sequentially according to a preset submission order (first basic resources such as Namespace and ConfigMap, then network resources such as Service, then workload resources such as Deployment, and finally HPA), and records the operation results after each submission, thereby achieving atomicity and observability of resource generation and application.
[0041] Specifically, after receiving the assigned deployment task, the executor first creates a local working directory and loads the target state configuration. Then, it generates Kubernetes resources according to the following steps: First, based on the service group definition in the target state configuration, it groups all functional services within the full deployment scope into several service groups according to their repository address and build type. Second, for each service group, it determines the workload type based on its service export information and the GameServerSet switch in the deployment strategy configuration—if the service export conforms to the stateful service rules (e.g., the service name ends with -stateful or contains a specific tag), then StatefulSet is selected; if the GameServerSet switch is enabled in the deployment strategy configuration, then GameServerSet is selected; otherwise, Deployment is selected. Third... For each functional service in the service group, a container template is generated based on the runtime parameters in the project and version configurations. The container template includes the container name, image address, startup command, port list, environment variables, CPU and memory request and limit values, ready probe configuration, storage volume mount configuration, and scheduling constraints such as node selectors and tolerances. Fourth, if multiple functional services belong to the same workload, their container templates are merged into a multi-container workload template, and the main service container (used for Service port exposure) is marked. Fifth, workload resources of the corresponding type are generated based on the determined workload type and the multi-container workload template. Sixth, Service resources are generated based on the service export information in the service group. If the workload type is StatefulSet, Headless Service resources are also generated. Seventh, if auto-scaling is enabled in the deployment strategy configuration, HPA resources are generated. After resource generation, the executor loads the target cluster's kubeconfig credentials and calls the Kubernetes API Server's apply interface to submit the resources to the target cluster sequentially.
[0042] Step S14: In the target cluster, perform the corresponding readiness determination according to the workload type of the Kubernetes resource. When the result of the readiness determination determines that the workload is ready, record the deployment success status.
[0043] It's important to note that readiness determination refers to the process by which the executor, after submitting Kubernetes resources to the target cluster, continuously monitors created or updated workloads (Deployments, StatefulSets, or GameServerSets). Based on the readiness semantics of different workload types, it checks whether their status fields meet preset readiness conditions, thus determining whether the workload has successfully started and is providing services. Workload types refer to different resource types used in Kubernetes to manage Pod replicas. Deployments are suitable for stateless services, StatefulSets are suitable for stateful services (requiring stable network identifiers and storage), and GameServerSets are custom resources specifically for game server management. Different types of workloads have different readiness semantics: Deployment readiness depends on the availableReplicas and updatedReplicas fields; StatefulSet readiness depends on the alignment of currentRevision and updateRevision and the readyReplicas field; and GameServerSet readiness combines the characteristics of both types. Recording a successful deployment status means that once all workloads to be deployed have met the readiness conditions, the executor updates the final status of the deployment task to successful and synchronizes this status to the control plane, thus completing a full deployment loop.
[0044] Understandably, the purpose of this step is to ensure the true validity of the deployment operation—submitting resources to the cluster is only the first half of the deployment; the actual startup and availability of the workload is the true completion of the deployment. By using differentiated readiness judgment logic for different types of workloads, the actual running status of various services in the cluster can be accurately reflected, avoiding the misleading situation of equating resource submission with service availability. The principle is that after submitting resources, the executor enters a polling monitoring phase, calling the Kubernetes API at preset time intervals (e.g., every 10 seconds) to read the status sub-resources of the corresponding workload. Different combinations of status fields are extracted for different types of workloads for judgment. Only when all workloads meet their respective readiness conditions and remain stable for a period of time (to prevent instantaneous fluctuations) is the task marked as successful. This differentiated readiness judgment mechanism effectively solves the misjudgment problem caused by scripts judging deployment status in a single way (e.g., only checking if the Pod is running) in existing technologies. For example, a StatefulSet Pod may be running but the version has not yet completed rolling updates, or a GameServerSet game server has not yet completed initialization. Differentiated judgment logic can accurately capture these intermediate states, ensuring the authenticity and reliability of the deployment success status record.
[0045] Specifically, after successfully submitting all generated Kubernetes resources to the target cluster, the executor enters the workload readiness determination phase. The executor first obtains a list of all workload resources involved in this deployment, including their type, namespace, and name. Then, the executor polls the status of each workload at preset time intervals (e.g., every 10 seconds), executing different determination logic based on the workload type: For Deployment type resources, the executor reads the observedGeneration (observed version number), updatedReplicas (number of updated replicas), replicas (number of replicas), and availableReplicas (number of available replicas) fields in its status. If observedGeneration is not less than metadata.generation (metadata.version number, indicating the controller has perceived the latest configuration), and updatedReplicas, replicas, and availableReplicas are all equal to the expected number of replicas, the Deployment is confirmed to be ready; for StatefulSet type resources, the executor reads the observedGeneration, currentRevision, and currentRevision fields in its status. The `updateRevision` and `readyReplicas` fields are checked. If `observedGeneration` is not less than `metadata.generation`, `currentRevision` matches `updateRevision` (indicating the update is complete), and `readyReplicas` equals the expected number of replicas, then the StatefulSet is considered ready. For GameServerSet resources, the executor reads the `observedGeneration`, `updatedReplicas`, and `readyReplicas` fields from its status. If `observedGeneration` is not less than `metadata.generation`, and both `updatedReplicas` and `readyReplicas` equal the expected number of replicas, then the GameServerSet is considered ready. Once all workloads have met their respective readiness conditions, the executor updates the final status of the deployment task to success and posts the status back to the control plane persistent storage. If a workload is still not ready within the preset timeout period (e.g., 300 seconds), the executor collects the condition information of the unread workload, the waiting reason of the abnormal Pod, and the most recent events, marks the task status as failed, and returns detailed failure information.
[0046] This embodiment, through the above-described scheme, transforms deployment requests into target state configurations, uses decoupled executors to complete resource generation and application, and differentiates readiness status according to workload type. It achieves closed-loop, traceable, and automated orchestration from deployment intent input to cluster resource activation. This effectively solves the technical problems in existing technologies, such as inconsistent deployment intent execution, untraceable status, and difficulty in recovering from anomalies, caused by the lack of a unified model and closed-loop mechanism between business configuration, deployment execution, and cluster governance. It achieves the technical effects of automation, observability, and auditability in the game service deployment process in multi-server and multi-cluster environments.
[0047] Based on the above implementation scheme, in one feasible implementation, the step of determining the target state configuration of the target game application based on the deployment request includes S21~S24: Step S21: Parse the deployment request to determine the target namespace and the functional service to be deployed.
[0048] It's important to note that parsing the deployment request refers to the platform's structured decomposition of the received raw deployment request data, extracting the key parameters required for the deployment operation. The target namespace is the target Kubernetes namespace for this deployment, typically corresponding to a specific server (e.g., ns-101 represents server 101) or environment (e.g., dev, test, prod) in a multi-server game scenario. The service to be deployed refers to the set of service identifiers explicitly specified by the user in the deployment request. A service is a deployable business capability unit managed by the platform, which can correspond to one or more actually running service processes or container modules. The request parsing technology used here is essentially a parameter extraction and verification method. When parsing the deployment request, the platform not only extracts parameter values but also verifies the validity of each parameter—for example, verifying whether the target namespace has been configured on the platform and whether the service to be deployed has been registered in the platform's service structure. This intercepts invalid requests at the very beginning of the deployment process, preventing them from entering subsequent processes and wasting resources.
[0049] Understandably, the purpose of this step is to accurately extract the core information—which service to deploy in which namespace—from the user-submitted deployment request, providing clear index parameters for subsequent dependency completion and configuration queries. The principle is that the deployment request, as the input to the entire deployment process, directly determines the correctness of all subsequent steps. By performing structured parsing and validity checks on the request, it can be ensured that the parameters used in subsequent steps are accurate and valid, thereby avoiding deployment failures due to incorrect parameters.
[0050] Specifically, upon receiving a deployment request, the cloud-native game cluster orchestration and governance platform first parses the request body's data structure, extracting the application identifier (appId), target namespace, and list of functions to be deployed (functionIds). Then, using the application identifier and target namespace as a composite index, the platform queries the database to check if a corresponding namespace configuration record exists. If not, it returns an error message indicating that the target namespace is not configured. Next, using the identifier of each function to be deployed as an index, it queries the function service structure cache to check if a corresponding function service record exists. If it exists, it retrieves the detailed information of that function service (including repository address, build type, service list, etc.). If a function service identifier does not exist, it returns an error message indicating that the function service is not registered.
[0051] Step S22: Based on the function service to be deployed, query and complete the dependent services and joint deployment services associated with the function service to be deployed, and determine the complete deployment scope.
[0052] It's important to clarify that dependent services refer to other functional services that the deployed service depends on for its normal operation. For example, a logic service might depend on authentication and configuration services; if these dependent services are not deployed, the deployed service will not function correctly. Jointly deployed services refer to other functional services bound to the deployed service within the same deployment action. These typically belong to the same workload (e.g., multiple containers within a Pod) or need to be deployed within the same time window. Query completion refers to the process by which the platform, starting with the deployed service, recursively queries the dependency and joint deployment relationship definitions within the functional service structure to include all directly and indirectly related functional services in the deployment scope. The complete deployment scope refers to the deduplicated set of all functional services actually required for this deployment, obtained after dependency and joint deployment completion. The query completion technique used here is essentially a closure calculation method based on graph traversal. The dependency and joint deployment relationships in the functional service structure constitute a directed graph. Starting with the deployed service, a depth-first or breadth-first traversal is performed, adding all visited nodes to the set until no further expansion is possible, thus obtaining the closure of that starting point on the dependency graph.
[0053] Understandably, the purpose of this step is to avoid omissions or errors caused by users manually identifying and selecting dependent services and joint deployment services during deployment. An automated completion mechanism ensures the integrity and correctness of the deployment scope. The principle is that game services often have complex dependencies and joint deployment agreements. Manually maintaining these relationships and selecting them for each deployment is not only inefficient but also prone to causing service startup failures after deployment due to the omission of a dependent service or runtime errors due to dependency version mismatches. This step pre-maintains dependencies and joint deployment relationships within the functional service structure, allowing the platform to automatically perform closure calculations during deployment, thereby ensuring the integrity of the deployment scope from a fundamental mechanism perspective.
[0054] Specifically, the platform takes each functional service in the list of services to be deployed as a starting point and performs the following recursive query operation: First, read the joint deployment functional list of the current functional service from the functional service structure and add all functional services in the list to the queue to be traversed; Second, read the dependent functional list of the current functional service from the functional service structure and add all functional services in the list to the queue to be traversed; Third, for each functional service added to the queue to be traversed, repeat steps one and two until all functional services in the queue to be traversed have been processed and no new functional services have been added to the queue; Fourth, merge the original list of services to be deployed with all functional services added to the queue and deduplicate the functional IDs to obtain the complete deployment scope of this deployment.
[0055] Step S23: Obtain the namespace functional structure, initialization parameters, namespace configuration, and deployment plugin configuration of the target game application under the target namespace.
[0056] It's important to note that the namespace functional structure describes the activation information of a specific service within a namespace, including its version number, branch, service version, and selected dependencies. Initialization parameters describe various configuration parameters for service runtime, including replica count, CPU and memory request and limit values, environment variables, Java startup parameters, custom startup commands, service port, health check configuration, storage mount configuration, node selector, and scheduling constraints. Namespace configuration describes the cluster attributes of the target namespace, including data center identifier, executor name, namespace alias, public service reference configuration, and cross-namespace service mapping. Deployment plugin configuration describes the deployment strategy bound to this namespace, including executor name, plugin version, build method, whether to use GameServerSet, and notification configuration. The configuration retrieval technology used here is essentially a multi-level configuration aggregation query method. The platform uses application identifier and namespace as indexes to read four types of configuration structures from different data tables. These configurations are interconnected in the data model but stored in different tables, requiring separate queries before being synthesized in subsequent steps.
[0057] Understandably, the purpose of this step is to collect all the raw materials needed to generate the target configuration, namely, the configuration parameters of each functional service within the defined complete deployment scope that actually take effect under the target namespace. The principle is that the multi-server nature of game operations means that the same functional service may have different versions, branches, and runtime parameters under different namespaces (for example, the test server uses the development branch and the number of small replicas, while the production server uses the release branch and the number of large replicas). Therefore, the deployment configuration must be obtained differentially at the namespace level to ensure that the generated configuration accurately matches the actual needs of the target server.
[0058] Specifically, the platform uses the application identifier and target namespace as a composite index to query and retrieve the namespace functional structure from the database. This structure contains information such as the function ID, version number, branch, service version, and initialization parameter references for all enabled functional services under that namespace. Then, for each functional service within the defined complete deployment scope, the platform queries the corresponding initialization parameter structure using its function ID and namespace as an index to obtain runtime parameters such as the number of replicas, resource specifications, environment variables, and health checks for that service under that namespace. Next, the platform queries the namespace configuration structure using the application identifier and target namespace as an index to obtain information such as the data center identifier, executor name, and cross-namespace service mappings for that namespace. Finally, the platform queries the deployment plugin configuration structure using the application identifier and target namespace as an index. If an explicit plugin configuration exists under that namespace, it is used directly; otherwise, the game-level default plugin configuration of the game application is inherited.
[0059] Step S24: Generate the target state configuration based on the complete deployment scope, the namespace functional structure, the initialization parameters, the namespace configuration, and the deployment plugin configuration.
[0060] It's important to note that the target configuration is a complete structured description of this deployment, comprising five components: service group definition, server / region definition, project configuration, version configuration, and deployment strategy configuration. Generating the target configuration is essentially a multi-dimensional data aggregation and transformation process. It uses the four types of configuration structures as input, following preset synthesis rules and transformation templates, to generate five standardized configuration outputs. Once generated, this configuration cannot be changed and becomes the sole data source for subsequent task creation and execution.
[0061] Understandably, the purpose of this step is to aggregate the obtained scattered configuration information (namespace functional structure, initialization parameters, namespace configuration, and deployment plugin configuration) into a complete, structured, and standardized target configuration, thereby providing a unified and self-contained configuration description for subsequent deployment execution. The principle is that although the preceding steps have obtained all the configuration raw materials required for deployment generation, these raw materials are scattered across different data structures, each with different granularity and format. A comprehensive aggregation and transformation operation is needed to form a standardized configuration that the executor can directly consume.
[0062] Specifically, first, each functional service in the full deployment scope is mapped to a corresponding service group based on its repository address and build type, and the path and build type of the module to which each service belongs are recorded to generate a service group definition. Second, the target namespace, data center identifier, service group definition, and cross-namespace external service references defined in the namespace configuration are combined into a server definition. Then, for each service module in the full deployment scope, the final runtime parameters are synthesized according to the priority order of global default parameters, game-level default parameters, namespace overriding parameters, and service-level overriding parameters to generate the project configuration. Next, version configuration is generated based on the version number and branch information of each functional service. Finally, deployment strategy configuration is generated based on the executor name, plugin version, and build method in the deployment plugin configuration. The above five types of configurations together constitute the complete target state configuration.
[0063] This embodiment, through the above-described scheme, decomposes the process of determining the target state configuration into four sub-steps: parsing requests to determine namespaces and services, completing dependencies to determine the complete scope, obtaining four types of configuration structures, and generating five types of target state configurations. It establishes a complete conversion link from user deployment intent to standardized target state configuration, effectively solving the problems of incomplete configuration and missing dependencies caused by configurations being scattered across different systems and dependencies requiring manual maintenance in existing technologies.
[0064] Based on the above implementation scheme, in one feasible implementation, the step of querying and completing the dependent services and joint deployment services associated with the functional service to be deployed, and determining the complete deployment scope, includes S31~S32: Step S31: Starting with the function service to be deployed, recursively query the function service structure to obtain the list of dependent functions and the list of jointly deployed functions of the function service to be deployed.
[0065] It's important to note that recursive querying is an algorithm that traverses a tree or graph structure layer by layer downwards. In this step, starting with the service to be deployed, a depth-first traversal is performed on the dependency graph formed by the service structure. For each node visited, its outgoing edges (dependencies and joint deployment relationships) point to adjacent nodes, and these adjacent nodes are added to the queue to be visited, until all reachable nodes have been visited. The service structure is a data structure in the platform that stores the metadata of the service, including the list of jointly deployed services and the list of dependent services. The recursive querying technique used here is essentially a graph traversal algorithm (depth-first search or breadth-first search). Starting from one or more starting nodes in the directed dependency graph, it visits all reachable nodes along the directed edges, forming a closure set.
[0066] Understandably, the purpose of this step is to extract all functional services from the functional service structure that have direct or indirect dependencies and joint deployment relationships with the functional service to be deployed, ensuring that no service related to the service to be deployed is missed during the deployment process. The principle is that in complex game systems, the dependencies between services may form multi-level dependency chains—for example, service A depends on service B, and service B depends on service C. If only one level of dependency is queried, service C will be missed, causing A to malfunction after deployment due to the lack of C. By recursively querying all levels of dependencies and joint deployment relationships, a complete dependency closure can be obtained, ensuring the completeness of the deployment scope from a mechanism perspective.
[0067] Specifically, a queue and a set are created, and all functional service identifiers from the list of services to be deployed are added to the queue and set, respectively. Then, the platform loops through the following operations until the queue is empty: A functional service identifier is retrieved from the head of the queue; using this identifier as an index, the functional service structure is queried, and the list of dependent functions and the list of jointly deployed functions are read from the structure; for each functional service identifier in the list of dependent functions and the list of jointly deployed functions, it is checked whether it already exists in the set; if not, it is added to the end of the set and the queue. After the loop ends, all functional service identifiers stored in the set represent all relevant functional services reachable from the service to be deployed.
[0068] Step S32: Merge and deduplicate the functional services in the dependent functional list and the joint deployment functional list with the functional services to be deployed to determine the complete deployment scope.
[0069] It's important to note that merging and deduplication refers to combining multiple lists of functional services into a single set, eliminating duplicate elements, and ensuring that each functional service appears only once in the final set. The complete deployment scope is the unique set of all functional services that actually need to be processed in this deployment. The merging and deduplication technique used here is essentially a union operation of sets. That is, using the list of functional services to be deployed as the initial set, all functional services within dependency and joint deployment relationship closures are added to this set, and deduplication is performed using the uniqueness of the functional IDs to obtain the final closure set.
[0070] Understandably, the purpose of this step is to eliminate duplication caused by overlapping dependencies between services, ensuring that each service appears only once in the complete deployment scope. This avoids resource conflicts or configuration overwriting caused by repeated processing of the same service when generating deployment configurations later. The principle is that in complex dependency graphs, multiple services may jointly depend on the same basic service (e.g., multiple business services simultaneously depend on redis-service). Without deduplication, this basic service will be added repeatedly in the deployment configuration, leading to conflicts when generating Kubernetes resources later. By using a set deduplication operation based on function IDs, the service selected by the user and all related services recursively queried can be merged into a complete set without duplication, ensuring the completeness of the deployment scope while avoiding redundant processing.
[0071] Specifically, after completing the recursive query, the platform exports all functional service identifiers in the obtained set as a functional service list. Then, using the functional ID as the key, the platform removes duplicates from all elements in the list; if the same functional ID appears multiple times in the list, only one instance is retained. The deduplicated list represents the complete deployment scope.
[0072] This embodiment, through the above-described scheme, achieves automated expansion from a user-selected partial service to the complete deployment scope by recursively querying dependency functions and performing deduplication after merging. This effectively solves the problems of missed services and duplicate deployments caused by the need for manual maintenance and selection of dependencies in existing technologies.
[0073] Based on the above implementation scheme, in one feasible implementation, the target state configuration includes service group definition, region / server definition, project configuration, version configuration, and deployment strategy configuration. The step of generating the target state configuration based on the complete deployment scope, the namespace functional structure, the initialization parameters, the namespace configuration, and the deployment plugin configuration includes S41~S45: Step S41: Map the functional services in the complete deployment scope to the corresponding service groups to generate the service group definitions.
[0074] It's important to note that service groups are logical groups formed by merging functional services based on repository address and build type. Functional services within the same service group typically reside in the same code repository and use the same build tools and processes. The service group definition is the first type of configuration in the target configuration, recording information such as the identifier of each service group, the list of functional services it contains, the repository address, the build type, and the path of the module to which each service belongs. The service group partitioning technique used here is essentially a metadata-based classification and aggregation method. It utilizes the repository address and build type fields in the functional service structure as grouping keys, merging all functional services into the same service group based on the same repository address and build type. This provides a basis for subsequent code checkout and image building based on repository aggregation.
[0075] Understandably, the purpose of this step is to group numerous functional services by code repository, enabling subsequent code checkout and image building to be aggregated by repository, avoiding the time wasted by multiple checkouts and builds of the same repository. The principle is that multiple service modules within the same code repository are typically managed in the same project, sharing the same build configurations and dependencies. Performing separate code checkouts and builds for each service within the same repository not only generates significant repetitive I / O and network overhead but can also lead to inconsistencies in the build environment. By dividing into service groups, the executor can perform a single code checkout and build for all services within the same service group, then generate multiple images, significantly improving deployment efficiency.
[0076] Specifically, for each functional service within the complete deployment scope, the platform reads the repository address and build type from its functional service structure, using "repository address + build type" as the combined grouping key, and groups functional services with the same grouping key into the same service group. For each service group, the platform generates a service group definition, including: a unique identifier for the service group, repository address, build type, and a list of included functional services (each service records its functional ID, module path, and service export information).
[0077] Step S42: Combine the target namespace, the service group definition, and the external service references across namespaces to generate the region service definition.
[0078] It's important to note that the region / service definition is the second type of configuration in the target configuration. It describes the overall deployment structure of the target region / service (i.e., the target namespace) for this deployment, including the target namespace identifier, data center (IDC), the list of included service groups, and the list of external service references across namespaces. External service references refer to services that need to be accessed within the current namespace but are actually deployed in other namespaces. The platform converts these to ExternalName Services, allowing business services within this namespace to access these external services through stable Kubernetes internal domain names. The region / service definition generation technology used here is essentially a structured description method for deployment targets. It associates and combines the attribute information of the target namespace with the service group definition, while also incorporating the external service references defined in the namespace configuration, forming a complete description of the target region / service.
[0079] Understandably, the purpose of this step is to structurally integrate the target location information (namespace and IDC) with the content information (service group and external service references) to provide the executor with a complete server-level description of where and what content is deployed. The principle is that in a multi-server game scenario, different servers may be located in different IDCs, use different executors, and access different public service sets. The server definition aggregates this scattered information into a unified descriptive structure, allowing the executor to obtain the complete server deployment context without querying multiple configuration sources separately.
[0080] Specifically, the platform queries the namespace configuration using the target namespace as an index to obtain the data center identifier, executor name, and cross-namespace service mapping list for that namespace. Then, the platform incorporates all generated service group definitions into the service group list of the zone service definition. For cross-namespace service mappings defined in the namespace configuration, the platform records each external service in the namespace / service name format into the external service reference list of the zone service definition. The zone service definition also includes namespace aliases (if configured) to display a user-friendly zone service name in execution logs and notifications.
[0081] Step S43: Based on the repository addresses and module paths of each service in the complete deployment scope, synthesize the running parameters and generate the project configuration.
[0082] It's important to note that runtime parameters are the actual configuration parameters used by the service at runtime, including image address, startup command, port, environment variables, resource specifications (requested and limited values for CPU and memory), health check configuration, storage mount configuration, node selector, and scheduling constraints. Project configuration is the third type of configuration in the target state configuration, organized by service module dimension, recording the complete runtime parameters for each service module. The runtime parameter synthesis technique used here is essentially a multi-level configuration inheritance and overriding method. The platform merges parameters layer by layer according to the priority order of global default parameters → game-level default parameters → namespace-level overriding parameters → service-level overriding parameters. The parameter value of the later level overwrites the parameter value of the same name in the previous level, and the fields that are not overridden retain the values of the previous level, ultimately forming a complete parameter configuration.
[0083] Understandably, the purpose of this step is to merge the runtime parameters scattered across different levels (global, game, namespace, service) into a single final parameter configuration. This allows the executor to directly use this complete configuration when generating container templates, without repeatedly querying and calculating across multiple levels. The principle behind this is that the multi-server nature of game services means that different servers may have different parameter requirements for the same service—for example, the official server uses a larger number of replicas and resource specifications, while the test server uses a smaller number of replicas and resource specifications. Configuring all parameters at the service level would result in extremely high management costs. Through a multi-level inheritance and overriding configuration model, the platform allows configuring default parameters at the game level, differential parameters at the namespace level, and special parameters at the service level. These are automatically synthesized into the final parameters during deployment, reducing configuration redundancy while ensuring flexibility.
[0084] Specifically, the following parameter compositing operation is performed on each service module within the full deployment scope: First, the repository address and module path in the service's functional service structure are read as basic identifiers for the project configuration. Second, global default parameters are loaded (platform-level preset default values, such as a default replica count of 1 and a default CPU request count of 0.5 cores). Third, game-level default parameters are overridden with global default parameters (default values for game application A-level configurations, such as a default replica count of 2 for all services in the game). Fourth, namespace-level parameters from the target namespace are overridden (namespace ns-101 level configurations, such as a unified replica count of 3 for the server). Fifth, service-level parameters specific to the service are overridden (service-specific configurations, such as a replica count of 5 for logic-service). Sixth, the merged parameters are validated for type and range (e.g., the replica count must be a positive integer, and CPU and memory formats must conform to Kubernetes specifications). Once validation passes, the project configuration is generated.
[0085] Step S44: Generate the version configuration based on the version number and branch information of each service in the complete deployment scope.
[0086] It's important to note that version configuration is the fourth type of configuration in the target configuration, recording the version number, branch, and service version information of each functional service in this deployment. Version numbers typically use a semantic versioning format (e.g., v2.3.1), branches usually correspond to development or release branches in the code repository (e.g., develop, release / 2.3, master), and service versions are the version identifiers for specific services. The version configuration generation technology used here is essentially a structured aggregation method for version information; that is, it extracts the version number, branch, and service version fields of each functional service from the namespace functional structure and organizes them into version configurations according to the functional service dimension.
[0087] Understandably, the purpose of this step is to structurally record the version information of all services involved in this deployment. On the one hand, this provides a clear version location for the executor's code checkout operation (from which branch or tag to check out the code), and on the other hand, it provides a basis for subsequent auditing and version traceability. The principle is that in a game release scenario with multiple services and multiple versions, clearly recording the version information of each service involved in each deployment is the foundation for ensuring version traceability and rollback.
[0088] Specifically, for each functional service within the defined complete deployment scope, the platform queries the namespace functional structure using application identifier + namespace + function ID as an index, and extracts the version number, branch, and service version fields. Then, this version information is assembled into a version configuration according to the functional service dimension. The version configuration includes the function ID, function name, version number, branch, and service version.
[0089] Step S45: Generate the deployment strategy configuration based on the executor name, plugin version, and build method in the deployment plugin configuration.
[0090] It's important to note that deployment strategy configuration is the fifth type of configuration in the target configuration. It describes the execution strategy for this deployment, including executor name, plugin version, Gradle plugin version, deployment target, whether to build images by tag, whether to use GameServerSet, notification on / off, and notification address. Deployment plugins are modular components in the platform used to drive the executor to complete specific build and deployment operations. Different plugin versions may correspond to different build tool versions or deployment processes. The deployment strategy configuration generation technology used here is essentially a method of inheriting and encapsulating strategy parameters. The platform extracts relevant fields from the obtained deployment plugin configuration and directly encapsulates them into deployment strategy configuration. If a field is not configured at the namespace level, it is inherited from the game level.
[0091] Understandably, the purpose of this step is to structurally record the specific execution strategy adopted for this deployment (which executor to execute on, which version of the build plugin to use, what build method to use, etc.), so that the executor can initialize its own execution environment based on these strategy parameters when loading tasks. The principle is that different namespaces or different deployment scenarios may require different deployment strategies. For example, the production zone might use a production-grade executor and a complete build and release process, while the development and testing zone might use a lightweight executor and a rapid deployment process. Recording the deployment strategy independently as part of the target configuration ensures both flexibility and facilitates subsequent auditing of the specific strategy used for each deployment.
[0092] Specifically, the deployment plugin configuration is queried using the application identifier and target namespace as indexes. If found, the executor name, plugin version, Gradle plugin version, deployment target, whether to build the image by tag, whether to use GameServerSet, and notification configuration are used directly. If not found, the default deployment plugin configuration of the game application at the game level is inherited. The platform encapsulates the data structure of the above fields according to the deployment strategy configuration as the fifth component of the target state configuration.
[0093] This embodiment, through the above scheme, generates five types of target state configurations, including service group definition, region / service definition, project configuration, version configuration, and deployment strategy configuration, by sequentially performing five steps—service group mapping, region / service combination, parameter synthesis, version aggregation, and strategy encapsulation—on the functional services within the complete deployment scope. This achieves a complete transformation from distributed configuration to structured target state configuration.
[0094] Based on the above implementation scheme, in one feasible implementation, the step of generating the corresponding Kubernetes resources by the target executor according to the target state configuration includes S51~S53: Step S51: Determine the workload type based on the service export information in the target state configuration and the deployment plugin configuration.
[0095] It's important to note that service export information refers to the export configuration of each service record in the service list within the functional service structure. This describes the way and characteristics of the service being exposed externally, such as the service name, module path, and domain name. The GameServerSet switch in the deployment plugin configuration controls whether to use a workload type specifically designed for game scenarios. Determining the workload type means selecting the most suitable workload type for the current service group from three types: Deployment, StatefulSet, and GameServerSet, based on the service's state attributes and policy configuration. The workload type selection technique used here is essentially a rule-based multi-branch decision-making method. It checks conditions sequentially according to a preset priority order: first, it checks if the service export information conforms to the naming rules for stateful services; if so, it selects StatefulSet; otherwise, it checks if the GameServerSet switch is enabled in the deployment plugin configuration; if enabled, it selects GameServerSet; otherwise, it defaults to Deployment.
[0096] Understandably, the purpose of this step is to automatically select the most suitable workload type for the game service based on its own characteristics (whether it is stateful) and the platform's deployment strategy configuration, avoiding potential type errors that may occur with manual selection. The principle is that game services contain various services with different characteristics—stateless services (such as gateways and logic servers) are suitable for rapid rolling updates and horizontal scaling using Deployments; stateful services (such as battle servers and room servers) require stable network identifiers and persistent storage, thus making StatefulSets suitable; while scenarios with game server semantics (such as game lobbies and game rooms) may be more suitable for GameServerSets—through automated type selection, the most appropriate Kubernetes workload can be matched to different types of services.
[0097] Specifically, after the executor loads the target state configuration, it performs the following workload type determination logic for each service group: First, it checks the service export information of each functional service in the service group. If the export name of a service conforms to the preset stateful service naming rules (e.g., the name ends with "-stateful", contains the string "-sts-", or carries a specific stateful tag), then the workload type of the service group is determined to be StatefulSet. Second, if the above condition is not met, it checks the GameServerSet switch field in the deployment policy configuration. If the field is enabled, then the workload type is determined to be GameServerSet. Finally, if neither of the above two conditions is met, then the workload type is determined to be Deployment. If the same service group contains multiple functional services, the workload type of all services remains consistent. That is, when a service group is determined to be StatefulSet or GameServerSet, all services within that group use the same workload type.
[0098] Step S52: Generate container templates based on the running parameters of each service dimension in the initialization parameters, and merge container templates belonging to the same workload into a multi-container workload template.
[0099] It's important to note that a container template refers to the configuration description used to generate a single container within a Kubernetes Pod (Kubernetes container group). This includes fields such as container name, image address, startup command, port list, environment variables, resource specifications, readiness probes, storage mounts, and scheduling constraints. A multi-container workload template refers to an aggregated structure containing multiple container templates, corresponding to the configuration of multiple containers within a Kubernetes Pod. The container template generation and merging technology used here essentially transforms the project configuration (including runtime parameters) in the target configuration into a configuration structure conforming to the Kubernetes Container specification, and then aggregates multiple container templates belonging to the same workload (i.e., the same service group) into a single multi-container template.
[0100] Understandably, the purpose of this step is to convert the runtime parameters in the target configuration into a container configuration that Kubernetes can recognize, and to merge multiple containers within the same workload, thereby providing a complete Pod template for subsequent workload resource generation. In certain scenarios within gaming applications, multiple functional services need to be deployed in the same Pod (e.g., the main service and auxiliary proxy, log collection, etc., sidecar containers). These containers share the same network namespace and storage volumes; generating separate workloads for each would not achieve this deployment pattern. By merging multiple container templates belonging to the same workload into a single multi-container workload template, multi-container Pod deployment can be supported.
[0101] Specifically, for each service group with a defined workload type, the executor performs the following container template generation operations: First, it reads the runtime parameters of each functional service in the project configuration, including image address, startup command, port, environment variables, CPU and memory resource specifications, etc.; Second, it converts these runtime parameters into a standardized container template according to the Kubernetes Container specification format; Third, it checks whether the service group contains multiple functional services. If it contains only one service, it directly generates a single container template; if it contains multiple services, it aggregates the container templates of each service, assigns a unique container name to each container, and then merges them into a multi-container workload template. Simultaneously, it marks one of the containers as the main service container (usually the first one or a service with a specific identifier) for subsequent Service port mapping. During the merging process, the port declarations, storage mounts, and environment variables of each container remain independent and do not overwrite each other.
[0102] Step S53: Generate corresponding Kubernetes resources based on the workload type and the multi-container workload template.
[0103] Understandably, the purpose of this step is to convert the platform's internal workload templates and type information into a standardized resource manifest that conforms to the Kubernetes specification, enabling the executor to directly submit these resources to the target cluster via the Kubernetes API. After the executor populates all the container configuration information in the workload template, it also needs to encapsulate this information into a spec template for a specific type of workload—the spec structure differs for different workload types (for example, StatefulSet includes the volumeClaimTemplates field while Deployment does not). The executor needs to select the corresponding resource building logic based on the determined type and populate the correct field structure.
[0104] Specifically, the executor selects the corresponding resource generation logic based on the workload type: If it is a Deployment, it generates a resource with apiVersion (API version) of apps / v1 and kind of Deployment, populates the generated multi-container workload template in the corresponding fields, sets the replicas field according to the replica count in the initialization parameters, and sets selector.matchLabels according to the service export information; if it is a StatefulSet, it generates a resource with apiVersion of apps / v1 and kind of StatefulSet, populates the template in the spec.template field, generates a PVC (PersistentVolumeClaim) template according to the storage configuration in spec.volumeClaimTemplates, and generates the corresponding Headless Service resource; if it is a GameServerSet (game server replica set), it generates the corresponding GameServerSet resource. After resource generation, the executor also generates Service resources according to the service export information. If it is a StatefulSet, it additionally generates a Headless Service resource for service discovery. All resources are generated with pre-defined tags (such as application identifier, namespace, deployment ID, etc.) for subsequent resource association queries and status monitoring.
[0105] This embodiment, through the above-described scheme, achieves a complete transformation from target configuration to a standardized Kubernetes resource list by three steps: determining the workload type, generating container templates and merging them into multiple container templates, and generating corresponding Kubernetes resources. This effectively solves the problem in the prior art where different workload resources cannot be accurately generated due to insufficient workload type adaptation.
[0106] Based on the above implementation scheme, in one feasible implementation, before the step of generating the corresponding Kubernetes resources by the target executor according to the target state configuration, S61~S63 are further included: Step S61: Obtain a historical snapshot of the current deployment configuration.
[0107] It's important to note that a historical snapshot refers to a complete record of the target configuration saved at the time of the last successful deployment. This includes all the service group definitions, server definitions, project configurations, version configurations, and deployment strategy configurations from the previous deployment. The current deployment configuration refers to the target configuration corresponding to this deployment request. The historical snapshot acquisition technology used here is essentially a configuration version management method. After each successful deployment, the platform persistently stores the target configuration and associates it with the corresponding application identifier and namespace, forming a configuration change history under that namespace.
[0108] Understandably, the purpose of this step is to obtain the configuration from the last successful deployment as a comparison baseline. By comparing the current target configuration with the previous successful configuration, the changes in this deployment can be identified. In continuous delivery scenarios, the configuration between multiple deployments often changes gradually, such as only modifying the image version of a service or adjusting the number of replicas. By comparing, the changes can be accurately identified, avoiding unnecessary duplicate checks on unchanged parts.
[0109] Specifically, using the application identifier and target namespace as an index, the database is queried for the deployment ID of the most recent successful deployment record under that namespace. Then, the corresponding target state configuration snapshot is queried using that deployment ID as an index. If no historical snapshot is found (i.e., the namespace is being deployed for the first time), the historical snapshot is set to empty, and all configuration items in the difference check results are newly added.
[0110] Step S62: Compare the target state configuration with the historical snapshot to generate structured difference information, which includes differences in plug-in parameters, executor differences, version differences, and runtime parameters.
[0111] It should be noted that structured difference information refers to a structured data set organized by difference type after comparing the target configuration with historical snapshots field by field. This includes differences in plugin parameters (changes in plugin version, build method, GameServerSet on / off switch, etc.), executor differences (changes in executor name), version differences (changes in version number, branch), and runtime parameter differences (changes in replica count, resource specifications, environment variables, etc.). The configuration comparison technique used here is essentially a difference detection algorithm for structured objects. It recursively compares two isomorphic configuration objects at the field level, detects three types of changes: addition, deletion, and modification, and categorizes and summarizes the detected differences according to their respective configuration categories.
[0112] Understandably, the purpose of this step is to systematically detect all differences between the current deployment configuration and the previous successful deployment configuration, transforming implicit configuration drift into explicit, displayable, structured difference information. The principle is that in complex game service deployment scenarios, configuration changes may involve multiple dimensions: changes in build methods, image version upgrades, replica count adjustments, and new environment variables. Manually reviewing these changes is both time-consuming and prone to omissions. Automated structured comparison can completely and accurately capture changes across all dimensions, providing objective evidence for subsequent blocking determinations and manual confirmation.
[0113] Specifically, first, the deployment strategy configuration in the target configuration is compared with the deployment strategy configuration in the historical snapshot, and the differences in executor name, plugin version, Gradle plugin version, build method, GameServerSet switch, and notification configuration are categorized as plugin parameter differences and executor differences; second, the version configuration in the target configuration is compared with the version configuration in the historical snapshot, and the differences in version numbers and branch changes of various functional services are categorized as version differences; third, the project configuration in the target configuration is compared with the project configuration in the historical snapshot, and the changes in runtime parameters such as replica count, resource specifications, environment variables, ports, and health checks are categorized as runtime parameter differences. During the comparison, the type of change for each field (added, deleted, or modified) and the values before and after the change are recorded.
[0114] Step S63: In response to the presence of a blocking difference in the structured difference information, the deployment configuration process is aborted and the structured difference information is returned.
[0115] It's important to note that "blocking differences" refer to configuration discrepancies that could lead to deployment failure or service anomalies. The platform automatically determines these differences based on pre-defined blocking rules. "Aborting the deployment configuration process" means stopping the current deployment operation and ceasing subsequent task creation and resource deployment steps. "Returning structured difference information" means returning the detected difference information in a structured format to the frontend or caller for user review and confirmation. The blocking determination technology used here is essentially a rule-based risk assessment method. It assesses each detected difference against pre-defined blocking rules to determine if it is a blocking difference; if any blocking difference exists, the entire process is aborted.
[0116] Understandably, the purpose of this step is to intercept configuration changes that may lead to deployment failure or service anomalies before deployment execution, preventing errors from being exposed only in the later stages of the deployment process, thereby reducing failure costs and recovery difficulty. The principle is that certain configuration changes have a decisive impact on the deployment process; if the executor does not exist, the task cannot be executed; if the plugin version is incompatible, the build may fail; if required parameters are empty, the container cannot start. These differences are predictable before deployment and do not need to be discovered during deployment execution. By performing blocking checks at the front end, the time point for error discovery can be significantly advanced, moving from being discovered in the later stages of deployment to being identified before deployment even begins, significantly reducing the time and resource consumption of invalid deployment attempts.
[0117] Specifically, the following blocking checks are performed on various detected differences: If the executor name in the deployment strategy configuration differs from the executor name in the historical snapshot, and the new executor name does not exist in the system, it is marked as a blocking difference (blocking reason: target executor does not exist); if the plugin version changes and the new version is incompatible with the current deployment environment, it is marked as a blocking difference (blocking reason: plugin version incompatibility); if any required parameters (such as image address, startup command) in the project configuration are empty, it is marked as a blocking difference (blocking reason: required parameter missing); if the port configurations of multiple containers within the same service group conflict, it is marked as a blocking difference (blocking reason: port conflict). If any blocking difference exists, the platform will abort the deployment configuration process, stop executing subsequent steps, and encapsulate the complete structured difference information into a response. If no blocking difference exists, but there are suggestive differences (such as changes in the number of replicas), the platform can continue the process and display these differences on the front end for user confirmation.
[0118] This embodiment, through the above-described scheme, achieves automated pre-checking of deployment configuration by three steps: obtaining historical snapshots, comparing and generating structured difference information, and suspending the process when there are blocking differences. This effectively solves the problem in the prior art that errors are only exposed in the later stages of deployment due to inconsistent configurations, and significantly reduces the time and resource consumption of invalid deployment attempts.
[0119] Based on the above implementation scheme, in one feasible implementation, the step of applying the Kubernetes resources to the target cluster includes S71~S73: Step S71: Assign the deployment task to the task queue and set the status of the deployment task to pending.
[0120] It should be noted that the task queue is a data structure in the control plane used to store deployment tasks to be executed. In this embodiment, it can be implemented as a task table in a database. "Pending" is a state of a deployment task, indicating that the task has been created but has not yet been claimed by any executor. The task allocation technique used here is essentially a database-based state management method. The control plane persists the task structure to the task table in the database and sets the state field to "Pending," at which point the task enters the task pool that can be retrieved by executors.
[0121] Understandably, the purpose of this step is to place the created deployment task into an executable, pending state, enabling the task to be discovered and claimed by subsequent executors. By initializing the task state to pending rather than directly assigning it to an executor, asynchronous task processing can be achieved. After the control plane creates a task, it can return without waiting for execution to complete. The executor retrieves and executes tasks according to its own rhythm, thereby decoupling the control plane and the execution plane in the time dimension.
[0122] Specifically, after the control plane completes the creation and data encapsulation of the deployment task, it writes the task structure into the task table of the database, where the status field is set to PENDING, and the task's creation time (createTime) and last update time (updateTime) are recorded. After the task is successfully persisted, the control plane can return the deployment ID to the caller, indicating that the task has been successfully created and entered the pending queue.
[0123] Step S72: Determine and pull deployment tasks that match the target executor based on the executor name of the target executor.
[0124] It's important to note that determining the matching tasks based on executor name means that when an executor sends a pull request to the control plane, it includes its own executor name. The control plane then searches the task queue for deployment tasks with matching executor names and pending statuses based on this name. The pull matching technique used here is essentially an attribute-based matching query method. The control plane uses the executor name as the query condition to filter the task table for a list of tasks with pending statuses and whose executor name field matches the executor name in the request.
[0125] Understandably, the purpose of this step is to ensure that each executor can only pull deployment tasks corresponding to the namespace it is bound to, avoiding incorrect task allocation. Different executors may be deployed in different clusters or network environments, with different cluster access credentials and build resources. One executor may not be able to correctly execute tasks bound to other executors (e.g., executor-east cannot access the cluster managed by executor-west). By matching the executor name when pulling tasks, it ensures that the executor to which a task is assigned has the resources and permissions required to execute that task.
[0126] Specifically, the executor sends an HTTP request to the control plane's fetch interface at preset time intervals (e.g., every 5 seconds). The request includes the executor's own name (e.g., executor-east). Upon receiving the request, the control plane performs a database query with the following conditions: status = PENDING and executor name = the executor name in the request. The query results are sorted in ascending order of creation time. If the query result is not empty, the control plane uses the first task found as the match; if the query result is empty, it returns an empty response, and the executor waits for the next fetch cycle to try again.
[0127] Step S73: Perform condition matching based on the executor name and the status of the deployment task, assign the matched deployment task to the target executor, and update the status of the deployment task to "processing".
[0128] It's important to note that condition matching refers to the control plane re-verifying the consistency between the task status and the executor name before assigning a task to an executor. This is accomplished by atomically updating the task status from "pending" to "processing" through a database update operation, thus completing the task assignment. "Processing" indicates that the task has been claimed and is being executed by an executor, and other executors will no longer be able to acquire it when trying to retrieve it. The condition matching and atomic update technique used here is essentially an implementation of an optimistic locking mechanism. When performing a database update operation, the control plane specifies the task ID, the current status as "PENDING," and the executor name matching simultaneously in the WHERE clause of the UPDATE statement. The update succeeds only when all conditions are met. This mechanism ensures that even if multiple executors simultaneously try to retrieve the same task in a distributed environment, only one executor will successfully preempt it.
[0129] Understandably, the purpose of this step is to atomically transition the matched task from a pending state to a processing state and bind it to a specific executor, ensuring that the task is not consumed by multiple executors simultaneously. The principle is that in a distributed system, multiple executors may simultaneously initiate pull requests. Without control, the same task may be pulled and executed repeatedly by multiple executors. Through an atomic conditional update operation—that is, updating the state to PROCESSING only when the state is PENDING and the executor name matches—it ensures that in concurrent scenarios, only one executor successfully preempts the task. The preemption operations of other executors will fail because the state has changed to PROCESSING, thus preventing the task from being executed repeatedly.
[0130] Specifically, after the control plane finds a matching deployment task, it performs the following atomic update operation: In the task table of the database, it updates the records that meet the conditions: Task ID = Matching Task ID, Status = 'PENDING', and Executor Name = the executor name in the request. The status field is updated to "Processing" (PROCESSING), and the last update time is updated to the current time. If the number of rows affected by the update operation is 1, it indicates successful preemption, and the control plane returns the complete task content to the executor. If the number of rows affected is 0, it indicates that within the time window between the query and update, the task has been preempted by another executor or its status has been changed by other operations. The control plane returns an empty response, and the executor waits for the next fetch cycle. After receiving the complete task content, the executor begins executing resource generation and application operations.
[0131] This embodiment, through the above scheme, implements a pull-based task distribution mechanism that decouples the control plane from the executor by three steps: placing the deployment task into a queue and setting it to a pending state; pulling matching tasks based on the executor name; and updating the assigned task through atomic conditions and updating it to a processing state. This effectively solves the problems of cross-cluster network complexity and credential management difficulties caused by the strong coupling between the console and the executor in the prior art.
[0132] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the cloud-native game cluster orchestration and governance method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0133] This application also provides a cloud-native game cluster orchestration and management device; please refer to... Figure 2 The cloud-native game cluster orchestration and governance device includes: The configuration determination module 201 is used to receive a deployment request based on the target game application and determine the target state configuration of the target game application based on the deployment request; Task distribution module 202 is used to create deployment tasks according to the target state configuration and distribute the deployment tasks to the target executor corresponding to the target game application; Resource application module 203 is used to generate corresponding Kubernetes resources according to the target state configuration through the target executor, and apply the Kubernetes resources to the target cluster; The readiness determination module 204 is used to perform a corresponding readiness determination in the target cluster according to the workload type of the Kubernetes resource, and record the deployment success status when the result of the readiness determination determines that the workload is ready.
[0134] The cloud-native game cluster orchestration and governance apparatus provided in this application, employing the cloud-native game cluster orchestration and governance method described in the above embodiments, can solve the technical problem of cumbersome orchestration and governance processes in cloud-native games. Compared with the prior art, the beneficial effects of the cloud-native game cluster orchestration and governance apparatus provided in this application are the same as those of the cloud-native game cluster orchestration and governance method provided in the above embodiments, and other technical features in the cloud-native game cluster orchestration and governance apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0135] This application provides a cloud-native game cluster orchestration and management device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the cloud-native game cluster orchestration and management method in the first embodiment described above.
[0136] The following is for reference. Figure 3 This document illustrates a structural diagram of a cloud-native game cluster orchestration and governance device suitable for implementing embodiments of this application. The cloud-native game cluster orchestration and governance device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 3 The cloud-native game cluster orchestration and governance device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0137] like Figure 3As shown, the cloud-native game cluster orchestration and management device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory 1002 or a program loaded from storage device 1003 into random access memory 1004. Random access memory 1004 also stores various programs and data required for the operation of the cloud-native game cluster orchestration and management device. The processing unit 1001, read-only memory 1002, and random access memory 1004 are interconnected via bus 1005. Input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the cloud-native game cluster orchestration and governance device to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows a cloud-native game cluster orchestration and governance device with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0138] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0139] The cloud-native game cluster orchestration and governance device provided in this application, employing the cloud-native game cluster orchestration and governance method described in the above embodiments, can solve the technical problem of cumbersome orchestration and governance processes in cloud-native games. Compared with the prior art, the beneficial effects of the cloud-native game cluster orchestration and governance device provided in this application are the same as those of the cloud-native game cluster orchestration and governance method provided in the above embodiments, and other technical features in this cloud-native game cluster orchestration and governance device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0140] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0141] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0142] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the cloud-native game cluster orchestration and governance method in the above embodiments.
[0143] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0144] The aforementioned computer-readable storage medium may be included in the cloud-native game cluster orchestration and governance equipment; or it may exist independently and not be installed in the cloud-native game cluster orchestration and governance equipment.
[0145] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the cloud-native game cluster orchestration and governance device, the cloud-native game cluster orchestration and governance device: receives a deployment request based on a target game application; determines the target state configuration of the target game application based on the deployment request; creates a deployment task according to the target state configuration; distributes the deployment task to the target executor corresponding to the target game application; generates corresponding Kubernetes resources through the target executor according to the target state configuration; applies the Kubernetes resources to the target cluster; performs a corresponding readiness determination in the target cluster according to the workload type of the Kubernetes resources; and records a successful deployment status when the result of the readiness determination determines that the workload is ready.
[0146] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0147] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0148] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0149] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the above-described cloud-native game cluster orchestration and governance method, thereby solving the technical problem of the cumbersome orchestration and governance process of cloud-native games. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the cloud-native game cluster orchestration and governance method provided in the above embodiments, and will not be repeated here.
[0150] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the cloud-native game cluster orchestration and governance method described above.
[0151] The computer program product provided in this application can solve the technical problem of cumbersome orchestration and governance processes in cloud-native games. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the cloud-native game cluster orchestration and governance methods provided in the above embodiments, and will not be repeated here.
[0152] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A cloud-native game cluster orchestration and governance method, characterized in that, The cloud-native game cluster orchestration and governance method includes: Receive a deployment request based on a target game application, and determine the target state configuration of the target game application based on the deployment request; A deployment task is created based on the target state configuration, and the deployment task is distributed to the target executor corresponding to the target game application; The target executor generates corresponding Kubernetes resources based on the target state configuration, and applies the Kubernetes resources to the target cluster. In the target cluster, a readiness determination is performed according to the workload type of the Kubernetes resource. Once the readiness determination determines that the workload is ready, the deployment success status is recorded.
2. The cloud-native game cluster orchestration and governance method as described in claim 1, characterized in that, The step of determining the target state configuration of the target game application based on the deployment request includes: Parse the deployment request to determine the target namespace and the functional service to be deployed; Based on the service to be deployed, query and complete the dependent services and joint deployment services associated with the service to be deployed to determine the complete deployment scope; Obtain the namespace functional structure, initialization parameters, namespace configuration, and deployment plugin configuration of the target game application under the target namespace; The target state configuration is generated based on the complete deployment scope, the namespace functional structure, the initialization parameters, the namespace configuration, and the deployment plugin configuration.
3. The cloud-native game cluster orchestration and governance method as described in claim 2, characterized in that, The step of querying and completing the dependent services and joint deployment services associated with the function service to be deployed, and determining the complete deployment scope, includes: Starting with the function service to be deployed, recursively query the function service structure to obtain the list of dependent functions and the list of jointly deployed functions of the function service to be deployed; The functional services in the dependent functional list and the joint deployment functional list are merged with the functional services to be deployed to remove duplicates and determine the complete deployment scope.
4. The cloud-native game cluster orchestration and governance method as described in claim 2, characterized in that, The target state configuration includes service group definition, region / server definition, project configuration, version configuration, and deployment strategy configuration. The step of generating the target state configuration based on the complete deployment scope, the namespace functional structure, the initialization parameters, the namespace configuration, and the deployment plugin configuration includes: Map the functional services in the complete deployment scope to the corresponding service groups to generate the service group definitions; The target namespace, the service group definition, and the external service references across namespaces are combined to generate the region service definition; Based on the repository addresses and module paths of each service in the complete deployment scope, the runtime parameters are synthesized to generate the project configuration; The version configuration is generated based on the version number and branch information of each service in the complete deployment scope; The deployment strategy configuration is generated based on the executor name, plugin version, and build method in the deployment plugin configuration.
5. The cloud-native game cluster orchestration and governance method as described in claim 2, characterized in that, The step of generating corresponding Kubernetes resources by the target executor according to the target state configuration includes: The workload type is determined based on the service export information in the target state configuration and the deployment plugin configuration; Container templates are generated based on the running parameters of each service dimension in the initialization parameters, and container templates belonging to the same workload are merged into multi-container workload templates. Generate corresponding Kubernetes resources based on the workload type and the multi-container workload template.
6. The cloud-native game cluster orchestration and governance method as described in claim 2, characterized in that, Before the step of generating the corresponding Kubernetes resources by the target executor according to the target state configuration, the method further includes: Get historical snapshots of the current deployment configuration; The target state configuration is compared with the historical snapshot to generate structured difference information, which includes differences in plug-in parameters, executor differences, version differences, and runtime parameter differences. In response to the presence of a blocking difference in the structured difference information, the deployment configuration process is aborted and the structured difference information is returned.
7. The cloud-native game cluster orchestration and governance method as described in claim 2, characterized in that, The step of applying the Kubernetes resources to the target cluster includes: The deployment task is assigned to the task queue, and the status of the deployment task is set to pending. Based on the executor name of the target executor, a deployment task matching the target executor is retrieved; Based on the executor name and the status of the deployment task, a conditional match is performed, the matched deployment task is assigned to the target executor, and the status of the deployment task is updated to "processing".
8. A cloud-native game cluster orchestration and governance device, characterized in that, The cloud-native game cluster orchestration and governance device includes: A configuration determination module is used to receive a deployment request based on a target game application and determine the target state configuration of the target game application based on the deployment request. The task distribution module is used to create deployment tasks according to the target state configuration and distribute the deployment tasks to the target executor corresponding to the target game application. The resource application module is used to generate corresponding Kubernetes resources according to the target state configuration through the target executor, and apply the Kubernetes resources to the target cluster; The readiness determination module is used to perform a corresponding readiness determination in the target cluster based on the workload type of the Kubernetes resource. When the readiness determination result determines that the workload is ready, the deployment success status is recorded.
9. A cloud-native game cluster orchestration and governance device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the cloud-native game cluster orchestration and governance method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the cloud-native game cluster orchestration and governance method as described in any one of claims 1 to 7.
