{"id":35849319,"url":"https://github.com/cloudnativegame/kruise-game-open-match-director","last_synced_at":"2026-01-08T07:00:08.125Z","repository":{"id":180406372,"uuid":"654387334","full_name":"CloudNativeGame/kruise-game-open-match-director","owner":"CloudNativeGame","description":"Opensource cloudnative game matching service for openkruisegame.","archived":false,"fork":false,"pushed_at":"2024-07-06T14:49:54.000Z","size":26389,"stargazers_count":21,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-03T07:30:13.100Z","etag":null,"topics":["go","golang","kubernetes","matchmaking","multiplayer","okg","openkruisegame"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CloudNativeGame.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-16T02:48:56.000Z","updated_at":"2025-03-31T03:29:40.000Z","dependencies_parsed_at":"2024-06-18T08:54:23.970Z","dependency_job_id":null,"html_url":"https://github.com/CloudNativeGame/kruise-game-open-match-director","commit_stats":null,"previous_names":["cloudnativegame/kruise-game-open-match-director"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CloudNativeGame/kruise-game-open-match-director","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudNativeGame%2Fkruise-game-open-match-director","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudNativeGame%2Fkruise-game-open-match-director/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudNativeGame%2Fkruise-game-open-match-director/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudNativeGame%2Fkruise-game-open-match-director/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CloudNativeGame","download_url":"https://codeload.github.com/CloudNativeGame/kruise-game-open-match-director/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CloudNativeGame%2Fkruise-game-open-match-director/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28242435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-08T02:00:06.591Z","response_time":241,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","kubernetes","matchmaking","multiplayer","okg","openkruisegame"],"created_at":"2026-01-08T07:00:03.079Z","updated_at":"2026-01-08T07:00:08.075Z","avatar_url":"https://github.com/CloudNativeGame.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## kruise-game-open-match-director\n\n### Overview\n\n**kruise-game-open-match-director** allocate appropriate game servers managed by OpenKruiseGame for players, which actually is a director component based on [open-match framework](https://open-match.dev/site/).\n\n**kruise-game-open-match-director** is located between the Game Servers and the Backend of open-match. As shown in the figure, it will perceive the network information and running status of the game server in the cluster, and when a matching request comes, it will find a game server that meets the needs of the players and return the corresponding network access address.\n\n\n![](docs/images/arch.png)\n\n### Parameter Description\n\n```yaml\n        command:\n        - '/director'\n        - '--lease-lock-name=kruise-game-open-match-director'\n        - '--lease-lock-namespace=open-match-demo'\n        - '--match-function-endpoint=om-function.open-match-demo.svc.cluster.local'\n        - '--match-function-port=50502'\n        - '--gss-names=flappy-bird'\n```\n\n- gss-names\n  - The names of the GameServerSets that you want to put in pool.\n  - Usually each GameServerSet represents a game. If you want to make players get into different games, you can fill in multiple names, which are separated by ','. For example: football,basketball\n  - And you can create a ticket with `game_name` to choose which game the player should join in. The tickets would be like this:\n      ```yaml\n      \u0026pb.Ticket{\n          SearchFields: \u0026pb.SearchFields{\n              StringArgs: map[string]string{\n                  \"game_name\": \"football\", # the same as the gss name that is already register in one of the match pools. This player will join in football game.\n              },\n          },\n        } \n      \u0026pb.Ticket{\n          SearchFields: \u0026pb.SearchFields{\n              StringArgs: map[string]string{\n                  \"game_name\": \"basketball\", # the same as the gss name that is already register in one of the match pools. This player will join in basketball game.\n              },\n          },\n        } \n    ```\n  - you can also design different match functions for different games, and use the game_name to distinguish each one. Director will generate two MatchProfiles in this examples, which are:\n    ```yaml\n      p := []*pb.MatchProfile{\n          {\n              Name: \"football\",\n              Pools: []*pb.Pool{\n                  {\n                      Name: \"game_name\",\n                      StringEqualsFilters: []*pb.StringEqualsFilter{\n                          {\n                              StringArg: \"game_name\",\n                              Value:     \"football\",\n                          },\n                      },\n                  },\n              },\n          },\n          {\n              Name: \"basketball\",\n              Pools: []*pb.Pool{\n                  {\n                      Name: \"game_name\",\n                      StringEqualsFilters: []*pb.StringEqualsFilter{\n                          {\n                              StringArg: \"game_name\",\n                              Value:     \"basketball\",\n                          },\n                      },\n                  },\n              },\n          },\n      }\n    ```\n\n- slave-clusters\n\n  - default: \"\", which means only host cluster exists.\n  - usage: Specify the slave cluster names, which are also the names of corresponding kubeconfig secrets. Format is \"{cluster_1_secret_name},{cluster_2_secret_name},...\"\n\nIf you want to make match between multi-clusters, you should deploy the secret with same cluster name before you set up director with the parameter. For example:\n\n1. Deploy the secret\n```yaml\ncat \u003c\u003cEOF | kubectl apply -f -\napiVersion: v1\nkind: Secret\nmetadata:\n  name: region-b # replace with your cluster name\n  namespace: open-match\ntype: Opaque\ndata:\n  config: YXBpVmVyc2lvbjoxxxxxx... # replace with the baes64 of your own kubernetes kubeconfig.\nEOF\n```\n\n2. set up director with parameter 'slave-clusters'\n\n```yaml\n        command:\n        # ...\n        - '--slave-clusters=region-b'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudnativegame%2Fkruise-game-open-match-director","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudnativegame%2Fkruise-game-open-match-director","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudnativegame%2Fkruise-game-open-match-director/lists"}