mirror of
https://github.com/googleforgames/open-match.git
synced 2025-03-21 18:26:10 +00:00
Compare commits
91 Commits
release-0.
...
v0.7.0
Author | SHA1 | Date | |
---|---|---|---|
4f521b41db | |||
3c6183241e | |||
61449fe2cf | |||
21cf0697fe | |||
12e5a37816 | |||
e658cc0d84 | |||
9e89735d79 | |||
5cbbfef1cc | |||
1c0e4ff94e | |||
79862c9950 | |||
8ac27d7975 | |||
86b8cb5aa8 | |||
fdea3c8f1e | |||
61a28df3e5 | |||
13fe3fe5a9 | |||
a674fb1c02 | |||
75ffc83b98 | |||
7dc4de6a14 | |||
f02283e2a6 | |||
d1fe7f1ac4 | |||
84eb9b27ef | |||
707de22912 | |||
780e3abf10 | |||
524b7d333f | |||
c544b9a239 | |||
04b6f1a5ad | |||
13952ea54e | |||
a61f4a643e | |||
949fa28505 | |||
85cc481f5d | |||
c3cbcd7625 | |||
e01fc12549 | |||
e1682100fa | |||
603aef207f | |||
baf403ac44 | |||
b1da77eaba | |||
bb82a397d2 | |||
abd2c1434c | |||
bc9dc27210 | |||
084461d387 | |||
bc7d014db6 | |||
230ae76bb4 | |||
ebbe5aa6ce | |||
9b350c690c | |||
80b817f488 | |||
df7021de1b | |||
5c8f218000 | |||
3f538df971 | |||
1e856658c9 | |||
eb6697052d | |||
31d3464a31 | |||
c96b65d52b | |||
9d601351cc | |||
7272ca8b93 | |||
b463d2e0fd | |||
07da543f8e | |||
0d54c39828 | |||
5469c8bc69 | |||
c837211cd1 | |||
5729e72214 | |||
66910632da | |||
c832074112 | |||
a6d526b36b | |||
13e017ba65 | |||
3784300d22 | |||
31fd18e39b | |||
a54d1fcf21 | |||
72a435758e | |||
6848fa71c2 | |||
987d90cc44 | |||
baf943fdd3 | |||
c7ce1b047b | |||
36a194e761 | |||
605511d177 | |||
2a08732508 | |||
e1c2b96cb5 | |||
1bd84355b7 | |||
a9014fbf78 | |||
8050c61618 | |||
8b765871c4 | |||
88786ecbd1 | |||
f41c175f29 | |||
3607809371 | |||
d21ae712a7 | |||
f3f1908318 | |||
9cb4a9ce6e | |||
8dad7fd7d0 | |||
f70cfee14a | |||
36f92b4336 | |||
164dfdde67 | |||
c0d6531f3f |
@ -18,6 +18,7 @@
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.nupkg
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
@ -121,6 +122,7 @@ cmd/swaggerui/swaggerui
|
||||
tools/certgen/certgen
|
||||
examples/demo/demo
|
||||
examples/functions/golang/soloduel/soloduel
|
||||
examples/functions/golang/rosterbased/rosterbased
|
||||
examples/functions/golang/pool/pool
|
||||
examples/evaluator/golang/simple/simple
|
||||
tools/reaper/reaper
|
||||
|
25
.github/ISSUE_TEMPLATE/apichange.md
vendored
Normal file
25
.github/ISSUE_TEMPLATE/apichange.md
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
name: Breaking API change
|
||||
about: Details of a breaking API change proposal.
|
||||
title: 'API change: <>'
|
||||
labels: breaking api change
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
<High level description of this change>
|
||||
|
||||
## Motivation
|
||||
|
||||
<What is the primary motivation for this API change>
|
||||
|
||||
## Impact
|
||||
|
||||
<What usage does this impact? Add details here such that a consumer of Open
|
||||
Match API can clearly tell if this will impact them>
|
||||
|
||||
## Change Proto
|
||||
|
||||
<Add snippet of the proposed change proto>
|
||||
|
82
.github/ISSUE_TEMPLATE/release.md
vendored
82
.github/ISSUE_TEMPLATE/release.md
vendored
@ -8,88 +8,98 @@ assignees: ''
|
||||
|
||||
# Open Match Release Process
|
||||
|
||||
Follow these instructions to create an Open Match release. The output of the
|
||||
Follow these instructions to create an Open Match release. The output of the
|
||||
release process is new images and new configuration.
|
||||
|
||||
## Getting setup
|
||||
|
||||
*note: the commands below are pasted from the 0.5 release. make the necessary
|
||||
changes to match your naming & environment.*
|
||||
**NOTE: The instructions below are NOT strictly copy-pastable and assume 0.5**
|
||||
**release. Please update the version number for your commands.**
|
||||
|
||||
The Git flow for pushing a new release is similar to the development process
|
||||
but there are some small differences.
|
||||
|
||||
**1. Clone your fork of the Open Match repository.**
|
||||
### 1. Clone Repository
|
||||
|
||||
```shell
|
||||
# Clone your fork of the Open Match repository.
|
||||
git clone git@github.com:afeddersen/open-match.git
|
||||
```
|
||||
**2. Move into the new open-match directory.**
|
||||
|
||||
```shell
|
||||
# Change directory to the git repository.
|
||||
cd open-match
|
||||
```
|
||||
|
||||
**3. Configure a remote that points to the upstream repository. This is required to sync changes you make in a fork with the original repository. Note: Upstream is the gatekeeper of the project or the source of truth to which you wish to contribute.**
|
||||
|
||||
```shell
|
||||
# Add a remote, you'll be pushing to this.
|
||||
git remote add upstream https://github.com/googleforgames/open-match.git
|
||||
```
|
||||
|
||||
**3. Fetch the branches and their respective commits from the upstream repo.**
|
||||
### 2. Release Branch
|
||||
|
||||
If you're creating the first release of the version, that would be `0.5.0-rc.1`
|
||||
then you'll need to create the release branch.
|
||||
|
||||
```shell
|
||||
git fetch upstream
|
||||
# Create a local release branch.
|
||||
git checkout -b release-0.5 upstream/master
|
||||
# Push the branch upstream.
|
||||
git push upstream release-0.5
|
||||
```
|
||||
|
||||
**4. Create a local release branch that tracks upstream and check it out.**
|
||||
otherwise there should already be a `release-0.5` branch so run,
|
||||
|
||||
```shell
|
||||
# Checkout the release branch.
|
||||
git checkout -b release-0.5 upstream/release-0.5
|
||||
```
|
||||
|
||||
**NOTE: The branch name must be in the format, `release-X.Y` otherwise**
|
||||
**some artifacts will not be pushed.**
|
||||
|
||||
## Releases & Versions
|
||||
|
||||
|
||||
Open Match uses Semantic Versioning 2.0.0. If you're not familiar please
|
||||
Open Match uses Semantic Versioning 2.0.0. If you're not familiar please
|
||||
see the documentation - [https://semver.org/](https://semver.org/).
|
||||
|
||||
Full Release / Stable Release:
|
||||
|
||||
* The final software product. Stable, reliable, etc...
|
||||
* Naming example: 1.0.0
|
||||
* The final software product. Stable, reliable, etc...
|
||||
* Example: 1.0.0, 1.1.0
|
||||
|
||||
Release Candidate (RC):
|
||||
|
||||
* A release candidate (RC) is a version with the potential to be the final
|
||||
product but it hasn't validated by automated and/or manual tests.
|
||||
* Naming example: 1.0.0-rc.1
|
||||
* Example: 1.0.0-rc.1
|
||||
|
||||
Hot Fixes:
|
||||
|
||||
* Code developed to correct a major software bug or fault
|
||||
that's been discovered after the full release.
|
||||
* Naming example: 1.0.1
|
||||
* Example: 1.0.1
|
||||
|
||||
Preview:
|
||||
|
||||
* Rare, a one off release cut from the master branch to provide early access
|
||||
to APIs or some other major change.
|
||||
* **NOTE: There's no branch for this release.**
|
||||
* Example: 0.5-preview.1
|
||||
|
||||
**NOTE: Semantic versioning is enforced by `go mod`. A non-compliant version**
|
||||
**tag will cause `go get` to break for users.**
|
||||
|
||||
# Detailed Instructions
|
||||
|
||||
|
||||
## Find and replace
|
||||
|
||||
|
||||
Below this point you will see {version} used as a placeholder for future
|
||||
releases. Find {version} and replace with the current release (e.g. 0.5.0)
|
||||
releases. Find {version} and replace with the current release (e.g. 0.5.0)
|
||||
|
||||
## Create a release branch in the upstream repository
|
||||
|
||||
|
||||
**Note: This step is performed by the person who starts the release. It is
|
||||
only required once.**
|
||||
|
||||
- [ ] Create the branch in the **upstream** repository. It should be named
|
||||
release-X.Y. Example: release-0.5. At this point there's effectively a code
|
||||
freeze for this version and all work on master will be included in a future
|
||||
version. If you're on the branch that you created in the *getting setup*
|
||||
version. If you're on the branch that you created in the *getting setup*
|
||||
section above you should be able to push upstream.
|
||||
|
||||
```shell
|
||||
@ -98,19 +108,18 @@ git push origin release-0.5
|
||||
|
||||
- [ ] Announce a PR freeze on release-X.Y branch on [open-match-discuss@](mailing-list-post).
|
||||
- [ ] Open the [`Makefile`](makefile-version) and change BASE_VERSION entry.
|
||||
- [ ] Open the [`install/helm/open-match/Chart.yaml`](om-chart-yaml-version) and [`install/helm/open-match-example/Chart.yaml`](om-example-chart-yaml-version) and change the `appVersion` and `version` entries.
|
||||
- [ ] Open the [`install/helm/open-match/values.yaml`](om-values-yaml-version) and [`install/helm/open-match-example/values.yaml`](om-example-values-yaml-version) and change the `tag` entries.
|
||||
- [ ] Open the [`site/config.toml`] and change the `release_branch` and `release_version` entries.
|
||||
- [ ] Open the [`install/helm/open-match/Chart.yaml`](om-chart-yaml-version) and change the `appVersion` and `version` entries.
|
||||
- [ ] Open the [`install/helm/open-match/values.yaml`](om-values-yaml-version) and change the `tag` entries.
|
||||
- [ ] Open the [`cloudbuild.yaml`] and change the `_OM_VERSION` entry.
|
||||
- [ ] Run `make clean release`
|
||||
- [ ] There might be additional references to the old version but be careful not to change it for places that have it for historical purposes.
|
||||
- [ ] Run `make release`
|
||||
- [ ] Create a PR with the changes and include the release candidate name.
|
||||
- [ ] Go to [open-match-build](https://pantheon.corp.google.com/cloud-build/triggers?project=open-match-build) and update all the triggers' `_GCB_LATEST_VERSION` value to the `X.Y` of the release. This value should only increase as it's used to determine the latest stable version.
|
||||
- [ ] Merge your changes once the PR is approved.
|
||||
|
||||
## Complete Milestone
|
||||
|
||||
|
||||
**Note: This step is performed by the person who starts the release. It is
|
||||
**Note: This step is performed by the person who starts the release. It is
|
||||
only required once.**
|
||||
- [ ] Create the next [version milestone](https://github.com/googleforgames/open-match/milestones) and use [semantic versioning](https://semver.org/) when naming it to be consistent with the [Go community](https://blog.golang.org/versioning-proposal).
|
||||
- [ ] Create a *draft* [release](https://github.com/googleforgames/open-match/releases).
|
||||
@ -138,7 +147,6 @@ TODO: Add guidelines for labeling issues.
|
||||
- [ ] Run `./docs/governance/templates/release.sh {source version tag} {version}` to copy the images to open-match-public-images.
|
||||
- [ ] If this is a new minor version in the newest major version then run `./docs/governance/templates/release.sh {source version tag} latest`.
|
||||
- [ ] Copy the files from `build/release/` generated from `make release` to the release draft you created. You can drag and drop the files using the Github UI.
|
||||
- [ ] Run `make delete-gke-cluster create-gke-cluster` and run through the instructions under the [README](readme-deploy), verify the pods are healthy. You'll need to adjust the path to the `build/release/install.yaml` and `build/release/install-demo.yaml` in your local clone since you haven't published them yet.
|
||||
- [ ] Open the [`README.md`](readme-deploy) update the version references and submit. (Release candidates can ignore this step.)
|
||||
- [ ] Publish the [Release](om-release) in Github.
|
||||
|
||||
@ -151,9 +159,7 @@ TODO: Add guidelines for labeling issues.
|
||||
[mailing-list-post]: https://groups.google.com/forum/#!newtopic/open-match-discuss
|
||||
[release-template]: https://github.com/googleforgames/open-match/blob/master/docs/governance/templates/release.md
|
||||
[makefile-version]: https://github.com/googleforgames/open-match/blob/master/Makefile#L53
|
||||
[om-example-chart-yaml-version]: https://github.com/googleforgames/open-match/blob/master/install/helm/open-match/Chart.yaml#L16
|
||||
[om-example-values-yaml-version]: https://github.com/googleforgames/open-match/blob/master/install/helm/open-match/values.yaml#L16
|
||||
[om-example-chart-yaml-version]: https://github.com/googleforgames/open-match/blob/master/install/helm/open-match-example/Chart.yaml#L16
|
||||
[om-example-values-yaml-version]: https://github.com/googleforgames/open-match/blob/master/install/helm/open-match-example/values.yaml#L16
|
||||
[om-chart-yaml-version]: https://github.com/googleforgames/open-match/blob/master/install/helm/open-match/Chart.yaml#L16
|
||||
[om-values-yaml-version]: https://github.com/googleforgames/open-match/blob/master/install/helm/open-match/values.yaml#L16
|
||||
[om-release]: https://github.com/googleforgames/open-match/releases/new
|
||||
[readme-deploy]: https://github.com/googleforgames/open-match/blob/master/README.md#deploy-to-kubernetes
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -16,6 +16,7 @@
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.nupkg
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
@ -118,6 +119,7 @@ cmd/swaggerui/swaggerui
|
||||
tools/certgen/certgen
|
||||
examples/demo/demo
|
||||
examples/functions/golang/soloduel/soloduel
|
||||
examples/functions/golang/rosterbased/rosterbased
|
||||
examples/functions/golang/pool/pool
|
||||
examples/evaluator/golang/simple/simple
|
||||
tools/reaper/reaper
|
||||
|
@ -45,7 +45,7 @@ run:
|
||||
# won't be reported. Default value is empty list, but there is
|
||||
# no need to include all autogenerated files, we confidently recognize
|
||||
# autogenerated files. If it's not please let us know.
|
||||
skip-files:
|
||||
skip-files: '.*\.gw\.go'
|
||||
|
||||
# output configuration options
|
||||
output:
|
||||
@ -177,6 +177,7 @@ linters:
|
||||
- prealloc
|
||||
- gofmt
|
||||
- interfacer # deprecated - "A tool that suggests interfaces is prone to bad suggestions"
|
||||
- gochecknoglobals
|
||||
|
||||
#linters:
|
||||
# enable-all: true
|
||||
@ -191,42 +192,11 @@ issues:
|
||||
|
||||
# Excluding configuration per-path, per-linter, per-text and per-source
|
||||
exclude-rules:
|
||||
- path: internal[/\\]config[/\\]
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
- path: consts\.go
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
# Exclude some linters from running on test files
|
||||
- path: _test\.go
|
||||
linters:
|
||||
- errcheck
|
||||
- bodyclose
|
||||
# The following are allowed global variable patterns.
|
||||
# Generally it's ok to have constants or variables that effectively act as constants such as a static logger or flag values.
|
||||
# The filters below specify the source code pattern that's allowed when declaring a global
|
||||
# 'source: "flag."' will match 'var destFlag = flag.String("dest", "", "")'
|
||||
- source: "flag."
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
- source: "telemetry."
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
- source: "View."
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
- source: "tag."
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
- source: "logrus."
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
- source: "stats."
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
- source: "serviceAddressList"
|
||||
linters:
|
||||
- gochecknoglobals
|
||||
|
||||
# Exclude known linters from partially hard-vendored code,
|
||||
# which is impossible to exclude via "nolint" comments.
|
||||
|
@ -16,5 +16,12 @@ FROM golang:latest
|
||||
ENV GO111MODULE=on
|
||||
|
||||
WORKDIR /go/src/open-match.dev/open-match
|
||||
COPY . .
|
||||
|
||||
# First copy only the go.sum and go.mod then download dependencies. Docker
|
||||
# caching is [in]validated by the input files changes. So when the dependencies
|
||||
# for the project don't change, the previous image layer can be re-used. go.sum
|
||||
# is included as its hashing verifies the expected files are downloaded.
|
||||
COPY go.sum go.mod ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
@ -15,7 +15,7 @@
|
||||
FROM debian
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y -qq git make python3 virtualenv curl sudo unzip apt-transport-https ca-certificates curl software-properties-common gnupg2 bc
|
||||
RUN apt-get install -y -qq git make python3 virtualenv curl sudo unzip apt-transport-https ca-certificates curl software-properties-common gnupg2
|
||||
|
||||
# Docker
|
||||
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
|
||||
|
@ -14,20 +14,24 @@
|
||||
|
||||
FROM open-match-base-build as builder
|
||||
|
||||
WORKDIR /go/src/open-match.dev/open-match/cmd/minimatch/
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo .
|
||||
WORKDIR /go/src/open-match.dev/open-match
|
||||
|
||||
ARG IMAGE_TITLE
|
||||
|
||||
RUN make "build/cmd/${IMAGE_TITLE}"
|
||||
|
||||
FROM gcr.io/distroless/static:nonroot
|
||||
ARG IMAGE_TITLE
|
||||
WORKDIR /app/
|
||||
COPY --from=builder --chown=nonroot /go/src/open-match.dev/open-match/cmd/minimatch/minimatch /app/
|
||||
|
||||
ENTRYPOINT ["/app/minimatch"]
|
||||
COPY --from=builder --chown=nonroot "/go/src/open-match.dev/open-match/build/cmd/${IMAGE_TITLE}/" "/app/"
|
||||
|
||||
ENTRYPOINT ["/app/run"]
|
||||
|
||||
# Docker Image Arguments
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
ARG BUILD_VERSION
|
||||
ARG IMAGE_TITLE="Mini Match"
|
||||
|
||||
# Standardized Docker Image Labels
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
604
Makefile
604
Makefile
@ -47,28 +47,24 @@
|
||||
##
|
||||
## Prepare a Pull Request
|
||||
## make presubmit
|
||||
##
|
||||
|
||||
# If you want information on how to edit this file checkout,
|
||||
# http://makefiletutorial.com/
|
||||
|
||||
BASE_VERSION = 0.0.0-dev
|
||||
BASE_VERSION = 0.7.0
|
||||
SHORT_SHA = $(shell git rev-parse --short=7 HEAD | tr -d [:punct:])
|
||||
VERSION_SUFFIX = $(SHORT_SHA)
|
||||
BRANCH_NAME = $(shell git rev-parse --abbrev-ref HEAD | tr -d [:punct:])
|
||||
VERSION = $(BASE_VERSION)-$(VERSION_SUFFIX)
|
||||
VERSION = $(BASE_VERSION)-$(SHORT_SHA)
|
||||
BUILD_DATE = $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
YEAR_MONTH = $(shell date -u +'%Y%m')
|
||||
YEAR_MONTH_DAY = $(shell date -u +'%Y%m%d')
|
||||
MAJOR_MINOR_VERSION = $(shell echo $(BASE_VERSION) | cut -d '.' -f1).$(shell echo $(BASE_VERSION) | cut -d '.' -f2)
|
||||
NANOS = $(shell date -u +'%N')
|
||||
NANOS_MODULO_60 = $(shell echo $(NANOS)%60 | bc)
|
||||
PROTOC_VERSION = 3.8.0
|
||||
HELM_VERSION = 2.14.1
|
||||
HUGO_VERSION = 0.55.6
|
||||
KUBECTL_VERSION = 1.14.3
|
||||
SKAFFOLD_VERSION = latest
|
||||
MINIKUBE_VERSION = latest
|
||||
HTMLTEST_VERSION = 0.10.3
|
||||
GOLANGCI_VERSION = 1.17.1
|
||||
KIND_VERSION = 0.4.0
|
||||
SWAGGERUI_VERSION = 3.23.0
|
||||
@ -116,16 +112,16 @@ HELM = $(TOOLCHAIN_BIN)/helm$(EXE_EXTENSION)
|
||||
TILLER = $(TOOLCHAIN_BIN)/tiller$(EXE_EXTENSION)
|
||||
MINIKUBE = $(TOOLCHAIN_BIN)/minikube$(EXE_EXTENSION)
|
||||
KUBECTL = $(TOOLCHAIN_BIN)/kubectl$(EXE_EXTENSION)
|
||||
HTMLTEST = $(TOOLCHAIN_BIN)/htmltest$(EXE_EXTENSION)
|
||||
KIND = $(TOOLCHAIN_BIN)/kind$(EXE_EXTENSION)
|
||||
HUGO = $(TOOLCHAIN_BIN)/hugo$(EXE_EXTENSION)
|
||||
TERRAFORM = $(TOOLCHAIN_BIN)/terraform$(EXE_EXTENSION)
|
||||
SKAFFOLD = $(TOOLCHAIN_BIN)/skaffold$(EXE_EXTENSION)
|
||||
CERTGEN = $(TOOLCHAIN_BIN)/certgen$(EXE_EXTENSION)
|
||||
GOLANGCI = $(TOOLCHAIN_BIN)/golangci-lint$(EXE_EXTENSION)
|
||||
DOTNET = $(TOOLCHAIN_DIR)/dotnet/dotnet$(EXE_EXTENSION)
|
||||
CHART_TESTING = $(TOOLCHAIN_BIN)/ct$(EXE_EXTENSION)
|
||||
GCLOUD = gcloud --quiet
|
||||
OPEN_MATCH_CHART_NAME = open-match
|
||||
OPEN_MATCH_RELEASE_NAME = open-match
|
||||
OPEN_MATCH_KUBERNETES_NAMESPACE = open-match
|
||||
OPEN_MATCH_SECRETS_DIR = $(REPOSITORY_ROOT)/install/helm/open-match/secrets
|
||||
REDIS_NAME = om-redis
|
||||
@ -146,15 +142,8 @@ OPEN_MATCH_CI_LABEL = open-match-ci
|
||||
ifdef OPEN_MATCH_CI_MODE
|
||||
export KUBECONFIG = $(HOME)/.kube/config
|
||||
GCLOUD = gcloud --quiet --no-user-output-enabled
|
||||
GKE_CLUSTER_NAME = om-cluster-$(SHORT_SHA)
|
||||
GKE_CLUSTER_FLAGS = --labels open-match-ci=1 --node-labels=open-match-ci=1 --network=projects/$(GCP_PROJECT_ID)/global/networks/open-match-ci --subnetwork=projects/$(GCP_PROJECT_ID)/regions/$(GCP_REGION)/subnetworks/ci-$(GCP_REGION)-$(NANOS_MODULO_60)
|
||||
endif
|
||||
|
||||
# If the version is 0.0* then the service name is "development" as in development.open-match.dev.
|
||||
ifeq ($(MAJOR_MINOR_VERSION),0.0)
|
||||
GAE_SERVICE_NAME = development
|
||||
else
|
||||
GAE_SERVICE_NAME = $(shell echo $(MAJOR_MINOR_VERSION) | tr . -)
|
||||
GKE_CLUSTER_NAME = open-match-ci
|
||||
GKE_CLUSTER_FLAGS = --labels open-match-ci=1 --node-labels=open-match-ci=1
|
||||
endif
|
||||
|
||||
export PATH := $(TOOLCHAIN_BIN):$(PATH)
|
||||
@ -171,11 +160,10 @@ ifeq ($(OS),Windows_NT)
|
||||
EXE_EXTENSION = .exe
|
||||
PROTOC_PACKAGE = https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-win64.zip
|
||||
KUBECTL_PACKAGE = https://storage.googleapis.com/kubernetes-release/release/v$(KUBECTL_VERSION)/bin/windows/amd64/kubectl.exe
|
||||
HUGO_PACKAGE = https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_extended_$(HUGO_VERSION)_Windows-64bit.zip
|
||||
HTMLTEST_PACKAGE = https://github.com/wjdp/htmltest/releases/download/v$(HTMLTEST_VERSION)/htmltest_$(HTMLTEST_VERSION)_windows_amd64.zip
|
||||
GOLANGCI_PACKAGE = https://github.com/golangci/golangci-lint/releases/download/v$(GOLANGCI_VERSION)/golangci-lint-$(GOLANGCI_VERSION)-windows-amd64.zip
|
||||
KIND_PACKAGE = https://github.com/kubernetes-sigs/kind/releases/download/v$(KIND_VERSION)/kind-windows-amd64
|
||||
TERRAFORM_PACKAGE = https://releases.hashicorp.com/terraform/$(TERRAFORM_VERSION)/terraform_$(TERRAFORM_VERSION)_windows_amd64.zip
|
||||
DOTNET_PACKAGE = https://download.visualstudio.microsoft.com/download/pr/8ac3e8b7-9918-4e0c-b1be-5aa3e6afd00f/0be99c6ab9362b3c47050cdd50cba846/dotnet-sdk-2.2.402-win-x64.zip
|
||||
CHART_TESTING_PACKAGE = https://github.com/helm/chart-testing/releases/download/v$(CHART_TESTING_VERSION)/chart-testing_$(CHART_TESTING_VERSION)_windows_amd64.zip
|
||||
SED_REPLACE = sed -i
|
||||
else
|
||||
@ -186,11 +174,10 @@ else
|
||||
SKAFFOLD_PACKAGE = https://storage.googleapis.com/skaffold/releases/$(SKAFFOLD_VERSION)/skaffold-linux-amd64
|
||||
PROTOC_PACKAGE = https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-linux-x86_64.zip
|
||||
KUBECTL_PACKAGE = https://storage.googleapis.com/kubernetes-release/release/v$(KUBECTL_VERSION)/bin/linux/amd64/kubectl
|
||||
HUGO_PACKAGE = https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_extended_$(HUGO_VERSION)_Linux-64bit.tar.gz
|
||||
HTMLTEST_PACKAGE = https://github.com/wjdp/htmltest/releases/download/v$(HTMLTEST_VERSION)/htmltest_$(HTMLTEST_VERSION)_linux_amd64.tar.gz
|
||||
GOLANGCI_PACKAGE = https://github.com/golangci/golangci-lint/releases/download/v$(GOLANGCI_VERSION)/golangci-lint-$(GOLANGCI_VERSION)-linux-amd64.tar.gz
|
||||
KIND_PACKAGE = https://github.com/kubernetes-sigs/kind/releases/download/v$(KIND_VERSION)/kind-linux-amd64
|
||||
TERRAFORM_PACKAGE = https://releases.hashicorp.com/terraform/$(TERRAFORM_VERSION)/terraform_$(TERRAFORM_VERSION)_linux_amd64.zip
|
||||
DOTNET_PACKAGE = https://download.visualstudio.microsoft.com/download/pr/46411df1-f625-45c8-b5e7-08ab736d3daa/0fbc446088b471b0a483f42eb3cbf7a2/dotnet-sdk-2.2.402-linux-x64.tar.gz
|
||||
CHART_TESTING_PACKAGE = https://github.com/helm/chart-testing/releases/download/v$(CHART_TESTING_VERSION)/chart-testing_$(CHART_TESTING_VERSION)_linux_amd64.tar.gz
|
||||
SED_REPLACE = sed -i
|
||||
endif
|
||||
@ -200,93 +187,68 @@ else
|
||||
SKAFFOLD_PACKAGE = https://storage.googleapis.com/skaffold/releases/$(SKAFFOLD_VERSION)/skaffold-darwin-amd64
|
||||
PROTOC_PACKAGE = https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-osx-x86_64.zip
|
||||
KUBECTL_PACKAGE = https://storage.googleapis.com/kubernetes-release/release/v$(KUBECTL_VERSION)/bin/darwin/amd64/kubectl
|
||||
HUGO_PACKAGE = https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_extended_$(HUGO_VERSION)_macOS-64bit.tar.gz
|
||||
HTMLTEST_PACKAGE = https://github.com/wjdp/htmltest/releases/download/v$(HTMLTEST_VERSION)/htmltest_$(HTMLTEST_VERSION)_osx_amd64.tar.gz
|
||||
GOLANGCI_PACKAGE = https://github.com/golangci/golangci-lint/releases/download/v$(GOLANGCI_VERSION)/golangci-lint-$(GOLANGCI_VERSION)-darwin-amd64.tar.gz
|
||||
KIND_PACKAGE = https://github.com/kubernetes-sigs/kind/releases/download/v$(KIND_VERSION)/kind-darwin-amd64
|
||||
TERRAFORM_PACKAGE = https://releases.hashicorp.com/terraform/$(TERRAFORM_VERSION)/terraform_$(TERRAFORM_VERSION)_darwin_amd64.zip
|
||||
DOTNET_PACKAGE = https://download.visualstudio.microsoft.com/download/pr/2079de3a-714b-4fa5-840f-70e898b393ef/d631b5018560873ac350d692290881db/dotnet-sdk-2.2.402-osx-x64.tar.gz
|
||||
CHART_TESTING_PACKAGE = https://github.com/helm/chart-testing/releases/download/v$(CHART_TESTING_VERSION)/chart-testing_$(CHART_TESTING_VERSION)_darwin_amd64.tar.gz
|
||||
SED_REPLACE = sed -i ''
|
||||
endif
|
||||
endif
|
||||
|
||||
GOLANG_PROTOS = pkg/pb/backend.pb.go pkg/pb/frontend.pb.go pkg/pb/matchfunction.pb.go pkg/pb/mmlogic.pb.go pkg/pb/messages.pb.go pkg/pb/evaluator.pb.go internal/ipb/synchronizer.pb.go pkg/pb/backend.pb.gw.go pkg/pb/frontend.pb.gw.go pkg/pb/matchfunction.pb.gw.go pkg/pb/mmlogic.pb.gw.go pkg/pb/evaluator.pb.gw.go
|
||||
|
||||
SWAGGER_JSON_DOCS = api/frontend.swagger.json api/backend.swagger.json api/mmlogic.swagger.json api/matchfunction.swagger.json api/evaluator.swagger.json
|
||||
|
||||
ALL_PROTOS = $(GOLANG_PROTOS) $(SWAGGER_JSON_DOCS)
|
||||
|
||||
# CMDS is a list of all folders in cmd/
|
||||
CMDS = $(notdir $(wildcard cmd/*))
|
||||
|
||||
# Names of the individual images, ommiting the openmatch prefix.
|
||||
IMAGES = $(CMDS) mmf-go-soloduel mmf-go-pool mmf-go-rosterbased evaluator-go-simple reaper stress-frontend base-build
|
||||
|
||||
help:
|
||||
@cat Makefile | grep ^\#\# | grep -v ^\#\#\# |cut -c 4-
|
||||
|
||||
local-cloud-build: LOCAL_CLOUD_BUILD_PUSH = # --push
|
||||
local-cloud-build: gcloud
|
||||
cloud-build-local --config=cloudbuild.yaml --dryrun=false $(LOCAL_CLOUD_BUILD_PUSH) --substitutions SHORT_SHA=$(VERSION_SUFFIX),_GCB_POST_SUBMIT=$(_GCB_POST_SUBMIT),_GCB_LATEST_VERSION=$(_GCB_LATEST_VERSION),BRANCH_NAME=$(BRANCH_NAME) .
|
||||
cloud-build-local --config=cloudbuild.yaml --dryrun=false $(LOCAL_CLOUD_BUILD_PUSH) --substitutions SHORT_SHA=$(SHORT_SHA),_GCB_POST_SUBMIT=$(_GCB_POST_SUBMIT),_GCB_LATEST_VERSION=$(_GCB_LATEST_VERSION),BRANCH_NAME=$(BRANCH_NAME) .
|
||||
|
||||
# Below should match push-images
|
||||
retag-images: retag-service-images retag-example-images retag-tool-images retag-stress-test-images
|
||||
################################################################################
|
||||
## #############################################################################
|
||||
## Image commands:
|
||||
## These commands are auto-generated based on a complete list of images. All
|
||||
## folders in cmd/ are turned into an image using Dockerfile.cmd. Additional
|
||||
## images are specified by the IMAGES variable. Image commands ommit the
|
||||
## "openmatch-" prefix on the image name and tags.
|
||||
##
|
||||
|
||||
retag-service-images: retag-backend-image retag-frontend-image retag-mmlogic-image retag-minimatch-image retag-synchronizer-image retag-swaggerui-image
|
||||
retag-example-images: retag-demo-images retag-mmf-example-images retag-evaluator-example-images
|
||||
retag-demo-images: retag-mmf-go-soloduel-image retag-demo-image
|
||||
retag-mmf-example-images: retag-mmf-go-soloduel-image retag-mmf-go-pool-image
|
||||
retag-evaluator-example-images: retag-evaluator-go-simple-image
|
||||
retag-tool-images: retag-reaper-image
|
||||
retag-stress-test-images: retag-stress-frontend-image
|
||||
# Above should match push-images
|
||||
|
||||
retag-%-image: SOURCE_REGISTRY = gcr.io/$(OPEN_MATCH_BUILD_PROJECT_ID)
|
||||
retag-%-image: TARGET_REGISTRY = gcr.io/$(OPEN_MATCH_PUBLIC_IMAGES_PROJECT_ID)
|
||||
retag-%-image: SOURCE_TAG = canary
|
||||
retag-%-image: docker
|
||||
docker pull $(SOURCE_REGISTRY)/openmatch-$*:$(SOURCE_TAG)
|
||||
docker tag $(SOURCE_REGISTRY)/openmatch-$*:$(SOURCE_TAG) $(TARGET_REGISTRY)/openmatch-$*:$(TAG)
|
||||
docker push $(TARGET_REGISTRY)/openmatch-$*:$(TAG)
|
||||
|
||||
# Below should match retag-images
|
||||
push-images: push-service-images push-example-images push-tool-images push-stress-test-images
|
||||
|
||||
push-service-images: push-backend-image push-frontend-image push-mmlogic-image push-minimatch-image push-synchronizer-image push-swaggerui-image
|
||||
push-example-images: push-demo-images push-mmf-example-images push-evaluator-example-images
|
||||
push-demo-images: push-mmf-go-soloduel-image push-demo-image
|
||||
push-mmf-example-images: push-mmf-go-soloduel-image push-mmf-go-pool-image
|
||||
push-evaluator-example-images: push-evaluator-go-simple-image
|
||||
push-tool-images: push-reaper-image
|
||||
push-stress-test-images: push-stress-frontend-image
|
||||
# Above should match retag-images
|
||||
|
||||
push-%-image: build-%-image docker
|
||||
docker push $(REGISTRY)/openmatch-$*:$(TAG)
|
||||
docker push $(REGISTRY)/openmatch-$*:$(ALTERNATE_TAG)
|
||||
ifeq ($(_GCB_POST_SUBMIT),1)
|
||||
docker tag $(REGISTRY)/openmatch-$*:$(TAG) $(REGISTRY)/openmatch-$*:$(VERSIONED_CANARY_TAG)
|
||||
docker push $(REGISTRY)/openmatch-$*:$(VERSIONED_CANARY_TAG)
|
||||
ifeq ($(BASE_VERSION),0.0.0-dev)
|
||||
docker tag $(REGISTRY)/openmatch-$*:$(TAG) $(REGISTRY)/openmatch-$*:$(DATED_CANARY_TAG)
|
||||
docker push $(REGISTRY)/openmatch-$*:$(DATED_CANARY_TAG)
|
||||
docker tag $(REGISTRY)/openmatch-$*:$(TAG) $(REGISTRY)/openmatch-$*:$(CANARY_TAG)
|
||||
docker push $(REGISTRY)/openmatch-$*:$(CANARY_TAG)
|
||||
endif
|
||||
endif
|
||||
|
||||
build-images: build-service-images build-example-images build-tool-images build-stress-test-images
|
||||
|
||||
build-service-images: build-backend-image build-frontend-image build-mmlogic-image build-minimatch-image build-synchronizer-image build-swaggerui-image
|
||||
build-example-images: build-demo-images build-mmf-example-images build-evaluator-example-images
|
||||
build-demo-images: build-mmf-go-soloduel-image build-demo-image
|
||||
build-mmf-example-images: build-mmf-go-soloduel-image build-mmf-go-pool-image
|
||||
build-evaluator-example-images: build-evaluator-go-simple-image
|
||||
build-tool-images: build-reaper-image
|
||||
build-stress-test-images: build-stress-frontend-image
|
||||
#######################################
|
||||
## build-images / build-<image name>-image: builds images locally
|
||||
##
|
||||
build-images: $(foreach IMAGE,$(IMAGES),build-$(IMAGE)-image)
|
||||
|
||||
# Include all-protos here so that all dependencies are guaranteed to be downloaded after the base image is created.
|
||||
# This is important so that the repository does not have any mutations while building individual images.
|
||||
build-base-build-image: docker all-protos
|
||||
docker build -f Dockerfile.base-build -t open-match-base-build .
|
||||
build-base-build-image: docker $(ALL_PROTOS)
|
||||
docker build -f Dockerfile.base-build -t open-match-base-build -t $(REGISTRY)/openmatch-base-build:$(TAG) -t $(REGISTRY)/openmatch-base-build:$(ALTERNATE_TAG) .
|
||||
|
||||
build-%-image: docker build-base-build-image
|
||||
docker build -f cmd/$*/Dockerfile $(IMAGE_BUILD_ARGS) -t $(REGISTRY)/openmatch-$*:$(TAG) -t $(REGISTRY)/openmatch-$*:$(ALTERNATE_TAG) .
|
||||
|
||||
build-demo-image: docker build-base-build-image
|
||||
docker build -f examples/demo/Dockerfile -t $(REGISTRY)/openmatch-demo:$(TAG) -t $(REGISTRY)/openmatch-demo:$(ALTERNATE_TAG) .
|
||||
$(foreach CMD,$(CMDS),build-$(CMD)-image): build-%-image: docker build-base-build-image
|
||||
docker build \
|
||||
-f Dockerfile.cmd \
|
||||
$(IMAGE_BUILD_ARGS) \
|
||||
--build-arg=IMAGE_TITLE=$* \
|
||||
-t $(REGISTRY)/openmatch-$*:$(TAG) \
|
||||
-t $(REGISTRY)/openmatch-$*:$(ALTERNATE_TAG) \
|
||||
.
|
||||
|
||||
build-mmf-go-soloduel-image: docker build-base-build-image
|
||||
docker build -f examples/functions/golang/soloduel/Dockerfile -t $(REGISTRY)/openmatch-mmf-go-soloduel:$(TAG) -t $(REGISTRY)/openmatch-mmf-go-soloduel:$(ALTERNATE_TAG) .
|
||||
|
||||
build-mmf-go-rosterbased-image: docker build-base-build-image
|
||||
docker build -f examples/functions/golang/rosterbased/Dockerfile -t $(REGISTRY)/openmatch-mmf-go-rosterbased:$(TAG) -t $(REGISTRY)/openmatch-mmf-go-rosterbased:$(ALTERNATE_TAG) .
|
||||
|
||||
build-mmf-go-pool-image: docker build-base-build-image
|
||||
docker build -f examples/functions/golang/pool/Dockerfile -t $(REGISTRY)/openmatch-mmf-go-pool:$(TAG) -t $(REGISTRY)/openmatch-mmf-go-pool:$(ALTERNATE_TAG) .
|
||||
|
||||
@ -299,25 +261,50 @@ build-reaper-image: docker build-base-build-image
|
||||
build-stress-frontend-image: docker
|
||||
docker build -f test/stress/Dockerfile -t $(REGISTRY)/openmatch-stress-frontend:$(TAG) -t $(REGISTRY)/openmatch-stress-frontend:$(ALTERNATE_TAG) .
|
||||
|
||||
clean-images: docker
|
||||
#######################################
|
||||
## push-images / push-<image name>-image: builds and pushes images to your
|
||||
## container registry.
|
||||
##
|
||||
push-images: $(foreach IMAGE,$(IMAGES),push-$(IMAGE)-image)
|
||||
|
||||
$(foreach IMAGE,$(IMAGES),push-$(IMAGE)-image): push-%-image: build-%-image docker
|
||||
docker push $(REGISTRY)/openmatch-$*:$(TAG)
|
||||
docker push $(REGISTRY)/openmatch-$*:$(ALTERNATE_TAG)
|
||||
ifeq ($(_GCB_POST_SUBMIT),1)
|
||||
docker tag $(REGISTRY)/openmatch-$*:$(TAG) $(REGISTRY)/openmatch-$*:$(VERSIONED_CANARY_TAG)
|
||||
docker push $(REGISTRY)/openmatch-$*:$(VERSIONED_CANARY_TAG)
|
||||
ifeq ($(BASE_VERSION),0.0.0-dev)
|
||||
docker tag $(REGISTRY)/openmatch-$*:$(TAG) $(REGISTRY)/openmatch-$*:$(DATED_CANARY_TAG)
|
||||
docker push $(REGISTRY)/openmatch-$*:$(DATED_CANARY_TAG)
|
||||
docker tag $(REGISTRY)/openmatch-$*:$(TAG) $(REGISTRY)/openmatch-$*:$(CANARY_TAG)
|
||||
docker push $(REGISTRY)/openmatch-$*:$(CANARY_TAG)
|
||||
endif
|
||||
endif
|
||||
|
||||
#######################################
|
||||
## retag-images / retag-<image name>-image: publishes images on the public
|
||||
## container registry. Used for publishing releases.
|
||||
##
|
||||
retag-images: $(foreach IMAGE,$(IMAGES),retag-$(IMAGE)-image)
|
||||
|
||||
retag-%-image: SOURCE_REGISTRY = gcr.io/$(OPEN_MATCH_BUILD_PROJECT_ID)
|
||||
retag-%-image: TARGET_REGISTRY = gcr.io/$(OPEN_MATCH_PUBLIC_IMAGES_PROJECT_ID)
|
||||
retag-%-image: SOURCE_TAG = canary
|
||||
$(foreach IMAGE,$(IMAGES),retag-$(IMAGE)-image): retag-%-image: docker
|
||||
docker pull $(SOURCE_REGISTRY)/openmatch-$*:$(SOURCE_TAG)
|
||||
docker tag $(SOURCE_REGISTRY)/openmatch-$*:$(SOURCE_TAG) $(TARGET_REGISTRY)/openmatch-$*:$(TAG)
|
||||
docker push $(TARGET_REGISTRY)/openmatch-$*:$(TAG)
|
||||
|
||||
#######################################
|
||||
## clean-images / clean-<image name>-image: removes images from local docker
|
||||
##
|
||||
clean-images: docker $(foreach IMAGE,$(IMAGES),clean-$(IMAGE)-image)
|
||||
-docker rmi -f open-match-base-build
|
||||
-docker rmi -f $(REGISTRY)/openmatch-backend:$(TAG) $(REGISTRY)/openmatch-backend:$(ALTERNATE_TAG)
|
||||
-docker rmi -f $(REGISTRY)/openmatch-frontend:$(TAG) $(REGISTRY)/openmatch-frontend:$(ALTERNATE_TAG)
|
||||
-docker rmi -f $(REGISTRY)/openmatch-mmlogic:$(TAG) $(REGISTRY)/openmatch-mmlogic:$(ALTERNATE_TAG)
|
||||
-docker rmi -f $(REGISTRY)/openmatch-synchronizer:$(TAG) $(REGISTRY)/openmatch-synchronizer:$(ALTERNATE_TAG)
|
||||
-docker rmi -f $(REGISTRY)/openmatch-minimatch:$(TAG) $(REGISTRY)/openmatch-minimatch:$(ALTERNATE_TAG)
|
||||
-docker rmi -f $(REGISTRY)/openmatch-swaggerui:$(TAG) $(REGISTRY)/openmatch-swaggerui:$(ALTERNATE_TAG)
|
||||
|
||||
-docker rmi -f $(REGISTRY)/openmatch-mmf-go-soloduel:$(TAG) $(REGISTRY)/openmatch-mmf-go-soloduel:$(ALTERNATE_TAG)
|
||||
-docker rmi -f $(REGISTRY)/openmatch-mmf-go-pool:$(TAG) $(REGISTRY)/openmatch-mmf-go-pool:$(ALTERNATE_TAG)
|
||||
-docker rmi -f $(REGISTRY)/openmatch-evaluator-go-simple:$(TAG) $(REGISTRY)/openmatch-evaluator-go-simple:$(ALTERNATE_TAG)
|
||||
-docker rmi -f $(REGISTRY)/openmatch-demo:$(TAG) $(REGISTRY)/openmatch-demo:$(ALTERNATE_TAG)
|
||||
-docker rmi -f $(REGISTRY)/openmatch-reaper:$(TAG) $(REGISTRY)/openmatch-reaper:$(ALTERNATE_TAG)
|
||||
-docker rmi -f $(REGISTRY)/openmatch-stress-frontend:$(TAG) $(REGISTRY)/openmatch-stress-frontend:$(ALTERNATE_TAG)
|
||||
|
||||
install-redis: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
$(HELM) upgrade --install --wait --debug $(REDIS_NAME) stable/redis --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE)
|
||||
$(foreach IMAGE,$(IMAGES),clean-$(IMAGE)-image): clean-%-image:
|
||||
-docker rmi -f $(REGISTRY)/openmatch-$*:$(TAG) $(REGISTRY)/openmatch-$*:$(ALTERNATE_TAG)
|
||||
|
||||
#####################################################################################################################
|
||||
update-chart-deps: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
(cd $(REPOSITORY_ROOT)/install/helm/open-match; $(HELM) repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com; $(HELM) dependency update)
|
||||
|
||||
@ -327,10 +314,10 @@ lint-chart: build/toolchain/bin/helm$(EXE_EXTENSION) build/toolchain/bin/ct$(EXE
|
||||
$(CHART_TESTING) lint-and-install --all --chart-yaml-schema $(TOOLCHAIN_BIN)/etc/chart_schema.yaml --lint-conf $(TOOLCHAIN_BIN)/etc/lintconf.yaml --chart-dirs $(REPOSITORY_ROOT)/install/helm/
|
||||
|
||||
print-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
(cd $(REPOSITORY_ROOT)/install/helm; $(HELM) install --name $(OPEN_MATCH_CHART_NAME) --dry-run --debug $(OPEN_MATCH_CHART_NAME))
|
||||
(cd $(REPOSITORY_ROOT)/install/helm; $(HELM) install --name $(OPEN_MATCH_RELEASE_NAME) --dry-run --debug $(OPEN_MATCH_CHART_NAME))
|
||||
|
||||
build/chart/open-match-$(BASE_VERSION).tgz: build/toolchain/bin/helm$(EXE_EXTENSION) lint-chart
|
||||
mkdir -p $(BUILD_DIR)/chart/
|
||||
$(HELM) init --client-only
|
||||
$(HELM) package -d $(BUILD_DIR)/chart/ --version $(BASE_VERSION) $(REPOSITORY_ROOT)/install/helm/open-match
|
||||
|
||||
build/chart/index.yaml: build/toolchain/bin/helm$(EXE_EXTENSION) gcloud build/chart/open-match-$(BASE_VERSION).tgz
|
||||
@ -342,188 +329,140 @@ build/chart/index.yaml.$(YEAR_MONTH_DAY): build/chart/index.yaml
|
||||
|
||||
build/chart/: build/chart/index.yaml build/chart/index.yaml.$(YEAR_MONTH_DAY)
|
||||
|
||||
install-large-chart: build/toolchain/bin/helm$(EXE_EXTENSION) install/helm/open-match/secrets/
|
||||
$(HELM) upgrade $(OPEN_MATCH_CHART_NAME) --install --wait --debug install/helm/open-match \
|
||||
--timeout=400 \
|
||||
--namespace=$(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG) \
|
||||
--set grafana.enabled=true \
|
||||
--set jaeger.enabled=true \
|
||||
--set prometheus.enabled=true \
|
||||
--set redis.enabled=true \
|
||||
--set openmatch.telemetry.stackdriver.enabled=true \
|
||||
--set openmatch.telemetry.stackdriver.gcpProjectId=$(GCP_PROJECT_ID)
|
||||
install-chart-prerequisite: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
$(KUBECTL) apply -f install/gke-metadata-server-workaround.yaml
|
||||
|
||||
install-chart: build/toolchain/bin/helm$(EXE_EXTENSION) install/helm/open-match/secrets/
|
||||
$(HELM) upgrade $(OPEN_MATCH_CHART_NAME) --install --wait --debug install/helm/open-match \
|
||||
--timeout=400 \
|
||||
--namespace=$(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG) \
|
||||
--set grafana.enabled=false \
|
||||
--set jaeger.enabled=false \
|
||||
--set prometheus.enabled=false \
|
||||
--set redis.enabled=true \
|
||||
--set openmatch.telemetry.stackdriver.enabled=true \
|
||||
--set openmatch.telemetry.stackdriver.gcpProjectId=$(GCP_PROJECT_ID)
|
||||
|
||||
install-ci-chart: build/toolchain/bin/helm$(EXE_EXTENSION) install/helm/open-match/secrets/
|
||||
$(HELM) upgrade $(OPEN_MATCH_CHART_NAME) --install --wait --debug install/helm/open-match \
|
||||
install-large-chart: install-chart-prerequisite build/toolchain/bin/helm$(EXE_EXTENSION) install/helm/open-match/secrets/
|
||||
$(HELM) upgrade $(OPEN_MATCH_RELEASE_NAME) --install --wait --debug install/helm/open-match \
|
||||
--timeout=600 \
|
||||
--namespace=$(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG) \
|
||||
--set grafana.enabled=false \
|
||||
--set jaeger.enabled=false \
|
||||
--set prometheus.enabled=false \
|
||||
--set redis.enabled=true \
|
||||
--set openmatch.demoevaluator.install=false \
|
||||
--set openmatch.demofunction.install=false \
|
||||
--set openmatch.demo.install=false \
|
||||
--set openmatch.e2eevaluator.install=true \
|
||||
--set openmatch.e2ematchfunction.install=true \
|
||||
--set openmatch.stresstest.install=true \
|
||||
--set openmatch.telemetry.stackdriver.enabled=true \
|
||||
--set openmatch.telemetry.stackdriver.gcpProjectId=$(GCP_PROJECT_ID)
|
||||
--set global.image.registry=$(REGISTRY) \
|
||||
--set global.image.tag=$(TAG) \
|
||||
--set global.telemetry.grafana.enabled=true \
|
||||
--set global.telemetry.jaeger.enabled=true \
|
||||
--set global.telemetry.prometheus.enabled=true \
|
||||
--set global.logging.rpc.enabled=true \
|
||||
--set global.gcpProjectId=$(GCP_PROJECT_ID)
|
||||
|
||||
install-chart: install-chart-prerequisite build/toolchain/bin/helm$(EXE_EXTENSION) install/helm/open-match/secrets/
|
||||
$(HELM) upgrade $(OPEN_MATCH_RELEASE_NAME) --install --wait --debug install/helm/open-match \
|
||||
--timeout=400 \
|
||||
--namespace=$(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set global.image.registry=$(REGISTRY) \
|
||||
--set global.image.tag=$(TAG) \
|
||||
--set global.gcpProjectId=$(GCP_PROJECT_ID)
|
||||
|
||||
install-scale-chart: build/toolchain/bin/helm$(EXE_EXTENSION) install/helm/open-match/secrets/
|
||||
$(HELM) upgrade $(OPEN_MATCH_RELEASE_NAME) --install --wait --debug install/helm/open-match \
|
||||
--timeout=600 \
|
||||
--namespace=$(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set global.image.registry=$(REGISTRY) \
|
||||
--set global.image.tag=$(TAG) \
|
||||
--set open-match-core.enabled=true \
|
||||
--set open-match-telemetry.enabled=true \
|
||||
--set open-match-demo.enabled=false \
|
||||
--set open-match-customize.enabled=true \
|
||||
--set open-match-customize.function.image=openmatch-mmf-go-rosterbased\
|
||||
--set global.telemetry.grafana.enabled=true \
|
||||
--set global.telemetry.jaeger.enabled=true \
|
||||
--set global.telemetry.prometheus.enabled=true \
|
||||
--set open-match-scale.enabled=true \
|
||||
--set global.logging.rpc.enabled=true \
|
||||
--set global.gcpProjectId=$(GCP_PROJECT_ID)
|
||||
|
||||
install-ci-chart: install-chart-prerequisite build/toolchain/bin/helm$(EXE_EXTENSION) install/helm/open-match/secrets/
|
||||
# Ignore errors result from reruning a failed build
|
||||
-$(KUBECTL) create clusterrolebinding default-view-$(OPEN_MATCH_KUBERNETES_NAMESPACE) --clusterrole=view --serviceaccount=$(OPEN_MATCH_KUBERNETES_NAMESPACE):default
|
||||
$(HELM) upgrade $(OPEN_MATCH_RELEASE_NAME) --install --wait --debug install/helm/open-match \
|
||||
--timeout=600 \
|
||||
--namespace=$(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set global.image.registry=$(REGISTRY) \
|
||||
--set global.image.tag=$(TAG) \
|
||||
--set open-match-test.enabled=true \
|
||||
--set open-match-demo.enabled=false \
|
||||
--set open-match-customize.enabled=false \
|
||||
--set global.gcpProjectId=$(GCP_PROJECT_ID) \
|
||||
--set ci=true
|
||||
|
||||
dry-chart: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
$(HELM) upgrade --install --wait --debug --dry-run $(OPEN_MATCH_CHART_NAME) install/helm/open-match \
|
||||
$(HELM) upgrade --install --wait --debug --dry-run $(OPEN_MATCH_RELEASE_NAME) install/helm/open-match \
|
||||
--namespace=$(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG)
|
||||
--set global.image.registry=$(REGISTRY) \
|
||||
--set global.image.tag=$(TAG)
|
||||
|
||||
delete-chart: build/toolchain/bin/helm$(EXE_EXTENSION) build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
-$(HELM) delete --purge $(OPEN_MATCH_CHART_NAME)
|
||||
-$(HELM) delete --purge $(OPEN_MATCH_RELEASE_NAME)
|
||||
-$(KUBECTL) --ignore-not-found=true delete crd prometheuses.monitoring.coreos.com
|
||||
-$(KUBECTL) --ignore-not-found=true delete crd servicemonitors.monitoring.coreos.com
|
||||
-$(KUBECTL) --ignore-not-found=true delete crd prometheusrules.monitoring.coreos.com
|
||||
-$(KUBECTL) delete namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE)
|
||||
|
||||
install/yaml/: install/yaml/install.yaml install/yaml/install-demo.yaml install/yaml/01-redis-chart.yaml install/yaml/02-open-match.yaml install/yaml/03-prometheus-chart.yaml install/yaml/04-grafana-chart.yaml install/yaml/05-jaeger-chart.yaml
|
||||
install/yaml/: install/yaml/install.yaml install/yaml/01-open-match-core.yaml install/yaml/02-open-match-demo.yaml install/yaml/03-prometheus-chart.yaml install/yaml/04-grafana-chart.yaml install/yaml/05-jaeger-chart.yaml
|
||||
|
||||
install/yaml/01-redis-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
install/yaml/01-open-match-core.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
mkdir -p install/yaml/
|
||||
$(HELM) template --name $(OPEN_MATCH_CHART_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set redis.fullnameOverride='$(REDIS_NAME)' \
|
||||
--set openmatch.config.install=false \
|
||||
--set openmatch.backend.install=false \
|
||||
--set openmatch.frontend.install=false \
|
||||
--set openmatch.mmlogic.install=false \
|
||||
--set openmatch.synchronizer.install=false \
|
||||
--set openmatch.swaggerui.install=false \
|
||||
--set openmatch.demoevaluator.install=false \
|
||||
--set openmatch.demo.install=false \
|
||||
--set openmatch.demofunction.install=false \
|
||||
--set redis.enabled=true \
|
||||
--set prometheus.enabled=false \
|
||||
--set grafana.enabled=false \
|
||||
--set jaeger.enabled=false \
|
||||
install/helm/open-match > install/yaml/01-redis-chart.yaml
|
||||
$(HELM) template --name $(OPEN_MATCH_RELEASE_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set global.image.registry=$(REGISTRY) \
|
||||
--set global.image.tag=$(TAG) \
|
||||
--set open-match-customize.enabled=false \
|
||||
--set open-match-telemetry.enabled=false \
|
||||
--set open-match-demo.enabled=false \
|
||||
install/helm/open-match > install/yaml/01-open-match-core.yaml
|
||||
|
||||
install/yaml/02-open-match.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
install/yaml/02-open-match-demo.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
mkdir -p install/yaml/
|
||||
$(HELM) template --name $(OPEN_MATCH_CHART_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set redis.fullnameOverride='$(REDIS_NAME)' \
|
||||
--set redis.enabled=false \
|
||||
--set prometheus.enabled=false \
|
||||
--set grafana.enabled=false \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG) \
|
||||
--set openmatch.noChartMeta=true \
|
||||
install/helm/open-match > install/yaml/02-open-match.yaml
|
||||
$(HELM) template --name $(OPEN_MATCH_RELEASE_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set global.image.registry=$(REGISTRY) \
|
||||
--set global.image.tag=$(TAG) \
|
||||
--set open-match-core.enabled=false \
|
||||
--set open-match-telemetry.enabled=false \
|
||||
install/helm/open-match > install/yaml/02-open-match-demo.yaml
|
||||
|
||||
install/yaml/03-prometheus-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
mkdir -p install/yaml/
|
||||
$(HELM) template --name $(OPEN_MATCH_CHART_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set redis.enabled=false \
|
||||
--set openmatch.config.install=false \
|
||||
--set openmatch.backend.install=false \
|
||||
--set openmatch.frontend.install=false \
|
||||
--set openmatch.mmlogic.install=false \
|
||||
--set openmatch.synchronizer.install=false \
|
||||
--set openmatch.swaggerui.install=false \
|
||||
--set openmatch.demoevaluator.install=false \
|
||||
--set openmatch.demo.install=false \
|
||||
--set openmatch.demofunction.install=false \
|
||||
--set redis.enabled=false \
|
||||
--set prometheus.enabled=true \
|
||||
--set grafana.enabled=false \
|
||||
--set jaeger.enabled=false \
|
||||
$(HELM) template --name $(OPEN_MATCH_RELEASE_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set global.image.registry=$(REGISTRY) \
|
||||
--set global.image.tag=$(TAG) \
|
||||
--set open-match-customize.enabled=false \
|
||||
--set open-match-demo.enabled=false \
|
||||
--set open-match-core.enabled=false \
|
||||
--set global.telemetry.prometheus.enabled=true \
|
||||
install/helm/open-match > install/yaml/03-prometheus-chart.yaml
|
||||
|
||||
install/yaml/04-grafana-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
mkdir -p install/yaml/
|
||||
$(HELM) template --name $(OPEN_MATCH_CHART_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set redis.enabled=false \
|
||||
--set openmatch.config.install=false \
|
||||
--set openmatch.backend.install=false \
|
||||
--set openmatch.frontend.install=false \
|
||||
--set openmatch.mmlogic.install=false \
|
||||
--set openmatch.synchronizer.install=false \
|
||||
--set openmatch.swaggerui.install=false \
|
||||
--set openmatch.demoevaluator.install=false \
|
||||
--set openmatch.demo.install=false \
|
||||
--set openmatch.demofunction.install=false \
|
||||
--set redis.enabled=false \
|
||||
--set prometheus.enabled=false \
|
||||
--set grafana.enabled=true \
|
||||
--set jaeger.enabled=false \
|
||||
$(HELM) template --name $(OPEN_MATCH_RELEASE_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set global.image.registry=$(REGISTRY) \
|
||||
--set global.image.tag=$(TAG) \
|
||||
--set open-match-customize.enabled=false \
|
||||
--set open-match-demo.enabled=false \
|
||||
--set open-match-core.enabled=false \
|
||||
--set global.telemetry.grafana.enabled=true \
|
||||
install/helm/open-match > install/yaml/04-grafana-chart.yaml
|
||||
|
||||
install/yaml/05-jaeger-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
mkdir -p install/yaml/
|
||||
$(HELM) template --name $(OPEN_MATCH_CHART_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set redis.fullnameOverride='$(REDIS_NAME)' \
|
||||
--set openmatch.config.install=false \
|
||||
--set openmatch.backend.install=false \
|
||||
--set openmatch.frontend.install=false \
|
||||
--set openmatch.mmlogic.install=false \
|
||||
--set openmatch.synchronizer.install=false \
|
||||
--set openmatch.swaggerui.install=false \
|
||||
--set openmatch.demoevaluator.install=false \
|
||||
--set openmatch.demo.install=false \
|
||||
--set openmatch.demofunction.install=false \
|
||||
--set redis.enabled=false \
|
||||
--set prometheus.enabled=false \
|
||||
--set grafana.enabled=false \
|
||||
--set jaeger.enabled=true \
|
||||
$(HELM) template --name $(OPEN_MATCH_RELEASE_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set global.image.registry=$(REGISTRY) \
|
||||
--set global.image.tag=$(TAG) \
|
||||
--set open-match-customize.enabled=false \
|
||||
--set open-match-demo.enabled=false \
|
||||
--set open-match-core.enabled=false \
|
||||
--set global.telemetry.jaeger.enabled=true \
|
||||
install/helm/open-match > install/yaml/05-jaeger-chart.yaml
|
||||
|
||||
install/yaml/install.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
mkdir -p install/yaml/
|
||||
$(HELM) template --name $(OPEN_MATCH_CHART_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG) \
|
||||
--set openmatch.demoevaluator.install=false \
|
||||
--set openmatch.demo.install=false \
|
||||
--set openmatch.demofunction.install=false \
|
||||
--set redis.enabled=true \
|
||||
--set prometheus.enabled=true \
|
||||
--set grafana.enabled=true \
|
||||
--set jaeger.enabled=true \
|
||||
$(HELM) template --name $(OPEN_MATCH_RELEASE_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set global.image.registry=$(REGISTRY) \
|
||||
--set global.image.tag=$(TAG) \
|
||||
--set open-match-customize.enabled=false \
|
||||
--set open-match-demo.enabled=false \
|
||||
--set global.telemetry.jaeger.enabled=true \
|
||||
--set global.telemetry.grafana.enabled=true \
|
||||
--set global.telemetry.prometheus.enabled=true \
|
||||
install/helm/open-match > install/yaml/install.yaml
|
||||
|
||||
install/yaml/install-demo.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
|
||||
mkdir -p install/yaml/
|
||||
$(HELM) template --name $(OPEN_MATCH_CHART_NAME) --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG) \
|
||||
--set openmatch.config.install=false \
|
||||
--set openmatch.backend.install=false \
|
||||
--set openmatch.frontend.install=false \
|
||||
--set openmatch.mmlogic.install=false \
|
||||
--set openmatch.synchronizer.install=false \
|
||||
--set openmatch.swaggerui.install=false \
|
||||
--set openmatch.demoevaluator.install=true \
|
||||
--set openmatch.demo.install=true \
|
||||
--set openmatch.demofunction.install=true \
|
||||
--set redis.enabled=false \
|
||||
--set prometheus.enabled=false \
|
||||
--set grafana.enabled=false \
|
||||
--set jaeger.enabled=false \
|
||||
install/helm/open-match > install/yaml/install-demo.yaml
|
||||
|
||||
set-redis-password:
|
||||
@stty -echo; \
|
||||
printf "Redis password: "; \
|
||||
@ -598,11 +537,21 @@ build/toolchain/bin/terraform$(EXE_EXTENSION):
|
||||
mv $(TOOLCHAIN_DIR)/temp-terraform/terraform$(EXE_EXTENSION) $(TOOLCHAIN_BIN)/terraform$(EXE_EXTENSION)
|
||||
rm -rf $(TOOLCHAIN_DIR)/temp-terraform/
|
||||
|
||||
build/toolchain/dotnet/:
|
||||
mkdir -p $(TOOLCHAIN_DIR)/dotnet
|
||||
ifeq ($(suffix $(DOTNET_PACKAGE)),.zip)
|
||||
cd $(TOOLCHAIN_DIR)/dotnet && curl -Lo dotnet.zip $(DOTNET_PACKAGE) && unzip -j -q -o dotnet.zip
|
||||
rm -rf $(TOOLCHAIN_DIR)/dotnet.zip
|
||||
else
|
||||
cd $(TOOLCHAIN_DIR)/dotnet && curl -Lo dotnet.tar.gz $(DOTNET_PACKAGE) && tar xzf dotnet.tar.gz --strip-components 1
|
||||
rm -rf $(TOOLCHAIN_DIR)/dotnet.tar.gz
|
||||
endif
|
||||
|
||||
build/toolchain/python/:
|
||||
virtualenv --python=python3 $(TOOLCHAIN_DIR)/python/
|
||||
# Hack to workaround some crazy bug in pip that's chopping off python executable's name.
|
||||
cd $(TOOLCHAIN_DIR)/python/bin && ln -s python3 pytho
|
||||
cd $(TOOLCHAIN_DIR)/python/ && . bin/activate && pip install locustio && deactivate
|
||||
cd $(TOOLCHAIN_DIR)/python/ && . bin/activate && pip install locustio google-cloud-storage && deactivate
|
||||
|
||||
build/toolchain/bin/protoc$(EXE_EXTENSION):
|
||||
mkdir -p $(TOOLCHAIN_BIN)
|
||||
@ -629,6 +578,9 @@ build/toolchain/bin/reaper$(EXE_EXTENSION): tools/reaper/reaper$(EXE_EXTENSION)
|
||||
mkdir -p $(TOOLCHAIN_BIN)
|
||||
cp -f $(REPOSITORY_ROOT)/tools/reaper/reaper$(EXE_EXTENSION) $(TOOLCHAIN_BIN)/reaper$(EXE_EXTENSION)
|
||||
|
||||
push-helm-ci: build/toolchain/bin/helm$(EXE_EXTENSION) build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
$(HELM) init --service-account tiller --force-upgrade --client-only
|
||||
|
||||
push-helm: build/toolchain/bin/helm$(EXE_EXTENSION) build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
$(KUBECTL) create serviceaccount --namespace kube-system tiller
|
||||
$(HELM) init --service-account tiller --force-upgrade
|
||||
@ -637,6 +589,7 @@ ifneq ($(strip $($(KUBECTL) get clusterroles | grep -i rbac)),)
|
||||
$(KUBECTL) patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
|
||||
endif
|
||||
@echo "Waiting for Tiller to become ready..."
|
||||
$(KUBECTL) wait deployment --timeout=60s --for condition=available -l app=helm,name=tiller --namespace kube-system
|
||||
$(KUBECTL) wait pod --timeout=60s --for condition=Ready -l app=helm,name=tiller --namespace kube-system
|
||||
|
||||
delete-helm: build/toolchain/bin/helm$(EXE_EXTENSION) build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@ -701,7 +654,12 @@ create-gke-cluster: GKE_VERSION = 1.13.6 # gcloud beta container get-server-conf
|
||||
create-gke-cluster: GKE_CLUSTER_SHAPE_FLAGS = --machine-type n1-standard-4 --enable-autoscaling --min-nodes 1 --num-nodes 2 --max-nodes 10 --disk-size 50
|
||||
create-gke-cluster: GKE_FUTURE_COMPAT_FLAGS = --no-enable-basic-auth --no-issue-client-certificate --enable-ip-alias --metadata disable-legacy-endpoints=true --enable-autoupgrade
|
||||
create-gke-cluster: build/toolchain/bin/kubectl$(EXE_EXTENSION) gcloud
|
||||
$(GCLOUD) beta $(GCP_PROJECT_FLAG) container clusters create $(GKE_CLUSTER_NAME) $(GCP_LOCATION_FLAG) --enable-pod-security-policy --cluster-version $(GKE_VERSION) --image-type cos_containerd --tags open-match $(GKE_CLUSTER_SHAPE_FLAGS) $(GKE_FUTURE_COMPAT_FLAGS) $(GKE_CLUSTER_FLAGS)
|
||||
$(GCLOUD) beta $(GCP_PROJECT_FLAG) container clusters create $(GKE_CLUSTER_NAME) $(GCP_LOCATION_FLAG) $(GKE_CLUSTER_SHAPE_FLAGS) $(GKE_FUTURE_COMPAT_FLAGS) $(GKE_CLUSTER_FLAGS) \
|
||||
--enable-pod-security-policy \
|
||||
--cluster-version $(GKE_VERSION) \
|
||||
--image-type cos_containerd \
|
||||
--tags open-match \
|
||||
--identity-namespace=$(GCP_PROJECT_ID).svc.id.goog
|
||||
$(KUBECTL) create clusterrolebinding myname-cluster-admin-binding --clusterrole=cluster-admin --user=$(GCLOUD_ACCOUNT_EMAIL)
|
||||
|
||||
delete-gke-cluster: gcloud
|
||||
@ -716,38 +674,32 @@ delete-mini-cluster: build/toolchain/bin/minikube$(EXE_EXTENSION)
|
||||
gcp-apply-binauthz-policy: build/policies/binauthz.yaml
|
||||
$(GCLOUD) beta $(GCP_PROJECT_FLAG) container binauthz policy import build/policies/binauthz.yaml
|
||||
|
||||
all-protos: golang-protos http-proxy-golang-protos swagger-json-docs
|
||||
|
||||
golang-protos: pkg/pb/backend.pb.go pkg/pb/frontend.pb.go pkg/pb/matchfunction.pb.go pkg/pb/messages.pb.go pkg/pb/mmlogic.pb.go pkg/pb/messages.pb.go pkg/pb/evaluator.pb.go internal/pb/synchronizer.pb.go
|
||||
|
||||
http-proxy-golang-protos: pkg/pb/backend.pb.gw.go pkg/pb/frontend.pb.gw.go pkg/pb/matchfunction.pb.gw.go pkg/pb/messages.pb.gw.go pkg/pb/mmlogic.pb.gw.go pkg/pb/evaluator.pb.gw.go internal/pb/synchronizer.pb.gw.go
|
||||
|
||||
swagger-json-docs: api/frontend.swagger.json api/backend.swagger.json api/mmlogic.swagger.json api/matchfunction.swagger.json api/synchronizer.swagger.json api/evaluator.swagger.json
|
||||
all-protos: $(ALL_PROTOS)
|
||||
|
||||
# The proto generator really wants to be run from the $GOPATH root, and doesn't
|
||||
# support methods for directing it to the correct location that's not the proto
|
||||
# file's location. So instead put it in a tempororary directory, then move it
|
||||
# out.
|
||||
pkg/pb/%.pb.go: api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION)
|
||||
mkdir -p $(REPOSITORY_ROOT)/pkg/pb
|
||||
mkdir -p $(REPOSITORY_ROOT)/build/prototmp $(REPOSITORY_ROOT)/pkg/pb
|
||||
$(PROTOC) $< \
|
||||
-I $(REPOSITORY_ROOT) -I $(PROTOC_INCLUDES) \
|
||||
--go_out=plugins=grpc:$(REPOSITORY_ROOT)
|
||||
--go_out=plugins=grpc:$(REPOSITORY_ROOT)/build/prototmp
|
||||
mv $(REPOSITORY_ROOT)/build/prototmp/open-match.dev/open-match/$@ $@
|
||||
|
||||
internal/pb/%.pb.go: api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION)
|
||||
mkdir -p $(REPOSITORY_ROOT)/internal/pb
|
||||
internal/ipb/%.pb.go: internal/api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION)
|
||||
mkdir -p $(REPOSITORY_ROOT)/build/prototmp $(REPOSITORY_ROOT)/internal/ipb
|
||||
$(PROTOC) $< \
|
||||
-I $(REPOSITORY_ROOT) -I $(PROTOC_INCLUDES) \
|
||||
--go_out=plugins=grpc:$(REPOSITORY_ROOT)
|
||||
$(SED_REPLACE) 's|pkg/pb|open-match.dev/open-match/pkg/pb|' $@
|
||||
--go_out=plugins=grpc:$(REPOSITORY_ROOT)/build/prototmp
|
||||
mv $(REPOSITORY_ROOT)/build/prototmp/open-match.dev/open-match/$@ $@
|
||||
|
||||
pkg/pb/%.pb.gw.go: api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION)
|
||||
mkdir -p $(REPOSITORY_ROOT)/pkg/pb
|
||||
mkdir -p $(REPOSITORY_ROOT)/build/prototmp $(REPOSITORY_ROOT)/pkg/pb
|
||||
$(PROTOC) $< \
|
||||
-I $(REPOSITORY_ROOT) -I $(PROTOC_INCLUDES) \
|
||||
--grpc-gateway_out=logtostderr=true,allow_delete_body=true:$(REPOSITORY_ROOT)
|
||||
|
||||
internal/pb/%.pb.gw.go: api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-go$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-grpc-gateway$(EXE_EXTENSION)
|
||||
mkdir -p $(REPOSITORY_ROOT)/internal/pb
|
||||
$(PROTOC) $< \
|
||||
-I $(REPOSITORY_ROOT) -I $(PROTOC_INCLUDES) \
|
||||
--grpc-gateway_out=logtostderr=true,allow_delete_body=true:$(REPOSITORY_ROOT)
|
||||
--grpc-gateway_out=logtostderr=true,allow_delete_body=true:$(REPOSITORY_ROOT)/build/prototmp
|
||||
mv $(REPOSITORY_ROOT)/build/prototmp/open-match.dev/open-match/$@ $@
|
||||
|
||||
api/%.swagger.json: api/%.proto third_party/ build/toolchain/bin/protoc$(EXE_EXTENSION) build/toolchain/bin/protoc-gen-swagger$(EXE_EXTENSION)
|
||||
$(PROTOC) $< \
|
||||
@ -760,18 +712,20 @@ pkg/pb/frontend.pb.go: pkg/pb/messages.pb.go
|
||||
pkg/pb/matchfunction.pb.go: pkg/pb/messages.pb.go
|
||||
pkg/pb/mmlogic.pb.go: pkg/pb/messages.pb.go
|
||||
pkg/pb/evaluator.pb.go: pkg/pb/messages.pb.go
|
||||
internal/pb/synchronizer.pb.go: pkg/pb/messages.pb.go
|
||||
internal/ipb/synchronizer.pb.go: pkg/pb/messages.pb.go
|
||||
|
||||
build: assets
|
||||
$(GO) build ./...
|
||||
$(GO) build -tags e2ecluster ./...
|
||||
$(GO) build -tags e2ecluster ./...
|
||||
|
||||
test: assets
|
||||
test: $(ALL_PROTOS) tls-certs third_party/
|
||||
$(GO) test -cover -test.count $(GOLANG_TEST_COUNT) -race ./...
|
||||
$(GO) test -cover -test.count $(GOLANG_TEST_COUNT) -run IgnoreRace$$ ./...
|
||||
|
||||
test-e2e-cluster: assets
|
||||
$(GO) test ./... -race -tags e2ecluster
|
||||
test-e2e-cluster: all-protos tls-certs third_party/
|
||||
-$(KUBECTL) wait job --for condition=complete -n $(OPEN_MATCH_KUBERNETES_NAMESPACE) -l component=e2e-job --timeout 150s
|
||||
$(KUBECTL) logs job/e2e-job -n $(OPEN_MATCH_KUBERNETES_NAMESPACE)
|
||||
$(KUBECTL) wait job --for condition=complete -n $(OPEN_MATCH_KUBERNETES_NAMESPACE) -l component=e2e-job --timeout 0
|
||||
|
||||
stress-frontend-%: build/toolchain/python/
|
||||
$(TOOLCHAIN_DIR)/python/bin/locust -f $(REPOSITORY_ROOT)/test/stress/frontend.py --host=http://localhost:$(FRONTEND_PORT) \
|
||||
@ -785,11 +739,37 @@ vet:
|
||||
$(GO) vet ./...
|
||||
|
||||
golangci: build/toolchain/bin/golangci-lint$(EXE_EXTENSION)
|
||||
GO111MODULE=on $(GOLANGCI) run --config=$(REPOSITORY_ROOT)/.golangci.yaml
|
||||
-GO111MODULE=on $(GOLANGCI) run --config=$(REPOSITORY_ROOT)/.golangci.yaml
|
||||
|
||||
lint: fmt vet golangci lint-chart terraform-lint
|
||||
|
||||
assets: all-protos tls-certs third_party/ build/chart/
|
||||
assets: $(ALL_PROTOS) tls-certs third_party/ build/chart/
|
||||
|
||||
build/cmd: $(foreach CMD,$(CMDS),build/cmd/$(CMD))
|
||||
|
||||
# Building a given build/cmd folder is split into two pieces: BUILD_PHONY and
|
||||
# COPY_PHONY. The BUILD_PHONY is the common go build command, which is
|
||||
# reusable. The COPY_PHONY is used by some targets which require additional
|
||||
# files to be included in the image.
|
||||
$(foreach CMD,$(CMDS),build/cmd/$(CMD)): build/cmd/%: build/cmd/%/BUILD_PHONY build/cmd/%/COPY_PHONY
|
||||
|
||||
build/cmd/%/BUILD_PHONY:
|
||||
mkdir -p $(BUILD_DIR)/cmd/$*
|
||||
CGO_ENABLED=0 $(GO) build -a -installsuffix cgo -o $(BUILD_DIR)/cmd/$*/run open-match.dev/open-match/cmd/$*
|
||||
|
||||
# Default is that nothing needs to be copied into the direcotry
|
||||
build/cmd/%/COPY_PHONY:
|
||||
#
|
||||
|
||||
build/cmd/swaggerui/COPY_PHONY:
|
||||
mkdir -p $(BUILD_DIR)/cmd/swaggerui/static/api
|
||||
cp third_party/swaggerui/* $(BUILD_DIR)/cmd/swaggerui/static/
|
||||
$(SED_REPLACE) 's|https://open-match.dev/api/v.*/|/api/|g' $(BUILD_DIR)/cmd/swaggerui/static/config.json
|
||||
cp api/*.json $(BUILD_DIR)/cmd/swaggerui/static/api/
|
||||
|
||||
build/cmd/demo-%/COPY_PHONY:
|
||||
mkdir -p $(BUILD_DIR)/cmd/demo-$*/
|
||||
cp -r examples/demo/static $(BUILD_DIR)/cmd/demo-$*/static
|
||||
|
||||
all: service-binaries example-binaries tools-binaries
|
||||
|
||||
@ -798,12 +778,15 @@ service-binaries: cmd/backend/backend$(EXE_EXTENSION) cmd/frontend/frontend$(EXE
|
||||
service-binaries: cmd/mmlogic/mmlogic$(EXE_EXTENSION) cmd/synchronizer/synchronizer$(EXE_EXTENSION)
|
||||
|
||||
example-binaries: example-mmf-binaries example-evaluator-binaries
|
||||
example-mmf-binaries: examples/functions/golang/soloduel/soloduel$(EXE_EXTENSION) examples/functions/golang/pool/pool$(EXE_EXTENSION)
|
||||
example-mmf-binaries: examples/functions/golang/soloduel/soloduel$(EXE_EXTENSION) examples/functions/golang/pool/pool$(EXE_EXTENSION) examples/functions/golang/rosterbased/rosterbased$(EXE_EXTENSION)
|
||||
example-evaluator-binaries: examples/evaluator/golang/simple/simple$(EXE_EXTENSION)
|
||||
|
||||
examples/functions/golang/soloduel/soloduel$(EXE_EXTENSION): pkg/pb/mmlogic.pb.go pkg/pb/mmlogic.pb.gw.go api/mmlogic.swagger.json pkg/pb/matchfunction.pb.go pkg/pb/matchfunction.pb.gw.go api/matchfunction.swagger.json
|
||||
cd $(REPOSITORY_ROOT)/examples/functions/golang/soloduel; $(GO_BUILD_COMMAND)
|
||||
|
||||
examples/functions/golang/rosterbased/rosterbased$(EXE_EXTENSION): pkg/pb/mmlogic.pb.go pkg/pb/mmlogic.pb.gw.go api/mmlogic.swagger.json pkg/pb/matchfunction.pb.go pkg/pb/matchfunction.pb.gw.go api/matchfunction.swagger.json
|
||||
cd $(REPOSITORY_ROOT)/examples/functions/golang/rosterbased; $(GO_BUILD_COMMAND)
|
||||
|
||||
examples/functions/golang/pool/pool$(EXE_EXTENSION): pkg/pb/mmlogic.pb.go pkg/pb/mmlogic.pb.gw.go api/mmlogic.swagger.json pkg/pb/matchfunction.pb.go pkg/pb/matchfunction.pb.gw.go api/matchfunction.swagger.json
|
||||
cd $(REPOSITORY_ROOT)/examples/functions/golang/pool; $(GO_BUILD_COMMAND)
|
||||
|
||||
@ -821,7 +804,7 @@ cmd/frontend/frontend$(EXE_EXTENSION): pkg/pb/frontend.pb.go pkg/pb/frontend.pb.
|
||||
cmd/mmlogic/mmlogic$(EXE_EXTENSION): pkg/pb/mmlogic.pb.go pkg/pb/mmlogic.pb.gw.go api/mmlogic.swagger.json
|
||||
cd $(REPOSITORY_ROOT)/cmd/mmlogic; $(GO_BUILD_COMMAND)
|
||||
|
||||
cmd/synchronizer/synchronizer$(EXE_EXTENSION): internal/pb/synchronizer.pb.go internal/pb/synchronizer.pb.gw.go api/synchronizer.swagger.json
|
||||
cmd/synchronizer/synchronizer$(EXE_EXTENSION): internal/ipb/synchronizer.pb.go
|
||||
cd $(REPOSITORY_ROOT)/cmd/synchronizer; $(GO_BUILD_COMMAND)
|
||||
|
||||
# Note: This list of dependencies is long but only add file references here. If you add a .PHONY dependency make will always rebuild it.
|
||||
@ -831,7 +814,7 @@ cmd/minimatch/minimatch$(EXE_EXTENSION): pkg/pb/mmlogic.pb.go pkg/pb/mmlogic.pb.
|
||||
cmd/minimatch/minimatch$(EXE_EXTENSION): pkg/pb/evaluator.pb.go pkg/pb/evaluator.pb.gw.go api/evaluator.swagger.json
|
||||
cmd/minimatch/minimatch$(EXE_EXTENSION): pkg/pb/matchfunction.pb.go pkg/pb/matchfunction.pb.gw.go api/matchfunction.swagger.json
|
||||
cmd/minimatch/minimatch$(EXE_EXTENSION): pkg/pb/messages.pb.go
|
||||
cmd/minimatch/minimatch$(EXE_EXTENSION): internal/pb/synchronizer.pb.go internal/pb/synchronizer.pb.gw.go api/synchronizer.swagger.json
|
||||
cmd/minimatch/minimatch$(EXE_EXTENSION): internal/ipb/synchronizer.pb.go
|
||||
cd $(REPOSITORY_ROOT)/cmd/minimatch; $(GO_BUILD_COMMAND)
|
||||
|
||||
cmd/swaggerui/swaggerui$(EXE_EXTENSION): third_party/swaggerui/
|
||||
@ -879,9 +862,9 @@ build/certificates/: build/toolchain/bin/certgen$(EXE_EXTENSION)
|
||||
cd $(BUILD_DIR)/certificates/ && $(CERTGEN)
|
||||
|
||||
md-test: docker
|
||||
docker run -t --rm -v $(CURDIR):/mnt:ro dkhamsing/awesome_bot --white-list "localhost,github.com/googleforgames/open-match/tree/release-,github.com/googleforgames/open-match/blob/release-,github.com/googleforgames/open-match/releases/download/v" --allow-dupe --allow-redirect --skip-save-results `find . -type f -name '*.md' -not -path './build/*' -not -path './.git*'`
|
||||
docker run -t --rm -v $(CURDIR):/mnt:ro dkhamsing/awesome_bot --white-list "localhost,https://goreportcard.com,github.com/googleforgames/open-match/tree/release-,github.com/googleforgames/open-match/blob/release-,github.com/googleforgames/open-match/releases/download/v,https://swagger.io/tools/swagger-codegen/" --allow-dupe --allow-redirect --skip-save-results `find . -type f -name '*.md' -not -path './build/*' -not -path './.git*'`
|
||||
|
||||
ci-deploy-artifacts: install/yaml/ swagger-json-docs build/chart/ gcloud
|
||||
ci-deploy-artifacts: install/yaml/ $(SWAGGER_JSON_DOCS) build/chart/ gcloud
|
||||
ifeq ($(_GCB_POST_SUBMIT),1)
|
||||
gsutil cp -a public-read $(REPOSITORY_ROOT)/install/yaml/* gs://open-match-chart/install/v$(BASE_VERSION)/yaml/
|
||||
gsutil cp -a public-read $(REPOSITORY_ROOT)/api/*.json gs://open-match-chart/api/v$(BASE_VERSION)/
|
||||
@ -894,14 +877,14 @@ else
|
||||
@echo "Not deploying build artifacts to open-match.dev because this is not a post commit change."
|
||||
endif
|
||||
|
||||
ci-reap-clusters: build/toolchain/bin/reaper$(EXE_EXTENSION)
|
||||
$(TOOLCHAIN_BIN)/reaper -project=$(GCP_PROJECT_ID) -age=30m -location=$(GCP_ZONE) -label=$(OPEN_MATCH_CI_LABEL)
|
||||
ci-reap-namespaces: build/toolchain/bin/reaper$(EXE_EXTENSION)
|
||||
$(TOOLCHAIN_BIN)/reaper -age=30m
|
||||
|
||||
# For presubmit we want to update the protobuf generated files and verify that tests are good.
|
||||
presubmit: GOLANG_TEST_COUNT = 5
|
||||
presubmit: clean update-deps third_party/ assets lint build install-toolchain test md-test terraform-test
|
||||
|
||||
build/release/: presubmit clean-install-yaml install/yaml/
|
||||
build/release/: clean-install-yaml update-chart-deps install/yaml/
|
||||
mkdir -p $(BUILD_DIR)/release/
|
||||
cp $(REPOSITORY_ROOT)/install/yaml/* $(BUILD_DIR)/release/
|
||||
|
||||
@ -923,17 +906,14 @@ preview-release: validate-preview-release build/release/ retag-images ci-deploy-
|
||||
|
||||
release: REGISTRY = gcr.io/$(OPEN_MATCH_PUBLIC_IMAGES_PROJECT_ID)
|
||||
release: TAG = $(BASE_VERSION)
|
||||
release: build/release/
|
||||
release: presubmit build/release/
|
||||
|
||||
clean-secrets:
|
||||
rm -rf $(OPEN_MATCH_SECRETS_DIR)
|
||||
|
||||
clean-release:
|
||||
rm -rf $(BUILD_DIR)/release/
|
||||
|
||||
clean-protos:
|
||||
rm -rf $(REPOSITORY_ROOT)/pkg/pb/
|
||||
rm -rf $(REPOSITORY_ROOT)/internal/pb/
|
||||
rm -rf $(REPOSITORY_ROOT)/internal/ipb/
|
||||
|
||||
clean-binaries:
|
||||
rm -rf $(REPOSITORY_ROOT)/cmd/backend/backend$(EXE_EXTENSION)
|
||||
@ -942,6 +922,7 @@ clean-binaries:
|
||||
rm -rf $(REPOSITORY_ROOT)/cmd/mmlogic/mmlogic$(EXE_EXTENSION)
|
||||
rm -rf $(REPOSITORY_ROOT)/cmd/minimatch/minimatch$(EXE_EXTENSION)
|
||||
rm -rf $(REPOSITORY_ROOT)/examples/functions/golang/soloduel/soloduel$(EXE_EXTENSION)
|
||||
rm -rf $(REPOSITORY_ROOT)/examples/functions/golang/rosterbased/rosterbased$(EXE_EXTENSION)
|
||||
rm -rf $(REPOSITORY_ROOT)/examples/functions/golang/pool/pool$(EXE_EXTENSION)
|
||||
rm -rf $(REPOSITORY_ROOT)/examples/functions/golang/simple/evaluator$(EXE_EXTENSION)
|
||||
rm -rf $(REPOSITORY_ROOT)/cmd/swaggerui/swaggerui$(EXE_EXTENSION)
|
||||
@ -951,9 +932,12 @@ clean-binaries:
|
||||
clean-terraform:
|
||||
rm -rf $(REPOSITORY_ROOT)/install/terraform/.terraform/
|
||||
|
||||
clean-build: clean-toolchain clean-archives clean-release
|
||||
clean-build: clean-toolchain clean-archives clean-release clean-chart
|
||||
rm -rf $(BUILD_DIR)/
|
||||
|
||||
clean-release:
|
||||
rm -rf $(BUILD_DIR)/release/
|
||||
|
||||
clean-toolchain:
|
||||
rm -rf $(TOOLCHAIN_DIR)/
|
||||
|
||||
@ -976,57 +960,54 @@ clean-swagger-docs:
|
||||
clean-third-party:
|
||||
rm -rf $(REPOSITORY_ROOT)/third_party/
|
||||
|
||||
clean-swaggerui:
|
||||
rm -rf $(REPOSITORY_ROOT)/third_party/swaggerui/
|
||||
|
||||
clean: clean-images clean-binaries clean-release clean-chart clean-build clean-protos clean-swagger-docs clean-install-yaml clean-stress-test-tools clean-secrets clean-swaggerui clean-terraform clean-third-party
|
||||
clean: clean-images clean-binaries clean-build clean-install-yaml clean-stress-test-tools clean-secrets clean-terraform clean-third-party clean-protos clean-swagger-docs
|
||||
|
||||
proxy-frontend: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "Frontend Health: http://localhost:$(FRONTEND_PORT)/healthz"
|
||||
@echo "Frontend RPC: http://localhost:$(FRONTEND_PORT)/debug/rpcz"
|
||||
@echo "Frontend Trace: http://localhost:$(FRONTEND_PORT)/debug/tracez"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=frontend,release=$(OPEN_MATCH_CHART_NAME)" --output jsonpath='{.items[0].metadata.name}') $(FRONTEND_PORT):51504 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=frontend,release=$(OPEN_MATCH_RELEASE_NAME)" --output jsonpath='{.items[0].metadata.name}') $(FRONTEND_PORT):51504 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-backend: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "Backend Health: http://localhost:$(BACKEND_PORT)/healthz"
|
||||
@echo "Backend RPC: http://localhost:$(BACKEND_PORT)/debug/rpcz"
|
||||
@echo "Backend Trace: http://localhost:$(BACKEND_PORT)/debug/tracez"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=backend,release=$(OPEN_MATCH_CHART_NAME)" --output jsonpath='{.items[0].metadata.name}') $(BACKEND_PORT):51505 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=backend,release=$(OPEN_MATCH_RELEASE_NAME)" --output jsonpath='{.items[0].metadata.name}') $(BACKEND_PORT):51505 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-mmlogic: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "MmLogic Health: http://localhost:$(MMLOGIC_PORT)/healthz"
|
||||
@echo "MmLogic RPC: http://localhost:$(MMLOGIC_PORT)/debug/rpcz"
|
||||
@echo "MmLogic Trace: http://localhost:$(MMLOGIC_PORT)/debug/tracez"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=mmlogic,release=$(OPEN_MATCH_CHART_NAME)" --output jsonpath='{.items[0].metadata.name}') $(MMLOGIC_PORT):51503 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=mmlogic,release=$(OPEN_MATCH_RELEASE_NAME)" --output jsonpath='{.items[0].metadata.name}') $(MMLOGIC_PORT):51503 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-synchronizer: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "Synchronizer Health: http://localhost:$(SYNCHRONIZER_PORT)/healthz"
|
||||
@echo "Synchronizer RPC: http://localhost:$(SYNCHRONIZER_PORT)/debug/rpcz"
|
||||
@echo "Synchronizer Trace: http://localhost:$(SYNCHRONIZER_PORT)/debug/tracez"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=synchronizer,release=$(OPEN_MATCH_CHART_NAME)" --output jsonpath='{.items[0].metadata.name}') $(SYNCHRONIZER_PORT):51506 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=synchronizer,release=$(OPEN_MATCH_RELEASE_NAME)" --output jsonpath='{.items[0].metadata.name}') $(SYNCHRONIZER_PORT):51506 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-grafana: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "User: admin"
|
||||
@echo "Password: openmatch"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=grafana,release=$(OPEN_MATCH_CHART_NAME)" --output jsonpath='{.items[0].metadata.name}') $(GRAFANA_PORT):3000 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=grafana,release=$(OPEN_MATCH_RELEASE_NAME)" --output jsonpath='{.items[0].metadata.name}') $(GRAFANA_PORT):3000 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-prometheus: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=prometheus,component=server,release=$(OPEN_MATCH_CHART_NAME)" --output jsonpath='{.items[0].metadata.name}') $(PROMETHEUS_PORT):9090 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=prometheus,component=server,release=$(OPEN_MATCH_RELEASE_NAME)" --output jsonpath='{.items[0].metadata.name}') $(PROMETHEUS_PORT):9090 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-dashboard: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
$(KUBECTL) port-forward --namespace kube-system $(shell $(KUBECTL) get pod --namespace kube-system --selector="app=kubernetes-dashboard" --output jsonpath='{.items[0].metadata.name}') $(DASHBOARD_PORT):9092 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-ui: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "SwaggerUI Health: http://localhost:$(SWAGGERUI_PORT)/"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=swaggerui,release=$(OPEN_MATCH_CHART_NAME)" --output jsonpath='{.items[0].metadata.name}') $(SWAGGERUI_PORT):51500 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=swaggerui,release=$(OPEN_MATCH_RELEASE_NAME)" --output jsonpath='{.items[0].metadata.name}') $(SWAGGERUI_PORT):51500 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-demo: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "View Demo: http://localhost:$(DEMO_PORT)"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=demo,release=$(OPEN_MATCH_CHART_NAME)" --output jsonpath='{.items[0].metadata.name}') $(DEMO_PORT):51507 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match-demo,component=demo,release=$(OPEN_MATCH_RELEASE_NAME)" --output jsonpath='{.items[0].metadata.name}') $(DEMO_PORT):51507 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
proxy-locust: build/toolchain/bin/kubectl$(EXE_EXTENSION)
|
||||
@echo "Locust UI: http://localhost:$(LOCUST_PORT)"
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match,component=locust-master,release=$(OPEN_MATCH_CHART_NAME)" --output jsonpath='{.items[0].metadata.name}') $(LOCUST_PORT):8089 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app=open-match-test,component=locust-master,release=$(OPEN_MATCH_RELEASE_NAME)" --output jsonpath='{.items[0].metadata.name}') $(LOCUST_PORT):8089 $(PORT_FORWARD_ADDRESS_FLAG)
|
||||
|
||||
# Run `make proxy` instead to run everything at the same time.
|
||||
# If you run this directly it will just run each proxy sequentially.
|
||||
@ -1040,6 +1021,9 @@ proxy:
|
||||
update-deps:
|
||||
$(GO) mod tidy
|
||||
|
||||
build-csharp: build/toolchain/dotnet/
|
||||
(cd $(REPOSITORY_ROOT)/csharp/OpenMatch && $(DOTNET) build -o . && rm -rf obj/ *.pdb *.deps.json)
|
||||
|
||||
third_party/: third_party/google/api third_party/protoc-gen-swagger/options third_party/swaggerui/
|
||||
|
||||
third_party/google/api:
|
||||
@ -1096,4 +1080,4 @@ ifeq ($(shell whoami),root)
|
||||
endif
|
||||
endif
|
||||
|
||||
.PHONY: docker gcloud update-deps sync-deps sleep-10 sleep-30 all build proxy-dashboard proxy-prometheus proxy-grafana clean clean-build clean-toolchain clean-archives clean-binaries clean-protos presubmit test ci-reap-clusters md-test vet
|
||||
.PHONY: docker gcloud update-deps sync-deps sleep-10 sleep-30 all build proxy-dashboard proxy-prometheus proxy-grafana clean clean-build clean-toolchain clean-archives clean-binaries clean-protos presubmit test ci-reap-namespaces md-test vet
|
||||
|
@ -13,8 +13,9 @@
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
package api;
|
||||
option go_package = "pkg/pb";
|
||||
package openmatch;
|
||||
option go_package = "open-match.dev/open-match/pkg/pb";
|
||||
option csharp_namespace = "OpenMatch";
|
||||
|
||||
import "api/messages.proto";
|
||||
import "google/api/annotations.proto";
|
||||
@ -77,7 +78,7 @@ message FetchMatchesRequest {
|
||||
message FetchMatchesResponse {
|
||||
// Result Match for the requested MatchProfile.
|
||||
// Note that OpenMatch will validate the proposals, a valid match should contain at least one ticket.
|
||||
repeated Match matches = 1;
|
||||
Match match = 1;
|
||||
}
|
||||
|
||||
message AssignTicketsRequest {
|
||||
@ -97,7 +98,7 @@ service Backend {
|
||||
// specified MatchProfiles. Each MatchFunction execution returns a set of
|
||||
// proposals which are then evaluated to generate results. FetchMatch method
|
||||
// streams these results back to the caller.
|
||||
rpc FetchMatches(FetchMatchesRequest) returns (FetchMatchesResponse) {
|
||||
rpc FetchMatches(FetchMatchesRequest) returns (stream FetchMatchesResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/backend/matches:fetch"
|
||||
body: "*"
|
||||
|
@ -30,9 +30,9 @@
|
||||
"operationId": "FetchMatches",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"description": "A successful response.(streaming responses)",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiFetchMatchesResponse"
|
||||
"$ref": "#/x-stream-definitions/openmatchFetchMatchesResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@ -48,7 +48,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiFetchMatchesRequest"
|
||||
"$ref": "#/definitions/openmatchFetchMatchesRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -65,7 +65,7 @@
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiAssignTicketsResponse"
|
||||
"$ref": "#/definitions/openmatchAssignTicketsResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@ -81,7 +81,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiAssignTicketsRequest"
|
||||
"$ref": "#/definitions/openmatchAssignTicketsRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -92,7 +92,7 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"apiAssignTicketsRequest": {
|
||||
"openmatchAssignTicketsRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ticket_ids": {
|
||||
@ -103,15 +103,15 @@
|
||||
"description": "List of Ticket IDs for which the Assignment is to be made."
|
||||
},
|
||||
"assignment": {
|
||||
"$ref": "#/definitions/apiAssignment",
|
||||
"$ref": "#/definitions/openmatchAssignment",
|
||||
"description": "Assignment to be associated with the Ticket IDs."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiAssignTicketsResponse": {
|
||||
"openmatchAssignTicketsResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"apiAssignment": {
|
||||
"openmatchAssignment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"connection": {
|
||||
@ -119,7 +119,7 @@
|
||||
"description": "Connection information for this Assignment."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Other details to be sent to the players."
|
||||
},
|
||||
"error": {
|
||||
@ -129,35 +129,45 @@
|
||||
},
|
||||
"description": "An Assignment object represents the assignment associated with a Ticket. Open\nmatch does not require or inspect any fields on assignment."
|
||||
},
|
||||
"apiFetchMatchesRequest": {
|
||||
"openmatchBoolEqualsFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attribute": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
},
|
||||
"title": "Filters boolean values.\n attribute: \"foo\"\n value: false\nmatches:\n {\"foo\": false}\ndoes not match:\n {\"foo\": true}\n {\"foo\": \"bar\"}\n {\"foo\": 1}\n {\"foo\": \"false\"}\n {\"foo\": [false]}\n {\"foo\": null}\n {}"
|
||||
},
|
||||
"openmatchFetchMatchesRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"config": {
|
||||
"$ref": "#/definitions/apiFunctionConfig",
|
||||
"$ref": "#/definitions/openmatchFunctionConfig",
|
||||
"title": "Configuration of the MatchFunction to be executed for the given list of MatchProfiles"
|
||||
},
|
||||
"profiles": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiMatchProfile"
|
||||
"$ref": "#/definitions/openmatchMatchProfile"
|
||||
},
|
||||
"description": "MatchProfiles for which this MatchFunction should be executed."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiFetchMatchesResponse": {
|
||||
"openmatchFetchMatchesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"matches": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiMatch"
|
||||
},
|
||||
"match": {
|
||||
"$ref": "#/definitions/openmatchMatch",
|
||||
"description": "Result Match for the requested MatchProfile.\nNote that OpenMatch will validate the proposals, a valid match should contain at least one ticket."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiFilter": {
|
||||
"openmatchFloatRangeFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attribute": {
|
||||
@ -175,9 +185,9 @@
|
||||
"description": "Minimum value. Defaults to 0."
|
||||
}
|
||||
},
|
||||
"description": "A hard filter used to query a subset of Tickets meeting the filtering\ncriteria."
|
||||
"title": "Filters numerical values to only those within a range.\n attribute: \"foo\"\n max: 10\n min: 5\nmatches:\n {\"foo\": 5}\n {\"foo\": 7.5}\n {\"foo\": 10}\ndoes not match:\n {\"foo\": 4}\n {\"foo\": 10.01}\n {\"foo\": \"7.5\"}\n {\"foo\": true}\n {\"foo\": [7.5]}\n {\"foo\": null}\n {}"
|
||||
},
|
||||
"apiFunctionConfig": {
|
||||
"openmatchFunctionConfig": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"host": {
|
||||
@ -188,12 +198,12 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"type": {
|
||||
"$ref": "#/definitions/apiFunctionConfigType"
|
||||
"$ref": "#/definitions/openmatchFunctionConfigType"
|
||||
}
|
||||
},
|
||||
"description": "Configuration for the Match Function to be triggered by Open Match to\ngenerate proposals."
|
||||
},
|
||||
"apiFunctionConfigType": {
|
||||
"openmatchFunctionConfigType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"GRPC",
|
||||
@ -201,7 +211,7 @@
|
||||
],
|
||||
"default": "GRPC"
|
||||
},
|
||||
"apiMatch": {
|
||||
"openmatchMatch": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"match_id": {
|
||||
@ -219,25 +229,25 @@
|
||||
"tickets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiTicket"
|
||||
"$ref": "#/definitions/openmatchTicket"
|
||||
},
|
||||
"description": "Tickets belonging to this match."
|
||||
},
|
||||
"rosters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiRoster"
|
||||
"$ref": "#/definitions/openmatchRoster"
|
||||
},
|
||||
"title": "Set of Rosters that comprise this Match"
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Match properties for this Match. Open Match does not interpret this field."
|
||||
}
|
||||
},
|
||||
"description": "A Match is used to represent a completed match object. It can be generated by\na MatchFunction as a proposal or can be returned by OpenMatch as a result in\nresponse to the FetchMatches call.\nWhen a match is returned by the FetchMatches call, it should contain at least \none ticket to be considered as valid."
|
||||
},
|
||||
"apiMatchProfile": {
|
||||
"openmatchMatchProfile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
@ -245,43 +255,55 @@
|
||||
"description": "Name of this match profile."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Set of properties associated with this MatchProfile. (Optional)\nOpen Match does not interpret these properties but passes them through to\nthe MatchFunction."
|
||||
},
|
||||
"pools": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiPool"
|
||||
"$ref": "#/definitions/openmatchPool"
|
||||
},
|
||||
"description": "Set of pools to be queried when generating a match for this MatchProfile.\nThe pool names can be used in empty Rosters to specify composition of a\nmatch."
|
||||
},
|
||||
"rosters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiRoster"
|
||||
"$ref": "#/definitions/openmatchRoster"
|
||||
},
|
||||
"description": "Set of Rosters for this match request. Could be empty Rosters used to\nindicate the composition of the generated Match or they could be partially\npre-populated Ticket list to be used in scenarios such as backfill / join\nin progress."
|
||||
}
|
||||
},
|
||||
"description": "A MatchProfile is Open Match's representation of a Match specification. It is\nused to indicate the criteria for selecting players for a match. A\nMatchProfile is the input to the API to get matches and is passed to the\nMatchFunction. It contains all the information required by the MatchFunction\nto generate match proposals."
|
||||
},
|
||||
"apiPool": {
|
||||
"openmatchPool": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "A developer-chosen human-readable name for this Pool."
|
||||
},
|
||||
"filters": {
|
||||
"float_range_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiFilter"
|
||||
"$ref": "#/definitions/openmatchFloatRangeFilter"
|
||||
},
|
||||
"description": "Set of Filters indicating the filtering criteria. Selected players must\nmatch every Filter."
|
||||
},
|
||||
"bool_equals_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/openmatchBoolEqualsFilter"
|
||||
}
|
||||
},
|
||||
"string_equals_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/openmatchStringEqualsFilter"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiRoster": {
|
||||
"openmatchRoster": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
@ -298,7 +320,19 @@
|
||||
},
|
||||
"description": "A Roster is a named collection of Ticket IDs. It exists so that a Tickets\nassociated with a Match can be labelled to belong to a team, sub-team etc. It\ncan also be used to represent the current state of a Match in scenarios such\nas backfill, join-in-progress etc."
|
||||
},
|
||||
"apiTicket": {
|
||||
"openmatchStringEqualsFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attribute": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "Filters strings exactly equaling a value.\n attribute: \"foo\"\n value: \"bar\"\nmatches:\n {\"foo\": \"bar\"}\ndoes not match:\n {\"foo\": \"baz\"}\n {\"foo\": true}\n {\"foo\": 5}\n {\"foo\": [\"bar\"]}\n {\"foo\": null}\n {}"
|
||||
},
|
||||
"openmatchTicket": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
@ -306,11 +340,11 @@
|
||||
"description": "The Ticket ID generated by Open Match."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Properties contains custom info about the ticket. Top level values can be\nused in indexing and filtering to find tickets."
|
||||
},
|
||||
"assignment": {
|
||||
"$ref": "#/definitions/apiAssignment",
|
||||
"$ref": "#/definitions/openmatchAssignment",
|
||||
"description": "Assignment associated with the Ticket."
|
||||
}
|
||||
},
|
||||
@ -331,19 +365,6 @@
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"protobufListValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Repeated field of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
|
||||
},
|
||||
"protobufNullValue": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@ -352,51 +373,6 @@
|
||||
"default": "NULL_VALUE",
|
||||
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
|
||||
},
|
||||
"protobufStruct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Unordered map of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
|
||||
},
|
||||
"protobufValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"null_value": {
|
||||
"$ref": "#/definitions/protobufNullValue",
|
||||
"description": "Represents a null value."
|
||||
},
|
||||
"number_value": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Represents a double value."
|
||||
},
|
||||
"string_value": {
|
||||
"type": "string",
|
||||
"description": "Represents a string value."
|
||||
},
|
||||
"bool_value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "Represents a boolean value."
|
||||
},
|
||||
"struct_value": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Represents a structured value."
|
||||
},
|
||||
"list_value": {
|
||||
"$ref": "#/definitions/protobufListValue",
|
||||
"description": "Represents a repeated `Value`."
|
||||
}
|
||||
},
|
||||
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -419,6 +395,45 @@
|
||||
},
|
||||
"description": "- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\n[google.rpc.Code][google.rpc.Code], but it may accept additional error codes\nif needed. The error message should be a developer-facing English message\nthat helps developers *understand* and *resolve* the error. If a localized\nuser-facing error message is needed, put the localized message in the error\ndetails or localize it in the client. The optional error details may contain\narbitrary information about the error. There is a predefined set of error\ndetail types in the package `google.rpc` that can be used for common error\nconditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.",
|
||||
"title": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:"
|
||||
},
|
||||
"runtimeStreamError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"grpc_code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"http_code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"http_status": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-stream-definitions": {
|
||||
"openmatchFetchMatchesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/definitions/openmatchFetchMatchesResponse"
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/definitions/runtimeStreamError"
|
||||
}
|
||||
},
|
||||
"title": "Stream result of openmatchFetchMatchesResponse"
|
||||
}
|
||||
},
|
||||
"externalDocs": {
|
||||
|
@ -13,8 +13,9 @@
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
package api;
|
||||
option go_package = "pkg/pb";
|
||||
package openmatch;
|
||||
option go_package = "open-match.dev/open-match/pkg/pb";
|
||||
option csharp_namespace = "OpenMatch";
|
||||
|
||||
import "api/messages.proto";
|
||||
import "google/api/annotations.proto";
|
||||
@ -56,12 +57,12 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
|
||||
|
||||
message EvaluateRequest {
|
||||
// List of Matches to evaluate.
|
||||
repeated api.Match matches = 1;
|
||||
Match match = 1;
|
||||
}
|
||||
|
||||
message EvaluateResponse {
|
||||
// Accepted list of Matches.
|
||||
repeated api.Match matches = 1;
|
||||
Match match = 1;
|
||||
}
|
||||
|
||||
// The service implementing the Evaluator API that is called to evaluate
|
||||
@ -69,7 +70,7 @@ message EvaluateResponse {
|
||||
service Evaluator {
|
||||
// Evaluate accepts a list of proposed matches, evaluates them for quality,
|
||||
// collisions etc. and returns matches that should be accepted as results.
|
||||
rpc Evaluate(EvaluateRequest) returns (EvaluateResponse) {
|
||||
rpc Evaluate(stream EvaluateRequest) returns (stream EvaluateResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/evaluator/matches:evaluate"
|
||||
body: "*"
|
||||
|
@ -30,9 +30,9 @@
|
||||
"operationId": "Evaluate",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"description": "A successful response.(streaming responses)",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiEvaluateResponse"
|
||||
"$ref": "#/x-stream-definitions/openmatchEvaluateResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@ -45,10 +45,11 @@
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"description": " (streaming inputs)",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiEvaluateRequest"
|
||||
"$ref": "#/definitions/openmatchEvaluateRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -59,7 +60,7 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"apiAssignment": {
|
||||
"openmatchAssignment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"connection": {
|
||||
@ -67,7 +68,7 @@
|
||||
"description": "Connection information for this Assignment."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Other details to be sent to the players."
|
||||
},
|
||||
"error": {
|
||||
@ -77,31 +78,25 @@
|
||||
},
|
||||
"description": "An Assignment object represents the assignment associated with a Ticket. Open\nmatch does not require or inspect any fields on assignment."
|
||||
},
|
||||
"apiEvaluateRequest": {
|
||||
"openmatchEvaluateRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"matches": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiMatch"
|
||||
},
|
||||
"match": {
|
||||
"$ref": "#/definitions/openmatchMatch",
|
||||
"description": "List of Matches to evaluate."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiEvaluateResponse": {
|
||||
"openmatchEvaluateResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"matches": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiMatch"
|
||||
},
|
||||
"match": {
|
||||
"$ref": "#/definitions/openmatchMatch",
|
||||
"description": "Accepted list of Matches."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiMatch": {
|
||||
"openmatchMatch": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"match_id": {
|
||||
@ -119,25 +114,25 @@
|
||||
"tickets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiTicket"
|
||||
"$ref": "#/definitions/openmatchTicket"
|
||||
},
|
||||
"description": "Tickets belonging to this match."
|
||||
},
|
||||
"rosters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiRoster"
|
||||
"$ref": "#/definitions/openmatchRoster"
|
||||
},
|
||||
"title": "Set of Rosters that comprise this Match"
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Match properties for this Match. Open Match does not interpret this field."
|
||||
}
|
||||
},
|
||||
"description": "A Match is used to represent a completed match object. It can be generated by\na MatchFunction as a proposal or can be returned by OpenMatch as a result in\nresponse to the FetchMatches call.\nWhen a match is returned by the FetchMatches call, it should contain at least \none ticket to be considered as valid."
|
||||
},
|
||||
"apiRoster": {
|
||||
"openmatchRoster": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
@ -154,7 +149,7 @@
|
||||
},
|
||||
"description": "A Roster is a named collection of Ticket IDs. It exists so that a Tickets\nassociated with a Match can be labelled to belong to a team, sub-team etc. It\ncan also be used to represent the current state of a Match in scenarios such\nas backfill, join-in-progress etc."
|
||||
},
|
||||
"apiTicket": {
|
||||
"openmatchTicket": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
@ -162,11 +157,11 @@
|
||||
"description": "The Ticket ID generated by Open Match."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Properties contains custom info about the ticket. Top level values can be\nused in indexing and filtering to find tickets."
|
||||
},
|
||||
"assignment": {
|
||||
"$ref": "#/definitions/apiAssignment",
|
||||
"$ref": "#/definitions/openmatchAssignment",
|
||||
"description": "Assignment associated with the Ticket."
|
||||
}
|
||||
},
|
||||
@ -187,19 +182,6 @@
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"protobufListValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Repeated field of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
|
||||
},
|
||||
"protobufNullValue": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@ -208,51 +190,6 @@
|
||||
"default": "NULL_VALUE",
|
||||
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
|
||||
},
|
||||
"protobufStruct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Unordered map of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
|
||||
},
|
||||
"protobufValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"null_value": {
|
||||
"$ref": "#/definitions/protobufNullValue",
|
||||
"description": "Represents a null value."
|
||||
},
|
||||
"number_value": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Represents a double value."
|
||||
},
|
||||
"string_value": {
|
||||
"type": "string",
|
||||
"description": "Represents a string value."
|
||||
},
|
||||
"bool_value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "Represents a boolean value."
|
||||
},
|
||||
"struct_value": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Represents a structured value."
|
||||
},
|
||||
"list_value": {
|
||||
"$ref": "#/definitions/protobufListValue",
|
||||
"description": "Represents a repeated `Value`."
|
||||
}
|
||||
},
|
||||
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -275,6 +212,45 @@
|
||||
},
|
||||
"description": "- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\n[google.rpc.Code][google.rpc.Code], but it may accept additional error codes\nif needed. The error message should be a developer-facing English message\nthat helps developers *understand* and *resolve* the error. If a localized\nuser-facing error message is needed, put the localized message in the error\ndetails or localize it in the client. The optional error details may contain\narbitrary information about the error. There is a predefined set of error\ndetail types in the package `google.rpc` that can be used for common error\nconditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.",
|
||||
"title": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:"
|
||||
},
|
||||
"runtimeStreamError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"grpc_code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"http_code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"http_status": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-stream-definitions": {
|
||||
"openmatchEvaluateResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/definitions/openmatchEvaluateResponse"
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/definitions/runtimeStreamError"
|
||||
}
|
||||
},
|
||||
"title": "Stream result of openmatchEvaluateResponse"
|
||||
}
|
||||
},
|
||||
"externalDocs": {
|
||||
|
@ -13,8 +13,9 @@
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
package api;
|
||||
option go_package = "pkg/pb";
|
||||
package openmatch;
|
||||
option go_package = "open-match.dev/open-match/pkg/pb";
|
||||
option csharp_namespace = "OpenMatch";
|
||||
|
||||
import "api/messages.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
@ -32,7 +32,7 @@
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiCreateTicketResponse"
|
||||
"$ref": "#/definitions/openmatchCreateTicketResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@ -48,7 +48,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiCreateTicketRequest"
|
||||
"$ref": "#/definitions/openmatchCreateTicketRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -65,7 +65,7 @@
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiTicket"
|
||||
"$ref": "#/definitions/openmatchTicket"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@ -95,7 +95,7 @@
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiDeleteTicketResponse"
|
||||
"$ref": "#/definitions/openmatchDeleteTicketResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@ -127,7 +127,7 @@
|
||||
"200": {
|
||||
"description": "A successful response.(streaming responses)",
|
||||
"schema": {
|
||||
"$ref": "#/x-stream-definitions/apiGetAssignmentsResponse"
|
||||
"$ref": "#/x-stream-definitions/openmatchGetAssignmentsResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@ -153,7 +153,7 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"apiAssignment": {
|
||||
"openmatchAssignment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"connection": {
|
||||
@ -161,7 +161,7 @@
|
||||
"description": "Connection information for this Assignment."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Other details to be sent to the players."
|
||||
},
|
||||
"error": {
|
||||
@ -171,37 +171,37 @@
|
||||
},
|
||||
"description": "An Assignment object represents the assignment associated with a Ticket. Open\nmatch does not require or inspect any fields on assignment."
|
||||
},
|
||||
"apiCreateTicketRequest": {
|
||||
"openmatchCreateTicketRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ticket": {
|
||||
"$ref": "#/definitions/apiTicket",
|
||||
"$ref": "#/definitions/openmatchTicket",
|
||||
"description": "Ticket object with the properties of the Ticket to be created."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiCreateTicketResponse": {
|
||||
"openmatchCreateTicketResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ticket": {
|
||||
"$ref": "#/definitions/apiTicket",
|
||||
"$ref": "#/definitions/openmatchTicket",
|
||||
"description": "Ticket object for the created Ticket - with the ticket ID populated."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiDeleteTicketResponse": {
|
||||
"openmatchDeleteTicketResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"apiGetAssignmentsResponse": {
|
||||
"openmatchGetAssignmentsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assignment": {
|
||||
"$ref": "#/definitions/apiAssignment",
|
||||
"$ref": "#/definitions/openmatchAssignment",
|
||||
"description": "The updated Ticket object."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiTicket": {
|
||||
"openmatchTicket": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
@ -209,11 +209,11 @@
|
||||
"description": "The Ticket ID generated by Open Match."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Properties contains custom info about the ticket. Top level values can be\nused in indexing and filtering to find tickets."
|
||||
},
|
||||
"assignment": {
|
||||
"$ref": "#/definitions/apiAssignment",
|
||||
"$ref": "#/definitions/openmatchAssignment",
|
||||
"description": "Assignment associated with the Ticket."
|
||||
}
|
||||
},
|
||||
@ -234,19 +234,6 @@
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"protobufListValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Repeated field of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
|
||||
},
|
||||
"protobufNullValue": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@ -255,51 +242,6 @@
|
||||
"default": "NULL_VALUE",
|
||||
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
|
||||
},
|
||||
"protobufStruct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Unordered map of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
|
||||
},
|
||||
"protobufValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"null_value": {
|
||||
"$ref": "#/definitions/protobufNullValue",
|
||||
"description": "Represents a null value."
|
||||
},
|
||||
"number_value": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Represents a double value."
|
||||
},
|
||||
"string_value": {
|
||||
"type": "string",
|
||||
"description": "Represents a string value."
|
||||
},
|
||||
"bool_value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "Represents a boolean value."
|
||||
},
|
||||
"struct_value": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Represents a structured value."
|
||||
},
|
||||
"list_value": {
|
||||
"$ref": "#/definitions/protobufListValue",
|
||||
"description": "Represents a repeated `Value`."
|
||||
}
|
||||
},
|
||||
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -350,17 +292,17 @@
|
||||
}
|
||||
},
|
||||
"x-stream-definitions": {
|
||||
"apiGetAssignmentsResponse": {
|
||||
"openmatchGetAssignmentsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/definitions/apiGetAssignmentsResponse"
|
||||
"$ref": "#/definitions/openmatchGetAssignmentsResponse"
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/definitions/runtimeStreamError"
|
||||
}
|
||||
},
|
||||
"title": "Stream result of apiGetAssignmentsResponse"
|
||||
"title": "Stream result of openmatchGetAssignmentsResponse"
|
||||
}
|
||||
},
|
||||
"externalDocs": {
|
||||
|
@ -13,8 +13,9 @@
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
package api;
|
||||
option go_package = "pkg/pb";
|
||||
package openmatch;
|
||||
option go_package = "open-match.dev/open-match/pkg/pb";
|
||||
option csharp_namespace = "OpenMatch";
|
||||
|
||||
import "api/messages.proto";
|
||||
import "google/api/annotations.proto";
|
||||
@ -63,7 +64,7 @@ message RunRequest {
|
||||
message RunResponse {
|
||||
// The proposal generated by this MatchFunction Run.
|
||||
// Note that OpenMatch will validate the proposals, a valid match should contain at least one ticket.
|
||||
repeated Match proposals = 1;
|
||||
Match proposal = 1;
|
||||
}
|
||||
|
||||
// This proto defines the API for running Match Functions as long-lived,
|
||||
@ -71,7 +72,7 @@ message RunResponse {
|
||||
service MatchFunction {
|
||||
// This is the function that is executed when by the Open Match backend to
|
||||
// generate Match proposals.
|
||||
rpc Run(RunRequest) returns (RunResponse) {
|
||||
rpc Run(RunRequest) returns (stream RunResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/matchfunction:run"
|
||||
body: "*"
|
||||
|
@ -30,9 +30,9 @@
|
||||
"operationId": "Run",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"description": "A successful response.(streaming responses)",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiRunResponse"
|
||||
"$ref": "#/x-stream-definitions/openmatchRunResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@ -48,7 +48,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiRunRequest"
|
||||
"$ref": "#/definitions/openmatchRunRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -59,7 +59,7 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"apiAssignment": {
|
||||
"openmatchAssignment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"connection": {
|
||||
@ -67,7 +67,7 @@
|
||||
"description": "Connection information for this Assignment."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Other details to be sent to the players."
|
||||
},
|
||||
"error": {
|
||||
@ -77,7 +77,20 @@
|
||||
},
|
||||
"description": "An Assignment object represents the assignment associated with a Ticket. Open\nmatch does not require or inspect any fields on assignment."
|
||||
},
|
||||
"apiFilter": {
|
||||
"openmatchBoolEqualsFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attribute": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
},
|
||||
"title": "Filters boolean values.\n attribute: \"foo\"\n value: false\nmatches:\n {\"foo\": false}\ndoes not match:\n {\"foo\": true}\n {\"foo\": \"bar\"}\n {\"foo\": 1}\n {\"foo\": \"false\"}\n {\"foo\": [false]}\n {\"foo\": null}\n {}"
|
||||
},
|
||||
"openmatchFloatRangeFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attribute": {
|
||||
@ -95,9 +108,9 @@
|
||||
"description": "Minimum value. Defaults to 0."
|
||||
}
|
||||
},
|
||||
"description": "A hard filter used to query a subset of Tickets meeting the filtering\ncriteria."
|
||||
"title": "Filters numerical values to only those within a range.\n attribute: \"foo\"\n max: 10\n min: 5\nmatches:\n {\"foo\": 5}\n {\"foo\": 7.5}\n {\"foo\": 10}\ndoes not match:\n {\"foo\": 4}\n {\"foo\": 10.01}\n {\"foo\": \"7.5\"}\n {\"foo\": true}\n {\"foo\": [7.5]}\n {\"foo\": null}\n {}"
|
||||
},
|
||||
"apiMatch": {
|
||||
"openmatchMatch": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"match_id": {
|
||||
@ -115,25 +128,25 @@
|
||||
"tickets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiTicket"
|
||||
"$ref": "#/definitions/openmatchTicket"
|
||||
},
|
||||
"description": "Tickets belonging to this match."
|
||||
},
|
||||
"rosters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiRoster"
|
||||
"$ref": "#/definitions/openmatchRoster"
|
||||
},
|
||||
"title": "Set of Rosters that comprise this Match"
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Match properties for this Match. Open Match does not interpret this field."
|
||||
}
|
||||
},
|
||||
"description": "A Match is used to represent a completed match object. It can be generated by\na MatchFunction as a proposal or can be returned by OpenMatch as a result in\nresponse to the FetchMatches call.\nWhen a match is returned by the FetchMatches call, it should contain at least \none ticket to be considered as valid."
|
||||
},
|
||||
"apiMatchProfile": {
|
||||
"openmatchMatchProfile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
@ -141,43 +154,55 @@
|
||||
"description": "Name of this match profile."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Set of properties associated with this MatchProfile. (Optional)\nOpen Match does not interpret these properties but passes them through to\nthe MatchFunction."
|
||||
},
|
||||
"pools": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiPool"
|
||||
"$ref": "#/definitions/openmatchPool"
|
||||
},
|
||||
"description": "Set of pools to be queried when generating a match for this MatchProfile.\nThe pool names can be used in empty Rosters to specify composition of a\nmatch."
|
||||
},
|
||||
"rosters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiRoster"
|
||||
"$ref": "#/definitions/openmatchRoster"
|
||||
},
|
||||
"description": "Set of Rosters for this match request. Could be empty Rosters used to\nindicate the composition of the generated Match or they could be partially\npre-populated Ticket list to be used in scenarios such as backfill / join\nin progress."
|
||||
}
|
||||
},
|
||||
"description": "A MatchProfile is Open Match's representation of a Match specification. It is\nused to indicate the criteria for selecting players for a match. A\nMatchProfile is the input to the API to get matches and is passed to the\nMatchFunction. It contains all the information required by the MatchFunction\nto generate match proposals."
|
||||
},
|
||||
"apiPool": {
|
||||
"openmatchPool": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "A developer-chosen human-readable name for this Pool."
|
||||
},
|
||||
"filters": {
|
||||
"float_range_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiFilter"
|
||||
"$ref": "#/definitions/openmatchFloatRangeFilter"
|
||||
},
|
||||
"description": "Set of Filters indicating the filtering criteria. Selected players must\nmatch every Filter."
|
||||
},
|
||||
"bool_equals_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/openmatchBoolEqualsFilter"
|
||||
}
|
||||
},
|
||||
"string_equals_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/openmatchStringEqualsFilter"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiRoster": {
|
||||
"openmatchRoster": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
@ -194,28 +219,37 @@
|
||||
},
|
||||
"description": "A Roster is a named collection of Ticket IDs. It exists so that a Tickets\nassociated with a Match can be labelled to belong to a team, sub-team etc. It\ncan also be used to represent the current state of a Match in scenarios such\nas backfill, join-in-progress etc."
|
||||
},
|
||||
"apiRunRequest": {
|
||||
"openmatchRunRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"profile": {
|
||||
"$ref": "#/definitions/apiMatchProfile",
|
||||
"$ref": "#/definitions/openmatchMatchProfile",
|
||||
"description": "The MatchProfile that describes the Match that this MatchFunction needs to\ngenerate proposals for."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiRunResponse": {
|
||||
"openmatchRunResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"proposals": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiMatch"
|
||||
},
|
||||
"proposal": {
|
||||
"$ref": "#/definitions/openmatchMatch",
|
||||
"description": "The proposal generated by this MatchFunction Run.\nNote that OpenMatch will validate the proposals, a valid match should contain at least one ticket."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiTicket": {
|
||||
"openmatchStringEqualsFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attribute": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "Filters strings exactly equaling a value.\n attribute: \"foo\"\n value: \"bar\"\nmatches:\n {\"foo\": \"bar\"}\ndoes not match:\n {\"foo\": \"baz\"}\n {\"foo\": true}\n {\"foo\": 5}\n {\"foo\": [\"bar\"]}\n {\"foo\": null}\n {}"
|
||||
},
|
||||
"openmatchTicket": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
@ -223,11 +257,11 @@
|
||||
"description": "The Ticket ID generated by Open Match."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Properties contains custom info about the ticket. Top level values can be\nused in indexing and filtering to find tickets."
|
||||
},
|
||||
"assignment": {
|
||||
"$ref": "#/definitions/apiAssignment",
|
||||
"$ref": "#/definitions/openmatchAssignment",
|
||||
"description": "Assignment associated with the Ticket."
|
||||
}
|
||||
},
|
||||
@ -248,19 +282,6 @@
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"protobufListValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Repeated field of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
|
||||
},
|
||||
"protobufNullValue": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@ -269,51 +290,6 @@
|
||||
"default": "NULL_VALUE",
|
||||
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
|
||||
},
|
||||
"protobufStruct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Unordered map of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
|
||||
},
|
||||
"protobufValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"null_value": {
|
||||
"$ref": "#/definitions/protobufNullValue",
|
||||
"description": "Represents a null value."
|
||||
},
|
||||
"number_value": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Represents a double value."
|
||||
},
|
||||
"string_value": {
|
||||
"type": "string",
|
||||
"description": "Represents a string value."
|
||||
},
|
||||
"bool_value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "Represents a boolean value."
|
||||
},
|
||||
"struct_value": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Represents a structured value."
|
||||
},
|
||||
"list_value": {
|
||||
"$ref": "#/definitions/protobufListValue",
|
||||
"description": "Represents a repeated `Value`."
|
||||
}
|
||||
},
|
||||
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -336,6 +312,45 @@
|
||||
},
|
||||
"description": "- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\n[google.rpc.Code][google.rpc.Code], but it may accept additional error codes\nif needed. The error message should be a developer-facing English message\nthat helps developers *understand* and *resolve* the error. If a localized\nuser-facing error message is needed, put the localized message in the error\ndetails or localize it in the client. The optional error details may contain\narbitrary information about the error. There is a predefined set of error\ndetail types in the package `google.rpc` that can be used for common error\nconditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.",
|
||||
"title": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:"
|
||||
},
|
||||
"runtimeStreamError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"grpc_code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"http_code": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"http_status": {
|
||||
"type": "string"
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-stream-definitions": {
|
||||
"openmatchRunResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/definitions/openmatchRunResponse"
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/definitions/runtimeStreamError"
|
||||
}
|
||||
},
|
||||
"title": "Stream result of openmatchRunResponse"
|
||||
}
|
||||
},
|
||||
"externalDocs": {
|
||||
|
@ -13,8 +13,9 @@
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
package api;
|
||||
option go_package = "pkg/pb";
|
||||
package openmatch;
|
||||
option go_package = "open-match.dev/open-match/pkg/pb";
|
||||
option csharp_namespace = "OpenMatch";
|
||||
|
||||
import "google/rpc/status.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
@ -52,9 +53,23 @@ message Assignment {
|
||||
google.rpc.Status error = 3;
|
||||
}
|
||||
|
||||
// A hard filter used to query a subset of Tickets meeting the filtering
|
||||
// criteria.
|
||||
message Filter {
|
||||
// Filters numerical values to only those within a range.
|
||||
// attribute: "foo"
|
||||
// max: 10
|
||||
// min: 5
|
||||
// matches:
|
||||
// {"foo": 5}
|
||||
// {"foo": 7.5}
|
||||
// {"foo": 10}
|
||||
// does not match:
|
||||
// {"foo": 4}
|
||||
// {"foo": 10.01}
|
||||
// {"foo": "7.5"}
|
||||
// {"foo": true}
|
||||
// {"foo": [7.5]}
|
||||
// {"foo": null}
|
||||
// {}
|
||||
message FloatRangeFilter {
|
||||
// Name of the ticket attribute this Filter operates on.
|
||||
string attribute = 1;
|
||||
|
||||
@ -65,13 +80,54 @@ message Filter {
|
||||
double min = 3;
|
||||
}
|
||||
|
||||
// Filters boolean values.
|
||||
// attribute: "foo"
|
||||
// value: false
|
||||
// matches:
|
||||
// {"foo": false}
|
||||
// does not match:
|
||||
// {"foo": true}
|
||||
// {"foo": "bar"}
|
||||
// {"foo": 1}
|
||||
// {"foo": "false"}
|
||||
// {"foo": [false]}
|
||||
// {"foo": null}
|
||||
// {}
|
||||
message BoolEqualsFilter {
|
||||
string attribute = 1;
|
||||
|
||||
bool value = 2;
|
||||
}
|
||||
|
||||
// Filters strings exactly equaling a value.
|
||||
// attribute: "foo"
|
||||
// value: "bar"
|
||||
// matches:
|
||||
// {"foo": "bar"}
|
||||
// does not match:
|
||||
// {"foo": "baz"}
|
||||
// {"foo": true}
|
||||
// {"foo": 5}
|
||||
// {"foo": ["bar"]}
|
||||
// {"foo": null}
|
||||
// {}
|
||||
message StringEqualsFilter {
|
||||
string attribute = 1;
|
||||
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
message Pool {
|
||||
// A developer-chosen human-readable name for this Pool.
|
||||
string name = 1;
|
||||
|
||||
// Set of Filters indicating the filtering criteria. Selected players must
|
||||
// match every Filter.
|
||||
repeated Filter filters = 2;
|
||||
repeated FloatRangeFilter float_range_filters = 2;
|
||||
|
||||
repeated BoolEqualsFilter bool_equals_filters = 3;
|
||||
|
||||
repeated StringEqualsFilter string_equals_filters = 4;
|
||||
}
|
||||
|
||||
// A Roster is a named collection of Ticket IDs. It exists so that a Tickets
|
||||
|
@ -13,8 +13,9 @@
|
||||
// limitations under the License.
|
||||
|
||||
syntax = "proto3";
|
||||
package api;
|
||||
option go_package = "pkg/pb";
|
||||
package openmatch;
|
||||
option go_package = "open-match.dev/open-match/pkg/pb";
|
||||
option csharp_namespace = "OpenMatch";
|
||||
|
||||
import "api/messages.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
@ -32,7 +32,7 @@
|
||||
"200": {
|
||||
"description": "A successful response.(streaming responses)",
|
||||
"schema": {
|
||||
"$ref": "#/x-stream-definitions/apiQueryTicketsResponse"
|
||||
"$ref": "#/x-stream-definitions/openmatchQueryTicketsResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
@ -48,7 +48,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiQueryTicketsRequest"
|
||||
"$ref": "#/definitions/openmatchQueryTicketsRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -59,7 +59,7 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"apiAssignment": {
|
||||
"openmatchAssignment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"connection": {
|
||||
@ -67,7 +67,7 @@
|
||||
"description": "Connection information for this Assignment."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Other details to be sent to the players."
|
||||
},
|
||||
"error": {
|
||||
@ -77,7 +77,20 @@
|
||||
},
|
||||
"description": "An Assignment object represents the assignment associated with a Ticket. Open\nmatch does not require or inspect any fields on assignment."
|
||||
},
|
||||
"apiFilter": {
|
||||
"openmatchBoolEqualsFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attribute": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
},
|
||||
"title": "Filters boolean values.\n attribute: \"foo\"\n value: false\nmatches:\n {\"foo\": false}\ndoes not match:\n {\"foo\": true}\n {\"foo\": \"bar\"}\n {\"foo\": 1}\n {\"foo\": \"false\"}\n {\"foo\": [false]}\n {\"foo\": null}\n {}"
|
||||
},
|
||||
"openmatchFloatRangeFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attribute": {
|
||||
@ -95,46 +108,70 @@
|
||||
"description": "Minimum value. Defaults to 0."
|
||||
}
|
||||
},
|
||||
"description": "A hard filter used to query a subset of Tickets meeting the filtering\ncriteria."
|
||||
"title": "Filters numerical values to only those within a range.\n attribute: \"foo\"\n max: 10\n min: 5\nmatches:\n {\"foo\": 5}\n {\"foo\": 7.5}\n {\"foo\": 10}\ndoes not match:\n {\"foo\": 4}\n {\"foo\": 10.01}\n {\"foo\": \"7.5\"}\n {\"foo\": true}\n {\"foo\": [7.5]}\n {\"foo\": null}\n {}"
|
||||
},
|
||||
"apiPool": {
|
||||
"openmatchPool": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "A developer-chosen human-readable name for this Pool."
|
||||
},
|
||||
"filters": {
|
||||
"float_range_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiFilter"
|
||||
"$ref": "#/definitions/openmatchFloatRangeFilter"
|
||||
},
|
||||
"description": "Set of Filters indicating the filtering criteria. Selected players must\nmatch every Filter."
|
||||
},
|
||||
"bool_equals_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/openmatchBoolEqualsFilter"
|
||||
}
|
||||
},
|
||||
"string_equals_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/openmatchStringEqualsFilter"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiQueryTicketsRequest": {
|
||||
"openmatchQueryTicketsRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pool": {
|
||||
"$ref": "#/definitions/apiPool",
|
||||
"$ref": "#/definitions/openmatchPool",
|
||||
"description": "The Pool representing the set of Filters to be queried."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiQueryTicketsResponse": {
|
||||
"openmatchQueryTicketsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tickets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiTicket"
|
||||
"$ref": "#/definitions/openmatchTicket"
|
||||
},
|
||||
"description": "The Tickets that meet the Filter criteria requested by the Pool."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiTicket": {
|
||||
"openmatchStringEqualsFilter": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attribute": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "Filters strings exactly equaling a value.\n attribute: \"foo\"\n value: \"bar\"\nmatches:\n {\"foo\": \"bar\"}\ndoes not match:\n {\"foo\": \"baz\"}\n {\"foo\": true}\n {\"foo\": 5}\n {\"foo\": [\"bar\"]}\n {\"foo\": null}\n {}"
|
||||
},
|
||||
"openmatchTicket": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
@ -142,11 +179,11 @@
|
||||
"description": "The Ticket ID generated by Open Match."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"type": "object",
|
||||
"description": "Properties contains custom info about the ticket. Top level values can be\nused in indexing and filtering to find tickets."
|
||||
},
|
||||
"assignment": {
|
||||
"$ref": "#/definitions/apiAssignment",
|
||||
"$ref": "#/definitions/openmatchAssignment",
|
||||
"description": "Assignment associated with the Ticket."
|
||||
}
|
||||
},
|
||||
@ -167,19 +204,6 @@
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"protobufListValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Repeated field of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
|
||||
},
|
||||
"protobufNullValue": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@ -188,51 +212,6 @@
|
||||
"default": "NULL_VALUE",
|
||||
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
|
||||
},
|
||||
"protobufStruct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Unordered map of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
|
||||
},
|
||||
"protobufValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"null_value": {
|
||||
"$ref": "#/definitions/protobufNullValue",
|
||||
"description": "Represents a null value."
|
||||
},
|
||||
"number_value": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Represents a double value."
|
||||
},
|
||||
"string_value": {
|
||||
"type": "string",
|
||||
"description": "Represents a string value."
|
||||
},
|
||||
"bool_value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "Represents a boolean value."
|
||||
},
|
||||
"struct_value": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Represents a structured value."
|
||||
},
|
||||
"list_value": {
|
||||
"$ref": "#/definitions/protobufListValue",
|
||||
"description": "Represents a repeated `Value`."
|
||||
}
|
||||
},
|
||||
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -283,17 +262,17 @@
|
||||
}
|
||||
},
|
||||
"x-stream-definitions": {
|
||||
"apiQueryTicketsResponse": {
|
||||
"openmatchQueryTicketsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/definitions/apiQueryTicketsResponse"
|
||||
"$ref": "#/definitions/openmatchQueryTicketsResponse"
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/definitions/runtimeStreamError"
|
||||
}
|
||||
},
|
||||
"title": "Stream result of apiQueryTicketsResponse"
|
||||
"title": "Stream result of openmatchQueryTicketsResponse"
|
||||
}
|
||||
},
|
||||
"externalDocs": {
|
||||
|
@ -1,320 +0,0 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "Synchronizer",
|
||||
"version": "1.0",
|
||||
"contact": {
|
||||
"name": "Open Match",
|
||||
"url": "https://open-match.dev",
|
||||
"email": "open-match-discuss@googlegroups.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache 2.0 License",
|
||||
"url": "https://github.com/googleforgames/open-match/blob/master/LICENSE"
|
||||
}
|
||||
},
|
||||
"schemes": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"paths": {
|
||||
"/v1/synchronizer/proposals:evaluate": {
|
||||
"post": {
|
||||
"summary": "EvaluateProposals accepts a list of proposals and a registration identifier\nfor this request. If the synchronization cycle to which the request was\nregistered is completed, this request fails otherwise the proposals are\nadded to the list of proposals to be evaluated in the current cycle. At the\n end of the cycle, the user defined evaluation method is triggered and the\nmatches accepted by it are returned as results.",
|
||||
"operationId": "EvaluateProposals",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiEvaluateProposalsResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Returned when the resource does not exist.",
|
||||
"schema": {
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiEvaluateProposalsRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Synchronizer"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/synchronizer/register": {
|
||||
"get": {
|
||||
"summary": "Register associates this request with the current synchronization cycle and\nreturns an identifier for this registration. The caller returns this\nidentifier back in the evaluation request. This enables synchronizer to\nidentify stale evaluation requests belonging to a prior window.",
|
||||
"operationId": "Register",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/apiRegisterResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Returned when the resource does not exist.",
|
||||
"schema": {
|
||||
"format": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"Synchronizer"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"apiAssignment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"connection": {
|
||||
"type": "string",
|
||||
"description": "Connection information for this Assignment."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Other details to be sent to the players."
|
||||
},
|
||||
"error": {
|
||||
"$ref": "#/definitions/rpcStatus",
|
||||
"description": "Error when finding an Assignment for this Ticket."
|
||||
}
|
||||
},
|
||||
"description": "An Assignment object represents the assignment associated with a Ticket. Open\nmatch does not require or inspect any fields on assignment."
|
||||
},
|
||||
"apiEvaluateProposalsRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"matches": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiMatch"
|
||||
},
|
||||
"description": "List of proposals to evaluate in the current synchronization cycle."
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Identifier for this request issued during request registration."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiEvaluateProposalsResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"matches": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiMatch"
|
||||
},
|
||||
"description": "Results from evaluating proposals for this request."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiMatch": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"match_id": {
|
||||
"type": "string",
|
||||
"description": "A Match ID that should be passed through the stack for tracing."
|
||||
},
|
||||
"match_profile": {
|
||||
"type": "string",
|
||||
"description": "Name of the match profile that generated this Match."
|
||||
},
|
||||
"match_function": {
|
||||
"type": "string",
|
||||
"description": "Name of the match function that generated this Match."
|
||||
},
|
||||
"tickets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiTicket"
|
||||
},
|
||||
"description": "Tickets belonging to this match."
|
||||
},
|
||||
"rosters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiRoster"
|
||||
},
|
||||
"title": "Set of Rosters that comprise this Match"
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Match properties for this Match. Open Match does not interpret this field."
|
||||
}
|
||||
},
|
||||
"description": "A Match is used to represent a completed match object. It can be generated by\na MatchFunction as a proposal or can be returned by OpenMatch as a result in\nresponse to the FetchMatches call.\nWhen a match is returned by the FetchMatches call, it should contain at least \none ticket to be considered as valid."
|
||||
},
|
||||
"apiRegisterResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Identifier for this request valid for the current synchronization cycle."
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiRoster": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "A developer-chosen human-readable name for this Roster."
|
||||
},
|
||||
"ticket_ids": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "Tickets belonging to this Roster."
|
||||
}
|
||||
},
|
||||
"description": "A Roster is a named collection of Ticket IDs. It exists so that a Tickets\nassociated with a Match can be labelled to belong to a team, sub-team etc. It\ncan also be used to represent the current state of a Match in scenarios such\nas backfill, join-in-progress etc."
|
||||
},
|
||||
"apiTicket": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The Ticket ID generated by Open Match."
|
||||
},
|
||||
"properties": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Properties contains custom info about the ticket. Top level values can be\nused in indexing and filtering to find tickets."
|
||||
},
|
||||
"assignment": {
|
||||
"$ref": "#/definitions/apiAssignment",
|
||||
"description": "Assignment associated with the Ticket."
|
||||
}
|
||||
},
|
||||
"description": "A Ticket is a basic matchmaking entity in Open Match. In order to enter\nmatchmaking using Open Match, the client should generate a Ticket, passing in\nthe properties to be associated with this Ticket. Open Match will generate an\nID for a Ticket during creation. A Ticket could be used to represent an\nindividual 'Player' or a 'Group' of players. Open Match will not interpret\nwhat the Ticket represents but just treat it as a matchmaking unit with a set\nof properties. Open Match stores the Ticket in state storage and enables an\nAssignment to be associated with this Ticket."
|
||||
},
|
||||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type_url": {
|
||||
"type": "string",
|
||||
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "Must be a valid serialized protocol buffer of the above specified type."
|
||||
}
|
||||
},
|
||||
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
|
||||
},
|
||||
"protobufListValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"values": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Repeated field of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`ListValue` is a wrapper around a repeated field of values.\n\nThe JSON representation for `ListValue` is JSON array."
|
||||
},
|
||||
"protobufNullValue": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"NULL_VALUE"
|
||||
],
|
||||
"default": "NULL_VALUE",
|
||||
"description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
|
||||
},
|
||||
"protobufStruct": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"fields": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/protobufValue"
|
||||
},
|
||||
"description": "Unordered map of dynamically typed values."
|
||||
}
|
||||
},
|
||||
"description": "`Struct` represents a structured data value, consisting of fields\nwhich map to dynamically typed values. In some languages, `Struct`\nmight be supported by a native representation. For example, in\nscripting languages like JS a struct is represented as an\nobject. The details of that representation are described together\nwith the proto support for the language.\n\nThe JSON representation for `Struct` is JSON object."
|
||||
},
|
||||
"protobufValue": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"null_value": {
|
||||
"$ref": "#/definitions/protobufNullValue",
|
||||
"description": "Represents a null value."
|
||||
},
|
||||
"number_value": {
|
||||
"type": "number",
|
||||
"format": "double",
|
||||
"description": "Represents a double value."
|
||||
},
|
||||
"string_value": {
|
||||
"type": "string",
|
||||
"description": "Represents a string value."
|
||||
},
|
||||
"bool_value": {
|
||||
"type": "boolean",
|
||||
"format": "boolean",
|
||||
"description": "Represents a boolean value."
|
||||
},
|
||||
"struct_value": {
|
||||
"$ref": "#/definitions/protobufStruct",
|
||||
"description": "Represents a structured value."
|
||||
},
|
||||
"list_value": {
|
||||
"$ref": "#/definitions/protobufListValue",
|
||||
"description": "Represents a repeated `Value`."
|
||||
}
|
||||
},
|
||||
"description": "`Value` represents a dynamically typed value which can be either\nnull, a number, a string, a boolean, a recursive struct value, or a\nlist of values. A producer of value is expected to set one of that\nvariants, absence of any variant indicates an error.\n\nThe JSON representation for `Value` is JSON value."
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code]."
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client."
|
||||
},
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
},
|
||||
"description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use."
|
||||
}
|
||||
},
|
||||
"description": "- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error\nmessage, and error details. The error code should be an enum value of\n[google.rpc.Code][google.rpc.Code], but it may accept additional error codes\nif needed. The error message should be a developer-facing English message\nthat helps developers *understand* and *resolve* the error. If a localized\nuser-facing error message is needed, put the localized message in the error\ndetails or localize it in the client. The optional error details may contain\narbitrary information about the error. There is a predefined set of error\ndetail types in the package `google.rpc` that can be used for common error\nconditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.",
|
||||
"title": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). The error model is designed to be:"
|
||||
}
|
||||
},
|
||||
"externalDocs": {
|
||||
"description": "Open Match Documentation",
|
||||
"url": "https://open-match.dev/site/docs/"
|
||||
}
|
||||
}
|
105
cloudbuild.yaml
105
cloudbuild.yaml
@ -54,7 +54,7 @@ steps:
|
||||
|
||||
- id: 'Build: Clean'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'clean']
|
||||
args: ['make', 'clean-third-party', 'clean-protos', 'clean-swagger-docs']
|
||||
waitFor: ['Docker Image: open-match-build']
|
||||
|
||||
- id: 'Test: Markdown'
|
||||
@ -70,29 +70,31 @@ steps:
|
||||
path: '/go'
|
||||
waitFor: ['Build: Clean']
|
||||
|
||||
- id: 'Build: Install Kubernetes Tools'
|
||||
- id: 'Build: Initialize Toolchain'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'install-kubernetes-tools']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
waitFor: ['Build: Clean']
|
||||
|
||||
- id: 'Build: Install Toolchain'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'install-toolchain']
|
||||
args: ['make', 'install-toolchain', 'push-helm-ci']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
waitFor: ['Setup: Download Dependencies']
|
||||
|
||||
- id: 'Test: Terraform Configuration'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'terraform-test']
|
||||
waitFor: ['Build: Initialize Toolchain']
|
||||
|
||||
- id: 'Build: Deployment Configs'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'SHORT_SHA=${SHORT_SHA}', 'update-chart-deps', 'install/yaml/']
|
||||
waitFor: ['Build: Initialize Toolchain']
|
||||
|
||||
- id: 'Build: Assets'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'assets', '-j12']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
waitFor: ['Build: Install Toolchain']
|
||||
waitFor: ['Build: Deployment Configs']
|
||||
|
||||
- id: 'Build: Binaries'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
@ -115,92 +117,53 @@ steps:
|
||||
args: ['make', '_GCB_POST_SUBMIT=${_GCB_POST_SUBMIT}', '_GCB_LATEST_VERSION=${_GCB_LATEST_VERSION}', 'SHORT_SHA=${SHORT_SHA}', 'BRANCH_NAME=${BRANCH_NAME}', 'push-images', '-j8']
|
||||
waitFor: ['Build: Assets']
|
||||
|
||||
- id: 'Build: Deployment Configs'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'VERSION_SUFFIX=$SHORT_SHA', 'clean-install-yaml', 'install/yaml/']
|
||||
waitFor: ['Build: Install Toolchain']
|
||||
|
||||
- id: 'Lint: Format, Vet, Charts'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'lint']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
waitFor: ['Build: Assets', 'Build: Deployment Configs']
|
||||
|
||||
- id: 'Test: Terraform Configuration'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'terraform-test']
|
||||
waitFor: ['Build: Install Toolchain']
|
||||
|
||||
- id: 'Test: Create Cluster'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'SHORT_SHA=${SHORT_SHA}', 'delete-gke-cluster', 'create-gke-cluster', 'push-helm']
|
||||
waitFor: ['Build: Install Kubernetes Tools']
|
||||
waitFor: ['Build: Assets']
|
||||
|
||||
- id: 'Test: Deploy Open Match'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'SHORT_SHA=${SHORT_SHA}', 'install-ci-chart']
|
||||
waitFor: ['Test: Create Cluster', 'Build: Docker Images']
|
||||
|
||||
- id: 'Test: End-to-End Cluster'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'GOPROXY=off', 'SHORT_SHA=${SHORT_SHA}', 'test-e2e-cluster']
|
||||
waitFor: ['Test: Deploy Open Match', 'Build: Assets']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
|
||||
- id: 'Test: Delete Cluster'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'SHORT_SHA=${SHORT_SHA}', 'GCLOUD_EXTRA_FLAGS=--async', 'GCP_PROJECT_ID=${PROJECT_ID}', 'ci-reap-clusters', 'delete-gke-cluster']
|
||||
waitFor: ['Test: End-to-End Cluster']
|
||||
args: ['make', 'SHORT_SHA=${SHORT_SHA}', 'OPEN_MATCH_KUBERNETES_NAMESPACE=open-match-${SHORT_SHA}', 'OPEN_MATCH_RELEASE_NAME=open-match-${SHORT_SHA}', 'auth-gke-cluster', 'delete-chart', 'ci-reap-namespaces', 'install-ci-chart']
|
||||
waitFor: ['Build: Docker Images']
|
||||
|
||||
- id: 'Deploy: Deployment Configs'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', '_GCB_POST_SUBMIT=${_GCB_POST_SUBMIT}', '_GCB_LATEST_VERSION=${_GCB_LATEST_VERSION}', 'VERSION_SUFFIX=${SHORT_SHA}', 'BRANCH_NAME=${BRANCH_NAME}', 'ci-deploy-artifacts']
|
||||
args: ['make', '_GCB_POST_SUBMIT=${_GCB_POST_SUBMIT}', '_GCB_LATEST_VERSION=${_GCB_LATEST_VERSION}', 'SHORT_SHA=${SHORT_SHA}', 'BRANCH_NAME=${BRANCH_NAME}', 'ci-deploy-artifacts']
|
||||
waitFor: ['Lint: Format, Vet, Charts', 'Test: Deploy Open Match']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
|
||||
- id: 'Test: End-to-End Cluster'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'GOPROXY=off', 'SHORT_SHA=${SHORT_SHA}', 'OPEN_MATCH_KUBERNETES_NAMESPACE=open-match-${SHORT_SHA}', 'test-e2e-cluster']
|
||||
waitFor: ['Test: Deploy Open Match', 'Build: Assets']
|
||||
volumes:
|
||||
- name: 'go-vol'
|
||||
path: '/go'
|
||||
|
||||
- id: 'Test: Delete Open Match'
|
||||
name: 'gcr.io/$PROJECT_ID/open-match-build'
|
||||
args: ['make', 'GCLOUD_EXTRA_FLAGS=--async', 'SHORT_SHA=${SHORT_SHA}', 'OPEN_MATCH_KUBERNETES_NAMESPACE=open-match-${SHORT_SHA}', 'GCP_PROJECT_ID=${PROJECT_ID}', 'delete-chart']
|
||||
waitFor: ['Test: End-to-End Cluster']
|
||||
|
||||
artifacts:
|
||||
objects:
|
||||
location: gs://open-match-build-artifacts/output/
|
||||
paths:
|
||||
- cmd/backend/backend
|
||||
- cmd/frontend/frontend
|
||||
- cmd/mmlogic/mmlogic
|
||||
- cmd/synchronizer/synchronizer
|
||||
- cmd/minimatch/minimatch
|
||||
- cmd/swaggerui/swaggerui
|
||||
- install/yaml/install.yaml
|
||||
- install/yaml/install-demo.yaml
|
||||
- install/yaml/01-redis-chart.yaml
|
||||
- install/yaml/02-open-match.yaml
|
||||
- install/yaml/01-open-match-core.yaml
|
||||
- install/yaml/02-open-match-demo.yaml
|
||||
- install/yaml/03-prometheus-chart.yaml
|
||||
- install/yaml/04-grafana-chart.yaml
|
||||
- install/yaml/05-jaeger-chart.yaml
|
||||
- examples/functions/golang/soloduel/soloduel
|
||||
- examples/functions/golang/pool/pool
|
||||
- examples/evaluator/golang/simple/simple
|
||||
- tools/certgen/certgen
|
||||
- tools/reaper/reaper
|
||||
|
||||
images:
|
||||
- 'gcr.io/$PROJECT_ID/openmatch-backend:${_OM_VERSION}-${SHORT_SHA}'
|
||||
- 'gcr.io/$PROJECT_ID/openmatch-frontend:${_OM_VERSION}-${SHORT_SHA}'
|
||||
- 'gcr.io/$PROJECT_ID/openmatch-mmlogic:${_OM_VERSION}-${SHORT_SHA}'
|
||||
- 'gcr.io/$PROJECT_ID/openmatch-synchronizer:${_OM_VERSION}-${SHORT_SHA}'
|
||||
- 'gcr.io/$PROJECT_ID/openmatch-minimatch:${_OM_VERSION}-${SHORT_SHA}'
|
||||
- 'gcr.io/$PROJECT_ID/openmatch-demo:${_OM_VERSION}-${SHORT_SHA}'
|
||||
- 'gcr.io/$PROJECT_ID/openmatch-mmf-go-soloduel:${_OM_VERSION}-${SHORT_SHA}'
|
||||
- 'gcr.io/$PROJECT_ID/openmatch-mmf-go-pool:${_OM_VERSION}-${SHORT_SHA}'
|
||||
- 'gcr.io/$PROJECT_ID/openmatch-evaluator-go-simple:${_OM_VERSION}-${SHORT_SHA}'
|
||||
- 'gcr.io/$PROJECT_ID/openmatch-swaggerui:${_OM_VERSION}-${SHORT_SHA}'
|
||||
- 'gcr.io/$PROJECT_ID/openmatch-reaper:${_OM_VERSION}-${SHORT_SHA}'
|
||||
substitutions:
|
||||
_OM_VERSION: "0.0.0-dev"
|
||||
_OM_VERSION: "0.7.0"
|
||||
_GCB_POST_SUBMIT: "0"
|
||||
_GCB_LATEST_VERSION: "undefined"
|
||||
logsBucket: 'gs://open-match-build-logs/'
|
||||
|
@ -1,56 +0,0 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM open-match-base-build as builder
|
||||
|
||||
WORKDIR /go/src/open-match.dev/open-match/cmd/backend/
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo .
|
||||
|
||||
FROM gcr.io/distroless/static:nonroot
|
||||
WORKDIR /app/
|
||||
COPY --from=builder --chown=nonroot /go/src/open-match.dev/open-match/cmd/backend/backend /app/
|
||||
|
||||
ENTRYPOINT ["/app/backend"]
|
||||
|
||||
# Docker Image Arguments
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
ARG BUILD_VERSION
|
||||
ARG IMAGE_TITLE="Open Match Backend API"
|
||||
|
||||
# Standardized Docker Image Labels
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
LABEL \
|
||||
org.opencontainers.image.created="${BUILD_TIME}" \
|
||||
org.opencontainers.image.authors="Google LLC <open-match-discuss@googlegroups.com>" \
|
||||
org.opencontainers.image.url="https://open-match.dev/" \
|
||||
org.opencontainers.image.documentation="https://open-match.dev/site/docs/" \
|
||||
org.opencontainers.image.source="https://github.com/googleforgames/open-match" \
|
||||
org.opencontainers.image.version="${BUILD_VERSION}" \
|
||||
org.opencontainers.image.revision="1" \
|
||||
org.opencontainers.image.vendor="Google LLC" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.ref.name="" \
|
||||
org.opencontainers.image.title="${IMAGE_TITLE}" \
|
||||
org.opencontainers.image.description="Flexible, extensible, and scalable video game matchmaking." \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.build-date=$BUILD_DATE \
|
||||
org.label-schema.url="http://open-match.dev/" \
|
||||
org.label-schema.vcs-url="https://github.com/googleforgames/open-match" \
|
||||
org.label-schema.version=$BUILD_VERSION \
|
||||
org.label-schema.vcs-ref=$VCS_REF \
|
||||
org.label-schema.vendor="Google LLC" \
|
||||
org.label-schema.name="${IMAGE_TITLE}" \
|
||||
org.label-schema.description="Flexible, extensible, and scalable video game matchmaking." \
|
||||
org.label-schema.usage="https://open-match.dev/site/docs/"
|
@ -16,9 +16,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"open-match.dev/open-match/internal/app"
|
||||
"open-match.dev/open-match/internal/app/backend"
|
||||
)
|
||||
|
||||
func main() {
|
||||
backend.RunApplication()
|
||||
app.RunApplication("backend", backend.BindService)
|
||||
}
|
||||
|
31
cmd/demo-first-match/main.go
Normal file
31
cmd/demo-first-match/main.go
Normal file
@ -0,0 +1,31 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"open-match.dev/open-match/examples/demo"
|
||||
"open-match.dev/open-match/examples/demo/components"
|
||||
"open-match.dev/open-match/examples/demo/components/clients"
|
||||
"open-match.dev/open-match/examples/demo/components/director"
|
||||
"open-match.dev/open-match/examples/demo/components/uptime"
|
||||
)
|
||||
|
||||
func main() {
|
||||
demo.Run(map[string]func(*components.DemoShared){
|
||||
"uptime": uptime.Run,
|
||||
"clients": clients.Run,
|
||||
"director": director.Run,
|
||||
})
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM open-match-base-build as builder
|
||||
|
||||
WORKDIR /go/src/open-match.dev/open-match/cmd/frontend/
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo .
|
||||
|
||||
FROM gcr.io/distroless/static:nonroot
|
||||
WORKDIR /app/
|
||||
COPY --from=builder --chown=nonroot /go/src/open-match.dev/open-match/cmd/frontend/frontend /app/
|
||||
|
||||
ENTRYPOINT ["/app/frontend"]
|
||||
|
||||
# Docker Image Arguments
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
ARG BUILD_VERSION
|
||||
ARG IMAGE_TITLE="Open Match Frontend API"
|
||||
|
||||
# Standardized Docker Image Labels
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
LABEL \
|
||||
org.opencontainers.image.created="${BUILD_TIME}" \
|
||||
org.opencontainers.image.authors="Google LLC <open-match-discuss@googlegroups.com>" \
|
||||
org.opencontainers.image.url="https://open-match.dev/" \
|
||||
org.opencontainers.image.documentation="https://open-match.dev/site/docs/" \
|
||||
org.opencontainers.image.source="https://github.com/googleforgames/open-match" \
|
||||
org.opencontainers.image.version="${BUILD_VERSION}" \
|
||||
org.opencontainers.image.revision="1" \
|
||||
org.opencontainers.image.vendor="Google LLC" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.ref.name="" \
|
||||
org.opencontainers.image.title="${IMAGE_TITLE}" \
|
||||
org.opencontainers.image.description="Flexible, extensible, and scalable video game matchmaking." \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.build-date=$BUILD_DATE \
|
||||
org.label-schema.url="http://open-match.dev/" \
|
||||
org.label-schema.vcs-url="https://github.com/googleforgames/open-match" \
|
||||
org.label-schema.version=$BUILD_VERSION \
|
||||
org.label-schema.vcs-ref=$VCS_REF \
|
||||
org.label-schema.vendor="Google LLC" \
|
||||
org.label-schema.name="${IMAGE_TITLE}" \
|
||||
org.label-schema.description="Flexible, extensible, and scalable video game matchmaking." \
|
||||
org.label-schema.usage="https://open-match.dev/site/docs/"
|
@ -16,9 +16,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"open-match.dev/open-match/internal/app"
|
||||
"open-match.dev/open-match/internal/app/frontend"
|
||||
)
|
||||
|
||||
func main() {
|
||||
frontend.RunApplication()
|
||||
app.RunApplication("frontend", frontend.BindService)
|
||||
}
|
||||
|
@ -16,9 +16,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"open-match.dev/open-match/internal/app"
|
||||
"open-match.dev/open-match/internal/app/minimatch"
|
||||
)
|
||||
|
||||
func main() {
|
||||
minimatch.RunApplication()
|
||||
app.RunApplication("minimatch", minimatch.BindService)
|
||||
}
|
||||
|
@ -1,56 +0,0 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM open-match-base-build as builder
|
||||
|
||||
WORKDIR /go/src/open-match.dev/open-match/cmd/mmlogic/
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo .
|
||||
|
||||
FROM gcr.io/distroless/static:nonroot
|
||||
WORKDIR /app/
|
||||
COPY --from=builder --chown=nonroot /go/src/open-match.dev/open-match/cmd/mmlogic/mmlogic /app/
|
||||
|
||||
ENTRYPOINT ["/app/mmlogic"]
|
||||
|
||||
# Docker Image Arguments
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
ARG BUILD_VERSION
|
||||
ARG IMAGE_TITLE="Open Match Data API"
|
||||
|
||||
# Standardized Docker Image Labels
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
LABEL \
|
||||
org.opencontainers.image.created="${BUILD_TIME}" \
|
||||
org.opencontainers.image.authors="Google LLC <open-match-discuss@googlegroups.com>" \
|
||||
org.opencontainers.image.url="https://open-match.dev/" \
|
||||
org.opencontainers.image.documentation="https://open-match.dev/site/docs/" \
|
||||
org.opencontainers.image.source="https://github.com/googleforgames/open-match" \
|
||||
org.opencontainers.image.version="${BUILD_VERSION}" \
|
||||
org.opencontainers.image.revision="1" \
|
||||
org.opencontainers.image.vendor="Google LLC" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.ref.name="" \
|
||||
org.opencontainers.image.title="${IMAGE_TITLE}" \
|
||||
org.opencontainers.image.description="Flexible, extensible, and scalable video game matchmaking." \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.build-date=$BUILD_DATE \
|
||||
org.label-schema.url="http://open-match.dev/" \
|
||||
org.label-schema.vcs-url="https://github.com/googleforgames/open-match" \
|
||||
org.label-schema.version=$BUILD_VERSION \
|
||||
org.label-schema.vcs-ref=$VCS_REF \
|
||||
org.label-schema.vendor="Google LLC" \
|
||||
org.label-schema.name="${IMAGE_TITLE}" \
|
||||
org.label-schema.description="Flexible, extensible, and scalable video game matchmaking." \
|
||||
org.label-schema.usage="https://open-match.dev/site/docs/"
|
@ -16,9 +16,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"open-match.dev/open-match/internal/app"
|
||||
"open-match.dev/open-match/internal/app/mmlogic"
|
||||
)
|
||||
|
||||
func main() {
|
||||
mmlogic.RunApplication()
|
||||
app.RunApplication("mmlogic", mmlogic.BindService)
|
||||
}
|
||||
|
23
cmd/scale-backend/main.go
Normal file
23
cmd/scale-backend/main.go
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"open-match.dev/open-match/examples/scale/backend"
|
||||
)
|
||||
|
||||
func main() {
|
||||
backend.Run()
|
||||
}
|
23
cmd/scale-frontend/main.go
Normal file
23
cmd/scale-frontend/main.go
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"open-match.dev/open-match/examples/scale/frontend"
|
||||
)
|
||||
|
||||
func main() {
|
||||
frontend.Run()
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM open-match-base-build as builder
|
||||
|
||||
WORKDIR /go/src/open-match.dev/open-match/cmd/swaggerui/
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo .
|
||||
COPY api/*.json /go/src/open-match.dev/open-match/third_party/swaggerui/api/
|
||||
|
||||
# Since we copy the swagger docs to the container point to them so they are served locally.
|
||||
# This is important because if there are local changes we want those reflecting in the container.
|
||||
RUN sed -i 's|https://open-match.dev/api/v.*/|/api/|g' /go/src/open-match.dev/open-match/third_party/swaggerui/config.json
|
||||
|
||||
FROM gcr.io/distroless/static:nonroot
|
||||
WORKDIR /app
|
||||
COPY --from=builder --chown=nonroot /go/src/open-match.dev/open-match/cmd/swaggerui/swaggerui /app/
|
||||
COPY --from=builder --chown=nonroot /go/src/open-match.dev/open-match/third_party/swaggerui/ /app/static
|
||||
ENTRYPOINT ["/app/swaggerui"]
|
||||
|
||||
# Docker Image Arguments
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
ARG BUILD_VERSION
|
||||
ARG IMAGE_TITLE="Open Match Swagger UI"
|
||||
|
||||
# Standardized Docker Image Labels
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
LABEL \
|
||||
org.opencontainers.image.created="${BUILD_TIME}" \
|
||||
org.opencontainers.image.authors="Google LLC <open-match-discuss@googlegroups.com>" \
|
||||
org.opencontainers.image.url="https://open-match.dev/" \
|
||||
org.opencontainers.image.documentation="https://open-match.dev/site/docs/" \
|
||||
org.opencontainers.image.source="https://github.com/GoogleCloudPlatform/open-match" \
|
||||
org.opencontainers.image.version="${BUILD_VERSION}" \
|
||||
org.opencontainers.image.revision="1" \
|
||||
org.opencontainers.image.vendor="Google LLC" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.ref.name="" \
|
||||
org.opencontainers.image.title="${IMAGE_TITLE}" \
|
||||
org.opencontainers.image.description="Flexible, extensible, and scalable video game matchmaking." \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.build-date=$BUILD_DATE \
|
||||
org.label-schema.url="http://open-match.dev/" \
|
||||
org.label-schema.vcs-url="https://github.com/GoogleCloudPlatform/open-match" \
|
||||
org.label-schema.version=$BUILD_VERSION \
|
||||
org.label-schema.vcs-ref=$VCS_REF \
|
||||
org.label-schema.vendor="Google LLC" \
|
||||
org.label-schema.name="${IMAGE_TITLE}" \
|
||||
org.label-schema.description="Flexible, extensible, and scalable video game matchmaking." \
|
||||
org.label-schema.usage="https://open-match.dev/site/docs/"
|
@ -1,56 +0,0 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM open-match-base-build as builder
|
||||
|
||||
WORKDIR /go/src/open-match.dev/open-match/cmd/synchronizer/
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo .
|
||||
|
||||
FROM gcr.io/distroless/static:nonroot
|
||||
WORKDIR /app/
|
||||
COPY --from=builder --chown=nonroot /go/src/open-match.dev/open-match/cmd/synchronizer/synchronizer /app/
|
||||
|
||||
ENTRYPOINT ["/app/synchronizer"]
|
||||
|
||||
# Docker Image Arguments
|
||||
ARG BUILD_DATE
|
||||
ARG VCS_REF
|
||||
ARG BUILD_VERSION
|
||||
ARG IMAGE_TITLE="Open Match Synchronizer API"
|
||||
|
||||
# Standardized Docker Image Labels
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
LABEL \
|
||||
org.opencontainers.image.created="${BUILD_TIME}" \
|
||||
org.opencontainers.image.authors="Google LLC <open-match-discuss@googlegroups.com>" \
|
||||
org.opencontainers.image.url="https://open-match.dev/" \
|
||||
org.opencontainers.image.documentation="https://open-match.dev/site/docs/" \
|
||||
org.opencontainers.image.source="https://github.com/googleforgames/open-match" \
|
||||
org.opencontainers.image.version="${BUILD_VERSION}" \
|
||||
org.opencontainers.image.revision="1" \
|
||||
org.opencontainers.image.vendor="Google LLC" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.ref.name="" \
|
||||
org.opencontainers.image.title="${IMAGE_TITLE}" \
|
||||
org.opencontainers.image.description="Flexible, extensible, and scalable video game matchmaking." \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.build-date=$BUILD_DATE \
|
||||
org.label-schema.url="http://open-match.dev/" \
|
||||
org.label-schema.vcs-url="https://github.com/googleforgames/open-match" \
|
||||
org.label-schema.version=$BUILD_VERSION \
|
||||
org.label-schema.vcs-ref=$VCS_REF \
|
||||
org.label-schema.vendor="Google LLC" \
|
||||
org.label-schema.name="${IMAGE_TITLE}" \
|
||||
org.label-schema.description="Flexible, extensible, and scalable video game matchmaking." \
|
||||
org.label-schema.usage="https://open-match.dev/site/docs/"
|
@ -16,9 +16,10 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"open-match.dev/open-match/internal/app"
|
||||
"open-match.dev/open-match/internal/app/synchronizer"
|
||||
)
|
||||
|
||||
func main() {
|
||||
synchronizer.RunApplication()
|
||||
app.RunApplication("synchronizer", synchronizer.BindService)
|
||||
}
|
||||
|
12
csharp/OpenMatch/OpenMatch.csproj
Normal file
12
csharp/OpenMatch/OpenMatch.csproj
Normal file
@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<PackageId>OpenMatch</PackageId>
|
||||
<Version>0.0.0-dev</Version>
|
||||
<Authors>Google LLC</Authors>
|
||||
<Company>Google LLC</Company>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
@ -25,21 +25,20 @@ Images
|
||||
|
||||
```bash
|
||||
# Servers
|
||||
docker pull gcr.io/open-match-public-images/openmatch-backendapi:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-frontendapi:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-mmforc:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-mmlogicapi:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-backend:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-frontend:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-mmlogic:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-synchronizer:{version}
|
||||
|
||||
# Evaluators
|
||||
docker pull gcr.io/open-match-public-images/openmatch-evaluator-serving:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-evaluator-go-simple:{version}
|
||||
|
||||
# Sample Match Making Functions
|
||||
docker pull gcr.io/open-match-public-images/openmatch-mmf-go-simple:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-mmf-go-soloduel:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-mmf-go-pool:{version}
|
||||
|
||||
# Test Clients
|
||||
docker pull gcr.io/open-match-public-images/openmatch-backendclient:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-clientloadgen:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-frontendclient:{version}
|
||||
docker pull gcr.io/open-match-public-images/openmatch-demo:{version}
|
||||
```
|
||||
|
||||
_This software is currently alpha, and subject to change. Not to be used in production systems._
|
||||
|
@ -12,7 +12,7 @@ SOURCE_VERSION=$1
|
||||
DEST_VERSION=$2
|
||||
SOURCE_PROJECT_ID=open-match-build
|
||||
DEST_PROJECT_ID=open-match-public-images
|
||||
IMAGE_NAMES="openmatch-backendapi openmatch-frontendapi openmatch-mmforc openmatch-mmlogicapi openmatch-evaluator-serving openmatch-mmf-go-simple openmatch-backendclient openmatch-clientloadgen openmatch-frontendclient"
|
||||
IMAGE_NAMES="openmatch-backend openmatch-frontend openmatch-mmlogic openmatch-synchronizer openmatch-minimatch openmatch-demo openmatch-mmf-go-soloduel openmatch-mmf-go-pool openmatch-evaluator-go-simple openmatch-swaggerui openmatch-reaper"
|
||||
|
||||
for name in $IMAGE_NAMES
|
||||
do
|
||||
|
@ -17,6 +17,7 @@ package director
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
@ -90,7 +91,7 @@ func run(ds *components.DemoShared) {
|
||||
Pools: []*pb.Pool{
|
||||
{
|
||||
Name: "Everyone",
|
||||
Filters: []*pb.Filter{
|
||||
FloatRangeFilters: []*pb.FloatRangeFilter{
|
||||
{
|
||||
Attribute: "mode.demo",
|
||||
Min: -100,
|
||||
@ -103,12 +104,21 @@ func run(ds *components.DemoShared) {
|
||||
},
|
||||
}
|
||||
|
||||
resp, err := be.FetchMatches(ds.Ctx, req)
|
||||
stream, err := be.FetchMatches(ds.Ctx, req)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
matches = resp.Matches
|
||||
for {
|
||||
resp, err := stream.Recv()
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
matches = append(matches, resp.GetMatch())
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -12,21 +12,20 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package main
|
||||
// Package demo contains the core startup code for running a demo.
|
||||
package demo
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/websocket"
|
||||
"net/http"
|
||||
"open-match.dev/open-match/examples/demo/bytesub"
|
||||
"open-match.dev/open-match/examples/demo/components"
|
||||
"open-match.dev/open-match/examples/demo/components/clients"
|
||||
"open-match.dev/open-match/examples/demo/components/director"
|
||||
"open-match.dev/open-match/examples/demo/components/uptime"
|
||||
"open-match.dev/open-match/examples/demo/updater"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/internal/logging"
|
||||
@ -40,7 +39,9 @@ var (
|
||||
})
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Run starts the provided components, and hosts a webserver for observing the
|
||||
// output of those components.
|
||||
func Run(comps map[string]func(*components.DemoShared)) {
|
||||
cfg, err := config.Read()
|
||||
if err != nil {
|
||||
logger.WithFields(logrus.Fields{
|
||||
@ -80,23 +81,15 @@ func main() {
|
||||
|
||||
logger.Info("Starting Server")
|
||||
|
||||
go startComponents(cfg, u)
|
||||
|
||||
address := fmt.Sprintf(":%d", cfg.GetInt("api.demo.httpport"))
|
||||
err = http.ListenAndServe(address, nil)
|
||||
logger.WithError(err).Warning("HTTP server closed.")
|
||||
}
|
||||
|
||||
func startComponents(cfg config.View, u *updater.Updater) {
|
||||
for name, f := range map[string]func(*components.DemoShared){
|
||||
"uptime": uptime.Run,
|
||||
"clients": clients.Run,
|
||||
"director": director.Run,
|
||||
} {
|
||||
for name, f := range comps {
|
||||
go f(&components.DemoShared{
|
||||
Ctx: context.Background(),
|
||||
Cfg: cfg,
|
||||
Update: u.ForField(name),
|
||||
})
|
||||
}
|
||||
|
||||
address := fmt.Sprintf(":%d", cfg.GetInt("api.demo.httpport"))
|
||||
err = http.ListenAndServe(address, nil)
|
||||
logger.WithError(err).Warning("HTTP server closed.")
|
||||
}
|
@ -13,7 +13,11 @@
|
||||
// limitations under the License.
|
||||
|
||||
window.onload = function() {
|
||||
const ws = new WebSocket("ws://" + window.location.host + "/connect");
|
||||
let protocol = "ws://";
|
||||
if (window.location.protocol == "https:") {
|
||||
protocol = "wss://";
|
||||
}
|
||||
const ws = new WebSocket(protocol + window.location.host + "/connect");
|
||||
|
||||
ws.onopen = function (event) {
|
||||
return false;
|
||||
|
@ -14,12 +14,11 @@
|
||||
|
||||
FROM open-match-base-build as builder
|
||||
|
||||
WORKDIR /go/src/open-match.dev/open-match/examples/demo
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o demo .
|
||||
WORKDIR /go/src/open-match.dev/open-match/examples/functions/golang/rosterbased
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o matchfunction .
|
||||
|
||||
FROM gcr.io/distroless/static:nonroot
|
||||
WORKDIR /app/
|
||||
COPY --from=builder --chown=nonroot /go/src/open-match.dev/open-match/examples/demo/demo /app/
|
||||
COPY --from=builder --chown=nonroot /go/src/open-match.dev/open-match/examples/demo/static /app/static
|
||||
COPY --from=builder --chown=nonroot /go/src/open-match.dev/open-match/examples/functions/golang/rosterbased/matchfunction /app/
|
||||
|
||||
ENTRYPOINT ["/app/demo"]
|
||||
ENTRYPOINT ["/app/matchfunction"]
|
35
examples/functions/golang/rosterbased/main.go
Normal file
35
examples/functions/golang/rosterbased/main.go
Normal file
@ -0,0 +1,35 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// Package main defines a sample match function that uses the GRPC harness to set up
|
||||
// the match making function as a service. This sample is a reference
|
||||
// to demonstrate the usage of the GRPC harness and should only be used as
|
||||
// a starting point for your match function. You will need to modify the
|
||||
// matchmaking logic in this function based on your game's requirements.
|
||||
package main
|
||||
|
||||
import (
|
||||
rosterbased "open-match.dev/open-match/examples/functions/golang/rosterbased/mmf"
|
||||
mmfHarness "open-match.dev/open-match/pkg/harness/function/golang"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Invoke the harness to setup a GRPC service that handles requests to run the
|
||||
// match function. The harness itself queries open match for player pools for
|
||||
// the specified request and passes the pools to the match function to generate
|
||||
// proposals.
|
||||
mmfHarness.RunMatchFunction(&mmfHarness.FunctionSettings{
|
||||
Func: rosterbased.MakeMatches,
|
||||
})
|
||||
}
|
119
examples/functions/golang/rosterbased/mmf/matchfunction.go
Normal file
119
examples/functions/golang/rosterbased/mmf/matchfunction.go
Normal file
@ -0,0 +1,119 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package mmf
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
mmfHarness "open-match.dev/open-match/pkg/harness/function/golang"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
var (
|
||||
matchName = "roster-based-matchfunction"
|
||||
emptyRosterSpot = "EMPTY_ROSTER_SPOT"
|
||||
logger = logrus.WithFields(logrus.Fields{
|
||||
"app": "openmatch",
|
||||
"component": "mmf.rosterbased",
|
||||
})
|
||||
)
|
||||
|
||||
func MakeMatches(p *mmfHarness.MatchFunctionParams) ([]*pb.Match, error) {
|
||||
// This roster based match function expects the match profile to have a
|
||||
// populated roster specifying the empty slots for each pool name and also
|
||||
// have the ticket pools referenced in the roster. It generates matches by
|
||||
// populating players from the specified pools into rosters.
|
||||
wantTickets, err := wantPoolTickets(p.Rosters)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var matches []*pb.Match
|
||||
for {
|
||||
insufficientTickets := false
|
||||
matchTickets := []*pb.Ticket{}
|
||||
matchRosters := []*pb.Roster{}
|
||||
// Loop through each pool wanted in the rosters and pick the number of
|
||||
// wanted players from the respective Pool.
|
||||
for poolName, want := range wantTickets {
|
||||
have, ok := p.PoolNameToTickets[poolName]
|
||||
if !ok {
|
||||
// A wanted Pool was not found in the Pools specified in the profile.
|
||||
insufficientTickets = true
|
||||
break
|
||||
}
|
||||
|
||||
if len(have) < want {
|
||||
// The Pool in the profile has fewer tickets than what the roster needs.
|
||||
insufficientTickets = true
|
||||
break
|
||||
}
|
||||
|
||||
// Populate the wanted tickets from the Tickets in the corresponding Pool.
|
||||
matchTickets = append(matchTickets, have[0:want]...)
|
||||
p.PoolNameToTickets[poolName] = have[want:]
|
||||
var ids []string
|
||||
for _, ticket := range matchTickets {
|
||||
ids = append(ids, ticket.Id)
|
||||
}
|
||||
|
||||
matchRosters = append(matchRosters, &pb.Roster{
|
||||
Name: poolName,
|
||||
TicketIds: ids,
|
||||
})
|
||||
}
|
||||
|
||||
if insufficientTickets {
|
||||
// Ran out of Tickets. Matches cannot be created from the remaining Tickets.
|
||||
break
|
||||
}
|
||||
|
||||
matches = append(matches, &pb.Match{
|
||||
MatchId: fmt.Sprintf("profile-%v-time-%v", p.ProfileName, time.Now().Format("2006-01-02T15:04:05.00")),
|
||||
MatchProfile: p.ProfileName,
|
||||
MatchFunction: matchName,
|
||||
Tickets: matchTickets,
|
||||
Rosters: matchRosters,
|
||||
})
|
||||
}
|
||||
|
||||
return matches, nil
|
||||
}
|
||||
|
||||
// wantPoolTickets parses the roster to return a map of the Pool name to the
|
||||
// number of empty roster slots for that Pool.
|
||||
func wantPoolTickets(rosters []*pb.Roster) (map[string]int, error) {
|
||||
wantTickets := make(map[string]int)
|
||||
for _, r := range rosters {
|
||||
if _, ok := wantTickets[r.Name]; ok {
|
||||
// We do not expect multiple Roster Pools to have the same name.
|
||||
logger.Errorf("multiple rosters with same name not supported")
|
||||
return nil, status.Error(codes.InvalidArgument, "multiple rosters with same name not supported")
|
||||
}
|
||||
|
||||
wantTickets[r.Name] = 0
|
||||
for _, slot := range r.TicketIds {
|
||||
if slot == emptyRosterSpot {
|
||||
wantTickets[r.Name] = wantTickets[r.Name] + 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return wantTickets, nil
|
||||
}
|
183
examples/scale/backend/backend.go
Normal file
183
examples/scale/backend/backend.go
Normal file
@ -0,0 +1,183 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package backend
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"math/rand"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"open-match.dev/open-match/examples/scale/profiles"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/internal/logging"
|
||||
"open-match.dev/open-match/internal/rpc"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
var (
|
||||
logger = logrus.WithFields(logrus.Fields{
|
||||
"app": "openmatch",
|
||||
"component": "scale.backend",
|
||||
})
|
||||
|
||||
// TODO: Add metrics to track matches created, tickets assigned, deleted.
|
||||
matchCount uint64
|
||||
assigned uint64
|
||||
deleted uint64
|
||||
)
|
||||
|
||||
// Run triggers execution of functions that continuously fetch, assign and
|
||||
// delete matches.
|
||||
func Run() {
|
||||
cfg, err := config.Read()
|
||||
if err != nil {
|
||||
logger.WithFields(logrus.Fields{
|
||||
"error": err.Error(),
|
||||
}).Fatalf("cannot read configuration.")
|
||||
}
|
||||
|
||||
logging.ConfigureLogging(cfg)
|
||||
beConn, err := rpc.GRPCClientFromConfig(cfg, "api.backend")
|
||||
if err != nil {
|
||||
logger.Fatalf("failed to connect to Open Match Backend, got %v", err)
|
||||
}
|
||||
|
||||
defer beConn.Close()
|
||||
be := pb.NewBackendClient(beConn)
|
||||
|
||||
feConn, err := rpc.GRPCClientFromConfig(cfg, "api.frontend")
|
||||
if err != nil {
|
||||
logger.Fatalf("failed to connect to Open Match Frontend, got %v", err)
|
||||
}
|
||||
|
||||
defer feConn.Close()
|
||||
fe := pb.NewFrontendClient(feConn)
|
||||
|
||||
// The buffered channels attempt to decouple fetch, assign and delete. It is
|
||||
// best effort and these operations may still block each other if buffers are full.
|
||||
matches := make(chan *pb.Match, 1000)
|
||||
deleteIds := make(chan string, 1000)
|
||||
|
||||
go doFetch(cfg, be, matches)
|
||||
go doAssign(be, matches, deleteIds)
|
||||
go doDelete(fe, deleteIds)
|
||||
|
||||
// The above goroutines run forever and so the main goroutine needs to block.
|
||||
select {}
|
||||
}
|
||||
|
||||
// doFetch continuously fetches all profiles in a loop and queues up the fetched
|
||||
// matches for assignment.
|
||||
func doFetch(cfg config.View, be pb.BackendClient, matches chan *pb.Match) {
|
||||
startTime := time.Now()
|
||||
mprofiles := profiles.Generate(cfg)
|
||||
for {
|
||||
var wg sync.WaitGroup
|
||||
for _, p := range mprofiles {
|
||||
wg.Add(1)
|
||||
p := p
|
||||
go func(wg *sync.WaitGroup) {
|
||||
defer wg.Done()
|
||||
fetch(be, p, matches)
|
||||
}(&wg)
|
||||
}
|
||||
|
||||
// Wait for all FetchMatches calls to complete before proceeding.
|
||||
wg.Wait()
|
||||
logger.Infof("FetchedMatches:%v, AssignedTickets:%v, DeletedTickets:%v in time %v", atomic.LoadUint64(&matchCount), atomic.LoadUint64(&assigned), atomic.LoadUint64(&deleted), time.Since(startTime))
|
||||
}
|
||||
}
|
||||
|
||||
func fetch(be pb.BackendClient, p *pb.MatchProfile, matches chan *pb.Match) {
|
||||
req := &pb.FetchMatchesRequest{
|
||||
Config: &pb.FunctionConfig{
|
||||
Host: "om-function",
|
||||
Port: 50502,
|
||||
Type: pb.FunctionConfig_GRPC,
|
||||
},
|
||||
Profiles: []*pb.MatchProfile{p},
|
||||
}
|
||||
|
||||
stream, err := be.FetchMatches(context.Background(), req)
|
||||
if err != nil {
|
||||
logger.Errorf("FetchMatches failed, got %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
for {
|
||||
resp, err := stream.Recv()
|
||||
if err == io.EOF {
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
logger.Errorf("FetchMatches failed, got %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
matches <- resp.GetMatch()
|
||||
atomic.AddUint64(&matchCount, 1)
|
||||
}
|
||||
}
|
||||
|
||||
// doAssign continuously assigns matches that were queued in the matches channel
|
||||
// by doFetch and after successful assignment, queues all the tickets to deleteIds
|
||||
// channel for deletion by doDelete.
|
||||
func doAssign(be pb.BackendClient, matches chan *pb.Match, deleteIds chan string) {
|
||||
for match := range matches {
|
||||
ids := []string{}
|
||||
for _, t := range match.Tickets {
|
||||
ids = append(ids, t.Id)
|
||||
}
|
||||
|
||||
req := &pb.AssignTicketsRequest{
|
||||
TicketIds: ids,
|
||||
Assignment: &pb.Assignment{
|
||||
Connection: fmt.Sprintf("%d.%d.%d.%d:2222", rand.Intn(256), rand.Intn(256), rand.Intn(256), rand.Intn(256)),
|
||||
},
|
||||
}
|
||||
|
||||
if _, err := be.AssignTickets(context.Background(), req); err != nil {
|
||||
logger.Errorf("AssignTickets failed, got %v", err)
|
||||
continue
|
||||
}
|
||||
|
||||
atomic.AddUint64(&assigned, uint64(len(ids)))
|
||||
for _, id := range ids {
|
||||
deleteIds <- id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// doDelete deletes all the tickets whose ids get added to the deleteIds channel.
|
||||
func doDelete(fe pb.FrontendClient, deleteIds chan string) {
|
||||
for id := range deleteIds {
|
||||
req := &pb.DeleteTicketRequest{
|
||||
TicketId: id,
|
||||
}
|
||||
|
||||
if _, err := fe.DeleteTicket(context.Background(), req); err != nil {
|
||||
logger.Errorf("DeleteTicket failed for ticket %v, got %v", id, err)
|
||||
continue
|
||||
}
|
||||
|
||||
atomic.AddUint64(&deleted, 1)
|
||||
}
|
||||
}
|
93
examples/scale/frontend/frontend.go
Normal file
93
examples/scale/frontend/frontend.go
Normal file
@ -0,0 +1,93 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package frontend
|
||||
|
||||
import (
|
||||
"context"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"open-match.dev/open-match/examples/scale/tickets"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/internal/logging"
|
||||
"open-match.dev/open-match/internal/rpc"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
var (
|
||||
logger = logrus.WithFields(logrus.Fields{
|
||||
"app": "openmatch",
|
||||
"component": "scale.frontend",
|
||||
})
|
||||
)
|
||||
|
||||
// Run triggers execution of the scale frontend component that creates
|
||||
// tickets at scale in Open Match.
|
||||
func Run() {
|
||||
cfg, err := config.Read()
|
||||
if err != nil {
|
||||
logger.WithFields(logrus.Fields{
|
||||
"error": err.Error(),
|
||||
}).Fatal("cannot read configuration.")
|
||||
}
|
||||
|
||||
logging.ConfigureLogging(cfg)
|
||||
doCreate(cfg)
|
||||
}
|
||||
|
||||
func doCreate(cfg config.View) {
|
||||
concurrent := cfg.GetInt("testConfig.concurrent-creates")
|
||||
conn, err := rpc.GRPCClientFromConfig(cfg, "api.frontend")
|
||||
if err != nil {
|
||||
logger.WithFields(logrus.Fields{
|
||||
"error": err.Error(),
|
||||
}).Fatal("failed to get Frontend connection")
|
||||
}
|
||||
|
||||
defer conn.Close()
|
||||
fe := pb.NewFrontendClient(conn)
|
||||
|
||||
var created uint64
|
||||
var failed uint64
|
||||
start := time.Now()
|
||||
for {
|
||||
var wg sync.WaitGroup
|
||||
for i := 0; i <= concurrent; i++ {
|
||||
wg.Add(1)
|
||||
go func(wg *sync.WaitGroup) {
|
||||
defer wg.Done()
|
||||
req := &pb.CreateTicketRequest{
|
||||
Ticket: tickets.Ticket(cfg),
|
||||
}
|
||||
|
||||
if _, err := fe.CreateTicket(context.Background(), req); err != nil {
|
||||
logger.WithFields(logrus.Fields{
|
||||
"error": err.Error(),
|
||||
}).Error("failed to create a ticket.")
|
||||
atomic.AddUint64(&failed, 1)
|
||||
return
|
||||
}
|
||||
|
||||
atomic.AddUint64(&created, 1)
|
||||
}(&wg)
|
||||
}
|
||||
|
||||
// Wait for all concurrent creates to complete.
|
||||
wg.Wait()
|
||||
logger.Infof("%v tickets created, %v failed in %v", created, failed, time.Since(start))
|
||||
}
|
||||
}
|
46
examples/scale/profiles/greedy.go
Normal file
46
examples/scale/profiles/greedy.go
Normal file
@ -0,0 +1,46 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package profiles
|
||||
|
||||
import (
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
// greedyProfiles generates a single profile that has only one Pool that has a single
|
||||
// filter which covers the entire range of player ranks, thereby pulling in the entire
|
||||
// player population during each profile execution.
|
||||
func greedyProfiles(cfg config.View) []*pb.MatchProfile {
|
||||
return []*pb.MatchProfile{
|
||||
{
|
||||
Name: "greedy",
|
||||
Pools: []*pb.Pool{
|
||||
{
|
||||
Name: "all",
|
||||
FloatRangeFilters: []*pb.FloatRangeFilter{
|
||||
{
|
||||
Attribute: "mmr.rating",
|
||||
Min: float64(cfg.GetInt("testConfig.minRating")),
|
||||
Max: float64(cfg.GetInt("testConfig.maxRating")),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Rosters: []*pb.Roster{
|
||||
makeRosterSlots("all", cfg.GetInt("testConfig.ticketsPerMatch")),
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
80
examples/scale/profiles/multifilter.go
Normal file
80
examples/scale/profiles/multifilter.go
Normal file
@ -0,0 +1,80 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package profiles
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
// multifilterProfiles generates a multiple profiles, each containing a single Pool
|
||||
// that specifies multiple filters to pick a partitioned player population. Note
|
||||
// that across all the profiles returned, the entire population is covered and given
|
||||
// the overlapping nature of filters, multiple profiles returned by this method may
|
||||
// match to the same set of players.
|
||||
func multifilterProfiles(cfg config.View) []*pb.MatchProfile {
|
||||
regions := cfg.GetStringSlice("testConfig.regions")
|
||||
ratingFilters := makeRangeFilters(&rangeConfig{
|
||||
name: "Rating",
|
||||
min: cfg.GetInt("testConfig.minRating"),
|
||||
max: cfg.GetInt("testConfig.maxRating"),
|
||||
rangeSize: cfg.GetInt("testConfig.multifilter.rangeSize"),
|
||||
rangeOverlap: cfg.GetInt("testConfig.multifilter.rangeOverlap"),
|
||||
})
|
||||
|
||||
latencyFilters := makeRangeFilters(&rangeConfig{
|
||||
name: "Latency",
|
||||
min: 0,
|
||||
max: 100,
|
||||
rangeSize: 70,
|
||||
rangeOverlap: 0,
|
||||
})
|
||||
|
||||
var profiles []*pb.MatchProfile
|
||||
for _, region := range regions {
|
||||
for _, latency := range latencyFilters {
|
||||
for _, rating := range ratingFilters {
|
||||
poolName := fmt.Sprintf("%s_%s_%s", region, rating.name, latency.name)
|
||||
p := &pb.Pool{
|
||||
Name: poolName,
|
||||
FloatRangeFilters: []*pb.FloatRangeFilter{
|
||||
{
|
||||
Attribute: "mmr.rating",
|
||||
Min: float64(rating.min),
|
||||
Max: float64(rating.max),
|
||||
},
|
||||
{
|
||||
Attribute: region,
|
||||
Min: float64(latency.min),
|
||||
Max: float64(latency.max),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
prof := &pb.MatchProfile{
|
||||
Name: fmt.Sprintf("Profile_%s", poolName),
|
||||
Pools: []*pb.Pool{p},
|
||||
Rosters: []*pb.Roster{makeRosterSlots(p.GetName(), cfg.GetInt("testConfig.ticketsPerMatch"))},
|
||||
}
|
||||
|
||||
profiles = append(profiles, prof)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return profiles
|
||||
}
|
93
examples/scale/profiles/multipool.go
Normal file
93
examples/scale/profiles/multipool.go
Normal file
@ -0,0 +1,93 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package profiles
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
// multipoolProfiles generates a multiple profiles, each containing a multiple player
|
||||
// Pools specifying multiple filters each. The profile also requests a roster of a
|
||||
// configured number of players per pool to be placed in a match.
|
||||
func multipoolProfiles(cfg config.View) []*pb.MatchProfile {
|
||||
characters := cfg.GetStringSlice("testConfig.characters")
|
||||
regions := cfg.GetStringSlice("testConfig.regions")
|
||||
ratingFilters := makeRangeFilters(&rangeConfig{
|
||||
name: "Rating",
|
||||
min: cfg.GetInt("testConfig.minRating"),
|
||||
max: cfg.GetInt("testConfig.maxRating"),
|
||||
rangeSize: cfg.GetInt("testConfig.multipool.rangeSize"),
|
||||
rangeOverlap: cfg.GetInt("testConfig.multipool.rangeOverlap"),
|
||||
})
|
||||
|
||||
latencyFilters := makeRangeFilters(&rangeConfig{
|
||||
name: "Latency",
|
||||
min: 0,
|
||||
max: 100,
|
||||
rangeSize: 70,
|
||||
rangeOverlap: 0,
|
||||
})
|
||||
|
||||
var profiles []*pb.MatchProfile
|
||||
for _, region := range regions {
|
||||
for _, latency := range latencyFilters {
|
||||
for _, rating := range ratingFilters {
|
||||
var pools []*pb.Pool
|
||||
var rosters []*pb.Roster
|
||||
for _, character := range characters {
|
||||
poolName := fmt.Sprintf("%s_%s_%s_%s", region, rating.name, latency.name, character)
|
||||
p := &pb.Pool{
|
||||
Name: poolName,
|
||||
FloatRangeFilters: []*pb.FloatRangeFilter{
|
||||
// TODO: Use StringEqualsFilter for the character attribute.
|
||||
{
|
||||
Attribute: character,
|
||||
Min: 0,
|
||||
Max: math.MaxFloat64,
|
||||
},
|
||||
{
|
||||
Attribute: "mmr.rating",
|
||||
Min: float64(rating.min),
|
||||
Max: float64(rating.max),
|
||||
},
|
||||
{
|
||||
Attribute: region,
|
||||
Min: float64(latency.min),
|
||||
Max: float64(latency.max),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
rosters = append(rosters, makeRosterSlots(poolName, cfg.GetInt("testConfig.multipool.characterCount")))
|
||||
pools = append(pools, p)
|
||||
}
|
||||
|
||||
prof := &pb.MatchProfile{
|
||||
Name: fmt.Sprintf("Profile_%s", fmt.Sprintf("%s_%s_%s", region, rating.name, latency.name)),
|
||||
Pools: pools,
|
||||
Rosters: rosters,
|
||||
}
|
||||
|
||||
profiles = append(profiles, prof)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return profiles
|
||||
}
|
53
examples/scale/profiles/profiles.go
Normal file
53
examples/scale/profiles/profiles.go
Normal file
@ -0,0 +1,53 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package profiles
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"open-match.dev/open-match/internal/config"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
var (
|
||||
logger = logrus.WithFields(logrus.Fields{
|
||||
"app": "openmatch",
|
||||
"component": "scale.profiles",
|
||||
})
|
||||
|
||||
// Greedy config type is used to pick profiles that pull in all players.
|
||||
Greedy = "greedy"
|
||||
// MultiFilter config type is used to pick profiles that have a Pool that uses multiple filters.
|
||||
MultiFilter = "multifilter"
|
||||
// MultiPool config type is used to pick profiles that have multiple Pools with multiple filters each.
|
||||
MultiPool = "multipool"
|
||||
// emptyRosterSpot is the string that represents an empty slot on a Roster.
|
||||
emptyRosterSpot = "EMPTY_ROSTER_SPOT"
|
||||
)
|
||||
|
||||
// Generate generates test profiles for scale demo
|
||||
func Generate(cfg config.View) []*pb.MatchProfile {
|
||||
profile := cfg.GetString("testConfig.profile")
|
||||
switch profile {
|
||||
case Greedy:
|
||||
return greedyProfiles(cfg)
|
||||
case MultiFilter:
|
||||
return multifilterProfiles(cfg)
|
||||
case MultiPool:
|
||||
return multipoolProfiles(cfg)
|
||||
}
|
||||
|
||||
logger.Warningf("Unexpected profile name %s, not returning any profiles", profile)
|
||||
return nil
|
||||
}
|
72
examples/scale/profiles/util.go
Normal file
72
examples/scale/profiles/util.go
Normal file
@ -0,0 +1,72 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package profiles
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
)
|
||||
|
||||
type rangeFilter struct {
|
||||
name string
|
||||
min int
|
||||
max int
|
||||
}
|
||||
|
||||
type rangeConfig struct {
|
||||
name string
|
||||
min int
|
||||
max int
|
||||
rangeSize int
|
||||
rangeOverlap int
|
||||
}
|
||||
|
||||
// makeRosterSlots generates a roster with the specified name and with the
|
||||
// specified number of empty roster slots.
|
||||
func makeRosterSlots(name string, count int) *pb.Roster {
|
||||
roster := &pb.Roster{
|
||||
Name: name,
|
||||
}
|
||||
|
||||
for i := 0; i <= count; i++ {
|
||||
roster.TicketIds = append(roster.TicketIds, emptyRosterSpot)
|
||||
}
|
||||
|
||||
return roster
|
||||
}
|
||||
|
||||
// makeRangeFilters generates multiple filters over a given range based on
|
||||
// the size of the range and the overlap specified for the filters.
|
||||
func makeRangeFilters(config *rangeConfig) []*rangeFilter {
|
||||
var filters []*rangeFilter
|
||||
r := config.min
|
||||
for r <= config.max {
|
||||
max := r + config.rangeSize
|
||||
if max > config.max {
|
||||
r = config.max
|
||||
}
|
||||
|
||||
filters = append(filters, &rangeFilter{
|
||||
name: fmt.Sprintf("%s_%dto%d", config.name, r, max),
|
||||
min: r,
|
||||
max: max,
|
||||
})
|
||||
|
||||
r = r + 1 + (config.rangeSize - config.rangeOverlap)
|
||||
}
|
||||
|
||||
return filters
|
||||
}
|
81
examples/scale/tickets/tickets.go
Normal file
81
examples/scale/tickets/tickets.go
Normal file
@ -0,0 +1,81 @@
|
||||
// Copyright 2019 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package tickets
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"open-match.dev/open-match/internal/config"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"open-match.dev/open-match/pkg/pb"
|
||||
"open-match.dev/open-match/pkg/structs"
|
||||
)
|
||||
|
||||
var (
|
||||
logger = logrus.WithFields(logrus.Fields{
|
||||
"app": "openmatch",
|
||||
"component": "scale.tickets",
|
||||
})
|
||||
)
|
||||
|
||||
// Ticket generates a ticket based on the config for scale testing
|
||||
func Ticket(cfg config.View) *pb.Ticket {
|
||||
characters := cfg.GetStringSlice("testConfig.characters")
|
||||
regions := cfg.GetStringSlice("testConfig.regions")
|
||||
min := cfg.GetFloat64("testConfig.minRating")
|
||||
max := cfg.GetFloat64("testConfig.maxRating")
|
||||
latencyMap := latency(regions)
|
||||
ticket := &pb.Ticket{
|
||||
Properties: structs.Struct{
|
||||
"mmr.rating": structs.Number(normalDist(40, min, max, 20)),
|
||||
// TODO: Use string attribute value for the character attribute.
|
||||
characters[rand.Intn(len(characters))]: structs.Number(float64(time.Now().Unix())),
|
||||
}.S(),
|
||||
}
|
||||
|
||||
for _, r := range regions {
|
||||
ticket.Properties.Fields[r] = structs.Number(latencyMap[r])
|
||||
}
|
||||
|
||||
return ticket
|
||||
}
|
||||
|
||||
// latency generates a latency mapping of each region to a latency value. It picks
|
||||
// one region with latency between 0ms to 100ms and sets latencies to all other regions
|
||||
// to a value between 100ms to 300ms.
|
||||
func latency(regions []string) map[string]float64 {
|
||||
latencies := make(map[string]float64)
|
||||
for _, r := range regions {
|
||||
latencies[r] = normalDist(175, 100, 300, 75)
|
||||
}
|
||||
|
||||
latencies[regions[rand.Intn(len(regions))]] = normalDist(25, 0, 100, 75)
|
||||
return latencies
|
||||
}
|
||||
|
||||
// normalDist generates a random integer in a normal distribution
|
||||
func normalDist(avg float64, min float64, max float64, stdev float64) float64 {
|
||||
sample := (rand.NormFloat64() * stdev) + avg
|
||||
switch {
|
||||
case sample > max:
|
||||
sample = max
|
||||
case sample < min:
|
||||
sample = min
|
||||
}
|
||||
|
||||
return sample
|
||||
}
|
21
go.mod
21
go.mod
@ -17,7 +17,7 @@ module open-match.dev/open-match
|
||||
go 1.12
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.40.0
|
||||
cloud.google.com/go v0.40.0 // indirect
|
||||
contrib.go.opencensus.io/exporter/jaeger v0.1.0
|
||||
contrib.go.opencensus.io/exporter/ocagent v0.5.0
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.1.0
|
||||
@ -27,26 +27,29 @@ require (
|
||||
github.com/alicebob/miniredis/v2 v2.8.1-0.20190618082157-e29950035715
|
||||
github.com/cenkalti/backoff v2.1.1+incompatible
|
||||
github.com/fsnotify/fsnotify v1.4.7
|
||||
github.com/go-logfmt/logfmt v0.4.0 // indirect
|
||||
github.com/gogo/protobuf v1.2.1
|
||||
github.com/golang/protobuf v1.3.1
|
||||
github.com/golang/protobuf v1.3.2
|
||||
github.com/gomodule/redigo v1.7.1-0.20190322064113-39e2c31b7ca3
|
||||
github.com/google/gofuzz v1.0.0 // indirect
|
||||
github.com/googleapis/gnostic v0.3.1 // indirect
|
||||
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.2
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.6
|
||||
github.com/imdario/mergo v0.3.7 // indirect
|
||||
github.com/openzipkin/zipkin-go v0.1.6
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
|
||||
github.com/pkg/errors v0.8.1
|
||||
github.com/prometheus/client_golang v1.0.0
|
||||
github.com/rs/xid v1.2.1
|
||||
github.com/sirupsen/logrus v1.4.2
|
||||
github.com/spf13/afero v1.2.2 // indirect
|
||||
github.com/spf13/viper v1.4.0
|
||||
github.com/stretchr/testify v1.3.0
|
||||
go.opencensus.io v0.22.0
|
||||
golang.org/x/net v0.0.0-20190522155817-f3200d17e092
|
||||
google.golang.org/genproto v0.0.0-20190611190212-a7e196e89fd3
|
||||
google.golang.org/grpc v1.21.1
|
||||
k8s.io/api v0.0.0-20190624085159-95846d7ef82a
|
||||
k8s.io/apimachinery v0.0.0-20190624085041-961b39a1baa0
|
||||
k8s.io/client-go v0.0.0-20190620085101-78d2af792bab
|
||||
k8s.io/utils v0.0.0-20190607212802-c55fbcfc754a // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
k8s.io/api v0.0.0-20190708094356-59223ed9f6ce // kubernetes-1.12.10
|
||||
k8s.io/apimachinery v0.0.0-20190221084156-01f179d85dbc // kubernetes-1.12.10
|
||||
k8s.io/client-go v9.0.0+incompatible // kubernetes-1.12.10
|
||||
)
|
||||
|
70
go.sum
70
go.sum
@ -14,7 +14,6 @@ contrib.go.opencensus.io/exporter/stackdriver v0.12.2/go.mod h1:iwB6wGarfphGGe/e
|
||||
contrib.go.opencensus.io/exporter/zipkin v0.1.1 h1:PR+1zWqY8ceXs1qDQQIlgXe+sdiwCf0n32bH4+Epk8g=
|
||||
contrib.go.opencensus.io/exporter/zipkin v0.1.1/go.mod h1:GMvdSl3eJ2gapOaLKzTKE3qDgUkJ86k9k3yY2eqwkzc=
|
||||
contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA=
|
||||
github.com/Azure/go-autorest v11.1.2+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
@ -53,16 +52,12 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v0.0.0-20160705203006-01aeca54ebda/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
|
||||
github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
|
||||
github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
@ -72,67 +67,62 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/gogo/protobuf v0.0.0-20171007142547-342cbe0a0415/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
|
||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
|
||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/gomodule/redigo v1.7.1-0.20190322064113-39e2c31b7ca3 h1:6amM4HsNPOvMLVc2ZnyqrjeQ92YAVWn7T4WBKK87inY=
|
||||
github.com/gomodule/redigo v1.7.1-0.20190322064113-39e2c31b7ca3/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
||||
github.com/google/btree v0.0.0-20160524151835-7d79101e329e/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
|
||||
github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
|
||||
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4 h1:hU4mGcQI4DaAYW+IbTun+2qEZVFxK0ySjQLTbS0VQKc=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d h1:7XGaL1e6bYS1yIonGp9761ExpPPV1ui0SAC59Yube9k=
|
||||
github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
|
||||
github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4=
|
||||
github.com/googleapis/gnostic v0.3.1 h1:WeAefnSUHlBb0iJKwxFDZdbfGwkd7xRNuV+IpXMJhYk=
|
||||
github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU=
|
||||
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
|
||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk=
|
||||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA=
|
||||
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.2 h1:S+ef0492XaIknb8LMjcwgW2i3cNTzDYMmDrOThOJNWc=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.2/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.6 h1:8p0pcgLlw2iuZVsdHdPaMUXFOA+6gDixcXbHEMzSyW8=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.9.6/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
|
||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
|
||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
github.com/imdario/mergo v0.3.7 h1:Y+UAYTZ7gDEuOfhxKWy+dvb5dRQ6rJjFSdX2HZY1/gI=
|
||||
github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
@ -158,18 +148,15 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ
|
||||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
|
||||
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/openzipkin/zipkin-go v0.1.6 h1:yXiysv1CSK7Q5yjGy1710zZGnsbMUIjluWBxtLXHPBo=
|
||||
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
|
||||
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
@ -209,7 +196,6 @@ github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
||||
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
|
||||
github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk=
|
||||
@ -217,7 +203,6 @@ github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
|
||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
|
||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU=
|
||||
@ -242,7 +227,6 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
@ -259,10 +243,8 @@ golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73r
|
||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190522155817-f3200d17e092 h1:4QSRKanuywn15aTZvI/mIDEgPQpswuFndXpOj3rKEco=
|
||||
@ -286,17 +268,14 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
|
||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/time v0.0.0-20161028155119-f51c12702a4d/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@ -337,8 +316,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/inf.v0 v0.9.0 h1:3zYtXIO92bvsdS3ggAdA8Gb4Azj0YU+TVY1uGYNFA8o=
|
||||
gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
|
||||
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
@ -349,21 +328,10 @@ honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWh
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
k8s.io/api v0.0.0-20190620084959-7cf5895f2711/go.mod h1:TBhBqb1AWbBQbW3XRusr7n7E4v2+5ZY8r8sAMnyFC5A=
|
||||
k8s.io/api v0.0.0-20190624085159-95846d7ef82a h1:j1H0i/hUVkDK9Y0xFEc0pQpnyuJNxvdhfy5Vj2MGCXA=
|
||||
k8s.io/api v0.0.0-20190624085159-95846d7ef82a/go.mod h1:O6YAz5STgv7S1/c/XtBULGhSltH7yWEHpWvnA1mmFRg=
|
||||
k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719/go.mod h1:I4A+glKBHiTgiEjQiCCQfCAIcIMFGt291SmsvcrFzJA=
|
||||
k8s.io/apimachinery v0.0.0-20190624085041-961b39a1baa0 h1:7oql7STcnJ85hz3BIbasXHH/+lLLKwOdsG8vjkZc8Pc=
|
||||
k8s.io/apimachinery v0.0.0-20190624085041-961b39a1baa0/go.mod h1:48PVecD7ubRgJmMRGIQfsqYu6OucVH5DzFNtACHZH8k=
|
||||
k8s.io/client-go v0.0.0-20190620085101-78d2af792bab h1:E8Fecph0qbNsAbijJJQryKu4Oi9QTp5cVpjTE+nqg6g=
|
||||
k8s.io/client-go v0.0.0-20190620085101-78d2af792bab/go.mod h1:E95RaSlHr79aHaX0aGSwcPNfygDiPKOVXdmivCIZT0k=
|
||||
k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/klog v0.3.1 h1:RVgyDHY/kFKtLqh67NvEWIgkMneNoIrdkN0CxDSQc68=
|
||||
k8s.io/klog v0.3.1/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
|
||||
k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc=
|
||||
k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0=
|
||||
k8s.io/utils v0.0.0-20190607212802-c55fbcfc754a h1:2jUDc9gJja832Ftp+QbDV0tVhQHMISFn01els+2ZAcw=
|
||||
k8s.io/utils v0.0.0-20190607212802-c55fbcfc754a/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
|
||||
k8s.io/api v0.0.0-20190708094356-59223ed9f6ce h1:5dyrqZX6sr+cG/e26KF2p6GuTIABBACjjGSOSdjS9sI=
|
||||
k8s.io/api v0.0.0-20190708094356-59223ed9f6ce/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA=
|
||||
k8s.io/apimachinery v0.0.0-20190221084156-01f179d85dbc h1:7z9/6jKWBqkK9GI1RRB0B5fZcmkatLQ/nv8kysch24o=
|
||||
k8s.io/apimachinery v0.0.0-20190221084156-01f179d85dbc/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0=
|
||||
k8s.io/client-go v9.0.0+incompatible h1:2kqW3X2xQ9SbFvWZjGEHBLlWc1LG9JIJNXWkuqwdZ3A=
|
||||
k8s.io/client-go v9.0.0+incompatible/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
|
||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
|
||||
|
29
install/gke-metadata-server-workaround.yaml
Normal file
29
install/gke-metadata-server-workaround.yaml
Normal file
@ -0,0 +1,29 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: gce:podsecuritypolicy:gke-metadata-server-workaround
|
||||
namespace: kube-system
|
||||
labels:
|
||||
addonmanager.kubernetes.io/mode: Reconcile
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: gce:podsecuritypolicy:privileged
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: gke-metadata-server
|
||||
namespace: kube-system
|
@ -1,24 +1,75 @@
|
||||
Open Match Helm Chart
|
||||
=====================
|
||||
### Open Match Helm Chart Templates
|
||||
This directory contains the [helm](https://helm.sh/ "helm") chart templates used to customize and deploy Open Match.
|
||||
|
||||
Open Match provides a Helm chart to quickly
|
||||
Templates under the `templates/` directory are for the core components in Open Match - e.g. backend, frontend, mmlogic, synchronizor, some security policies, and configmaps are defined under this folder.
|
||||
|
||||
```bash
|
||||
# Install Helm and Tiller
|
||||
# See https://github.com/helm/helm/releases for
|
||||
cd /tmp && curl -Lo helm.tar.gz https://storage.googleapis.com/kubernetes-helm/helm-v2.13.0-linux-amd64.tar.gz && tar xvzf helm.tar.gz --strip-components 1 && mv helm $(PREFIX)/bin/helm && mv tiller $(PREFIX)/bin/tiller
|
||||
Open Match also provides templates for optional components that are disabled by default under the `subcharts/` directory.
|
||||
1. `open-match-demo` contains the template for a sample director.
|
||||
2. `open-match-customize` contains flexible templates to deploy your own matchfunction and evaluator.
|
||||
3. `open-match-telemetry` contains monitoring supports for Open Match, you may choose to enable/disable [jaeger](https://www.jaegertracing.io/ "jaeger"), [prometheus](http://prometheus.io "prometheus"), [stackdriver](https://cloud.google.com/stackdriver/ "stackdriver"), [zipkin](https://zipkin.io/ "zipkin"), and [grafana](https://grafana.com/ "grafana") by overriding the config values in the provided templates.
|
||||
4. `open-match-test` contains templates of the end-to-end in-cluster tests and distributed stress tests for Open Match.
|
||||
|
||||
# Install Helm to Kubernetes Cluster
|
||||
kubectl create serviceaccount --namespace kube-system tiller
|
||||
helm init --service-account tiller --force-upgrade
|
||||
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
|
||||
# Run if RBAC is enabled.
|
||||
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
|
||||
You may control the behavior of Open Match by overriding the configs in `install/helm/open-match/values.yaml` file. Here are a few examples:
|
||||
|
||||
# Deploy Open Match
|
||||
helm upgrade --install --wait --debug open-match \
|
||||
install/helm/open-match \
|
||||
--namespace=open-match \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG)
|
||||
```diff
|
||||
# install/helm/open-match/values.yaml
|
||||
# 1. Configs under the `global` section affects all components - including components in the subcharts.
|
||||
# 2. Configs under the subchart name - e.g. `open-match-test` only affects the settings in that subchart.
|
||||
# 3. Otherwise, the configs are for core components (templates in the parent chart) only.
|
||||
|
||||
# Setup Open Match with customized ticket indices
|
||||
ticketIndices:
|
||||
+ - myfirstindice
|
||||
+ - mysecondice
|
||||
+ - ...
|
||||
|
||||
# Overrides spec.type of a specific Kubernetes Service
|
||||
# Equivalent helm cli flag --set swaggerui.portType=LoadBalancer
|
||||
swaggerui:
|
||||
- portType: ClusterIP
|
||||
+ portType: LoadBalancer
|
||||
|
||||
# Overrides spec.type of all Open Match components - including components in the subcharts
|
||||
# Equivalent helm cli flag --set global.kubernetes.service.portType=LoadBalancer
|
||||
global:
|
||||
kubernetes:
|
||||
service:
|
||||
- portType: ClusterIP
|
||||
+ portType: LoadBalancer
|
||||
|
||||
# Enables grafana support in Open Match
|
||||
# Equivalent helm cli flag --set global.telemetry.grafana.enabled=true
|
||||
global:
|
||||
telemetry:
|
||||
grafana:
|
||||
- enabled: false
|
||||
+ enabled: true
|
||||
|
||||
# Enables an optional component in Open Match
|
||||
# Equivalent helm cli flag --set open-match-demo.enabled=true
|
||||
open-match-demo:
|
||||
- enabled: false
|
||||
+ enabled: true
|
||||
|
||||
# Enables rpc logging in Open Match
|
||||
# Equivalent helm cli flag --set global.logging.rpc.enabled=true
|
||||
global:
|
||||
logging:
|
||||
rpc:
|
||||
- enabled: false
|
||||
+ enabled: true
|
||||
|
||||
# Instructs Open Match to use customized matchfunction and evaluator images
|
||||
# Equivalent helm cli flag --set open-match-customize.image.registry=[XXX],open-match-customize.image.tag=[XXX]
|
||||
open-match-customize:
|
||||
enabled: true
|
||||
+ image:
|
||||
+ registry: [YOUR_REGISTRY_URL]
|
||||
+ tag: [YOUR_IMAGE_TAG]
|
||||
+ function:
|
||||
+ image: [YOUR_MATCHFUNCTION_IMAGE_NAME]
|
||||
+ evaluator:
|
||||
+ image: [YOUR_EVALUATOR_IMAGE_NAME]
|
||||
```
|
||||
|
||||
Please see [Helm - Chart Template Guide](https://helm.sh/docs/chart_template_guide/#the-chart-template-developer-s-guide "Chart Template Guide") for the advanced usages and our [Makefile](https://github.com/googleforgames/open-match/blob/master/Makefile#L358 "Makefile") for how we use the helm charts to deploy Open Match.
|
@ -13,8 +13,8 @@
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
appVersion: "0.0.0-dev"
|
||||
version: 0.0.0-dev
|
||||
appVersion: "0.7.0"
|
||||
version: 0.7.0
|
||||
name: open-match
|
||||
description: Flexible, extensible, and scalable video game matchmaking.
|
||||
keywords:
|
||||
|
@ -1,12 +0,0 @@
|
||||
# Install Open Match using Helm
|
||||
|
||||
This chart installs the Open Match application and defines deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
|
||||
|
||||
To deploy this chart run:
|
||||
|
||||
```bash
|
||||
helm upgrade --install --wait --debug open-match install/helm/open-match \
|
||||
--namespace=open-match \
|
||||
--set openmatch.image.registry=$(REGISTRY) \
|
||||
--set openmatch.image.tag=$(TAG)
|
||||
```
|
Binary file not shown.
BIN
install/helm/open-match/charts/open-match-demo-0.0.0-dev.tgz
Normal file
BIN
install/helm/open-match/charts/open-match-demo-0.0.0-dev.tgz
Normal file
Binary file not shown.
Binary file not shown.
BIN
install/helm/open-match/charts/open-match-test-0.0.0-dev.tgz
Normal file
BIN
install/helm/open-match/charts/open-match-test-0.0.0-dev.tgz
Normal file
Binary file not shown.
@ -1,15 +1,18 @@
|
||||
dependencies:
|
||||
- name: prometheus
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
version: 8.14.0
|
||||
- name: redis
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
version: 8.0.9
|
||||
- name: grafana
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
version: 3.5.7
|
||||
- name: jaeger
|
||||
repository: https://kubernetes-charts-incubator.storage.googleapis.com/
|
||||
version: 0.12.0
|
||||
digest: sha256:46c589cecf346f749eebf700b2abfd5995361758adcc592881d7fae4abd1ea5f
|
||||
generated: "2019-07-03T11:14:34.486446966-07:00"
|
||||
- name: open-match-demo
|
||||
repository: file://./subcharts/open-match-demo
|
||||
version: 0.0.0-dev
|
||||
- name: open-match-telemetry
|
||||
repository: file://./subcharts/open-match-telemetry
|
||||
version: 0.0.0-dev
|
||||
- name: open-match-customize
|
||||
repository: file://./subcharts/open-match-customize
|
||||
version: 0.0.0-dev
|
||||
- name: open-match-test
|
||||
repository: file://./subcharts/open-match-test
|
||||
version: 0.0.0-dev
|
||||
digest: sha256:14faae8b59e808749ad29fc675a009daf72a3d0f22bcb7b954ba92660cb60779
|
||||
generated: "2019-08-02T15:52:25.299281406-07:00"
|
||||
|
@ -12,22 +12,25 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# TIP: Find versions via `gsutil ls gs://kubernetes-charts`
|
||||
|
||||
dependencies:
|
||||
- name: prometheus
|
||||
version: 8.14.0
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
condition: prometheus.enabled
|
||||
- name: redis
|
||||
version: 8.0.9
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
condition: redis.enabled
|
||||
- name: grafana
|
||||
version: 3.5.7
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
condition: grafana.enabled
|
||||
- name: jaeger
|
||||
version: 0.12.0
|
||||
repository: https://kubernetes-charts-incubator.storage.googleapis.com/
|
||||
condition: jaeger.enabled
|
||||
condition: open-match-core.enabled
|
||||
- name: open-match-demo
|
||||
version: 0.0.0-dev
|
||||
condition: open-match-demo.enabled
|
||||
repository: "file://./subcharts/open-match-demo"
|
||||
- name: open-match-telemetry
|
||||
version: 0.0.0-dev
|
||||
condition: open-match-telemetry.enabled
|
||||
repository: "file://./subcharts/open-match-telemetry"
|
||||
- name: open-match-customize
|
||||
version: 0.0.0-dev
|
||||
condition: open-match-customize.enabled
|
||||
repository: "file://./subcharts/open-match-customize"
|
||||
- name: open-match-test
|
||||
version: 0.0.0-dev
|
||||
condition: open-match-test.enabled
|
||||
repository: "file://./subcharts/open-match-test"
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
appVersion: "1.0"
|
||||
description: A Helm chart for Kubernetes
|
||||
name: open-match-customize
|
||||
version: 0.0.0-dev
|
@ -0,0 +1,40 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: customize-configmap
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: config
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
matchmaker_config.yaml: |-
|
||||
api:
|
||||
mmlogic:
|
||||
hostname: "{{ .Values.mmlogic.hostName }}"
|
||||
grpcport: "{{ .Values.mmlogic.grpcPort }}"
|
||||
|
||||
functions:
|
||||
hostname: "{{ .Values.function.hostName }}"
|
||||
grpcport: "{{ .Values.function.grpcPort }}"
|
||||
httpport: "{{ .Values.function.httpPort }}"
|
||||
|
||||
evaluator:
|
||||
hostname: "{{ .Values.evaluator.hostName }}"
|
||||
grpcport: "{{ .Values.evaluator.grpcPort }}"
|
||||
httpport: "{{ .Values.evaluator.httpPort }}"
|
@ -0,0 +1,93 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ .Values.evaluator.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: evaluator
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: evaluator
|
||||
release: {{ .Release.Name }}
|
||||
ports:
|
||||
- name: grpc
|
||||
protocol: TCP
|
||||
port: {{ .Values.evaluator.grpcPort }}
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: {{ .Values.evaluator.httpPort }}
|
||||
---
|
||||
apiVersion: autoscaling/v1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ .Values.evaluator.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
name: {{ .Values.evaluator.hostName }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.spec.common" . | nindent 2 }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.evaluator.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: evaluator
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: {{ .Values.evaluator.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: evaluator
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "prometheus.annotations" (dict "port" .Values.evaluator.httpPort "prometheus" .Values.global.telemetry.prometheus) | nindent 8 }}
|
||||
{{- include "openmatch.chartmeta" . | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: evaluator
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
volumes:
|
||||
{{- include "openmatch.volumes.configs" . | nindent 8}}
|
||||
{{- include "openmatch.volumes.tls" . | nindent 8}}
|
||||
serviceAccountName: {{ .Values.global.kubernetes.serviceAccount }}
|
||||
containers:
|
||||
- name: {{ .Values.evaluator.hostName }}
|
||||
volumeMounts:
|
||||
{{- include "openmatch.volumemounts.configs" . | nindent 10 }}
|
||||
{{- include "openmatch.volumemounts.tls" . | nindent 10 }}
|
||||
image: "{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ .Values.evaluator.image}}:{{ coalesce .Values.global.image.tag .Values.image.tag }}"
|
||||
ports:
|
||||
- name: grpc
|
||||
containerPort: {{ .Values.evaluator.grpcPort }}
|
||||
- name: http
|
||||
containerPort: {{ .Values.evaluator.httpPort }}
|
||||
{{- include "openmatch.container.common" . | nindent 8 }}
|
||||
{{- include "kubernetes.probe" (dict "port" .Values.evaluator.httpPort "isHTTPS" .Values.global.tls.enabled) | nindent 8 }}
|
@ -0,0 +1,94 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ .Values.function.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: matchfunction
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: matchfunction
|
||||
release: {{ .Release.Name }}
|
||||
ports:
|
||||
- name: grpc
|
||||
protocol: TCP
|
||||
port: {{ .Values.function.grpcPort }}
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: {{ .Values.function.httpPort }}
|
||||
---
|
||||
apiVersion: autoscaling/v1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ .Values.function.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
name: {{ .Values.function.hostName }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.spec.common" . | nindent 2 }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.function.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: matchfunction
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: {{ .Values.function.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: matchfunction
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "prometheus.annotations" (dict "port" .Values.function.httpPort "prometheus" .Values.global.telemetry.prometheus) | nindent 8 }}
|
||||
{{- include "openmatch.chartmeta" . | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: matchfunction
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
volumes:
|
||||
{{- include "openmatch.volumes.configs" . | nindent 8}}
|
||||
{{- include "openmatch.volumes.tls" . | nindent 8}}
|
||||
serviceAccountName: {{ .Values.global.kubernetes.serviceAccount }}
|
||||
containers:
|
||||
- name: {{ .Values.function.hostName }}
|
||||
volumeMounts:
|
||||
{{- include "openmatch.volumemounts.configs" . | nindent 10 }}
|
||||
{{- include "openmatch.volumemounts.tls" . | nindent 10 }}
|
||||
image: "{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ .Values.function.image}}:{{ coalesce .Values.global.image.tag .Values.image.tag }}"
|
||||
ports:
|
||||
- name: grpc
|
||||
containerPort: {{ .Values.function.grpcPort }}
|
||||
- name: http
|
||||
containerPort: {{ .Values.function.httpPort }}
|
||||
{{- include "openmatch.container.common" . | nindent 8 }}
|
||||
{{- include "kubernetes.probe" (dict "port" .Values.function.httpPort "isHTTPS" .Values.global.tls.enabled) | nindent 8 }}
|
@ -0,0 +1,35 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Default values for open-match-test.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
function:
|
||||
replicas: 3
|
||||
image: openmatch-mmf-go-soloduel
|
||||
|
||||
evaluator:
|
||||
replicas: 3
|
||||
image: openmatch-evaluator-go-simple
|
||||
|
||||
image:
|
||||
registry: gcr.io/open-match-public-images
|
||||
tag: 0.7.0
|
||||
pullPolicy: Always
|
||||
|
||||
configs:
|
||||
customize-configmap:
|
||||
mountPath: /app/config/om
|
||||
volumeName: customize-config-volume
|
19
install/helm/open-match/subcharts/open-match-demo/Chart.yaml
Normal file
19
install/helm/open-match/subcharts/open-match-demo/Chart.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
appVersion: "1.0"
|
||||
description: A Helm chart for Kubernetes
|
||||
name: open-match-demo
|
||||
version: 0.0.0-dev
|
@ -0,0 +1,39 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: demo-configmap
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: config
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
matchmaker_config.yaml: |-
|
||||
api:
|
||||
functions:
|
||||
hostname: "{{ .Values.function.hostName }}"
|
||||
grpcport: "{{ .Values.function.grpcPort }}"
|
||||
demo:
|
||||
hostname: "{{ .Values.demo.hostName }}"
|
||||
httpport: "{{ .Values.demo.httpPort }}"
|
||||
frontend:
|
||||
hostname: "{{ .Values.frontend.hostName }}"
|
||||
grpcport: "{{ .Values.frontend.grpcPort }}"
|
||||
backend:
|
||||
hostname: "{{ .Values.backend.hostName }}"
|
||||
grpcport: "{{ .Values.backend.grpcPort }}"
|
@ -0,0 +1,75 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ .Values.demo.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
type: {{ coalesce .Values.global.kubernetes.service.portType .Values.demo.portType }}
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: {{ .Values.demo.httpPort }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.demo.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: {{ .Values.demo.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "openmatch.chartmeta" . | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
volumes:
|
||||
{{- include "openmatch.volumes.configs" . | nindent 8}}
|
||||
{{- include "openmatch.volumes.tls" . | nindent 8}}
|
||||
serviceAccountName: {{ .Values.global.kubernetes.serviceAccount }}
|
||||
containers:
|
||||
- name: {{ .Values.demo.hostName }}
|
||||
volumeMounts:
|
||||
{{- include "openmatch.volumemounts.configs" . | nindent 10 }}
|
||||
{{- include "openmatch.volumemounts.tls" . | nindent 10 }}
|
||||
image: "{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ .Values.demo.image}}:{{ coalesce .Values.global.image.tag .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.demo.httpPort }}
|
||||
{{- include "kubernetes.probe" (dict "port" .Values.demo.httpPort) | nindent 8 }}
|
@ -0,0 +1,38 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Default values for open-match-demo.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
demo:
|
||||
hostName: om-demo
|
||||
httpPort: 51507
|
||||
portType: ClusterIP
|
||||
replicas: 1
|
||||
image: openmatch-demo-first-match
|
||||
|
||||
image:
|
||||
registry: gcr.io/open-match-public-images
|
||||
tag: 0.7.0
|
||||
pullPolicy: Always
|
||||
|
||||
# TODO: Split tls configs into a separate config file. For now Open Match assumes core components share the same secure mode
|
||||
# with the mmfs and evaluator, so we have to copy these secure settings and define a new configmap for it whenever we what
|
||||
# to create a new evaluator and mmf. We should create a global configmap for the security settings for all subcharts
|
||||
# under the /install/helm/open-match directory to avoid copy&paste files around.
|
||||
configs:
|
||||
demo-configmap:
|
||||
mountPath: /app/config/om
|
||||
volumeName: demo-config-volume
|
@ -0,0 +1,19 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
appVersion: "1.0"
|
||||
description: A Helm chart for Kubernetes
|
||||
name: open-match-scale
|
||||
version: 0.0.0-dev
|
@ -12,58 +12,62 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.openmatch.demo.install }}
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: om-demo
|
||||
name: {{ .Values.scaleBackend.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
component: scaleBackend
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
type: {{ .Values.openmatch.demo.porttype }}
|
||||
component: scaleBackend
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: {{ .Values.openmatch.demo.http.port }}
|
||||
port: {{ .Values.scaleBackend.httpPort }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: om-demo
|
||||
name: {{ .Values.scaleBackend.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
component: scaleBackend
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: {{ .Values.openmatch.demo.replicas }}
|
||||
replicas: {{ .Values.scaleBackend.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 6) }}
|
||||
component: scaleBackend
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "prometheus.annotations" (dict "port" .Values.openmatch.demo.http.port "prometheus" .Values.openmatch.telemetry.prometheus) | nindent 8 }}
|
||||
{{- include "openmatch.chartmeta" . | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demo
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 8) }}
|
||||
component: scaleBackend
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
{{- include "openmatch.spec.common" . | nindent 6 }}
|
||||
volumes:
|
||||
{{- include "openmatch.volumes.configs" . | nindent 8}}
|
||||
{{- include "openmatch.volumes.tls" . | nindent 8}}
|
||||
serviceAccountName: {{ .Values.global.kubernetes.serviceAccount }}
|
||||
containers:
|
||||
- name: om-demo
|
||||
{{- include "openmatch.container.common" . | nindent 8 }}
|
||||
image: "{{ .Values.openmatch.image.registry }}/{{ .Values.openmatch.image.demo.name}}:{{ .Values.openmatch.image.tag }}"
|
||||
- name: {{ .Values.scaleBackend.hostName }}
|
||||
volumeMounts:
|
||||
{{- include "openmatch.volumemounts.configs" . | nindent 10 }}
|
||||
{{- include "openmatch.volumemounts.tls" . | nindent 10 }}
|
||||
image: "{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ .Values.scaleBackend.image}}:{{ coalesce .Values.global.image.tag .Values.image.tag }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.openmatch.demo.http.port }}
|
||||
{{- include "kubernetes.probe" (dict "port" .Values.openmatch.demo.http.port) | nindent 8 }}
|
||||
{{- end }}
|
||||
containerPort: {{ .Values.scaleBackend.httpPort }}
|
||||
{{- include "openmatch.container.common" . | nindent 8 }}
|
@ -0,0 +1,54 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: scale-configmap
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: config
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
matchmaker_config.yaml: |-
|
||||
api:
|
||||
frontend:
|
||||
hostname: "{{ .Values.frontend.hostName }}"
|
||||
grpcport: "{{ .Values.frontend.grpcPort }}"
|
||||
backend:
|
||||
hostname: "{{ .Values.backend.hostName }}"
|
||||
grpcport: "{{ .Values.backend.grpcPort }}"
|
||||
testConfig:
|
||||
profile: "{{ .Values.testConfig.profile }}"
|
||||
concurrentCreates: "{{ .Values.testConfig.concurrentCreates }}"
|
||||
regions:
|
||||
{{- range .Values.testConfig.regions }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
characters:
|
||||
{{- range .Values.testConfig.characters }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
minRating: "{{ .Values.testConfig.minRating }}"
|
||||
maxRating: "{{ .Values.testConfig.maxRating }}"
|
||||
ticketsPerMatch: "{{ .Values.testConfig.ticketsPerMatch }}"
|
||||
multifilter:
|
||||
rangeSize: "{{ .Values.testConfig.multifilter.rangeSize }}"
|
||||
rangeOverlap: "{{ .Values.testConfig.multifilter.rangeOverlap }}"
|
||||
multipool:
|
||||
rangeSize: "{{ .Values.testConfig.multipool.rangeSize }}"
|
||||
rangeOverlap: "{{ .Values.testConfig.multipool.rangeOverlap }}"
|
||||
characterCount: "{{ .Values.testConfig.multipool.characterCount }}"
|
@ -0,0 +1,73 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ .Values.scaleFrontend.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: scaleFrontend
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: scaleFrontend
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: {{ .Values.scaleFrontend.httpPort }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Values.scaleFrontend.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: scaleFrontend
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: {{ .Values.scaleFrontend.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: scaleFrontend
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "openmatch.chartmeta" . | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: scaleFrontend
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
volumes:
|
||||
{{- include "openmatch.volumes.configs" . | nindent 8}}
|
||||
{{- include "openmatch.volumes.tls" . | nindent 8}}
|
||||
serviceAccountName: {{ .Values.global.kubernetes.serviceAccount }}
|
||||
containers:
|
||||
- name: {{ .Values.scaleFrontend.hostName }}
|
||||
volumeMounts:
|
||||
{{- include "openmatch.volumemounts.configs" . | nindent 10 }}
|
||||
{{- include "openmatch.volumemounts.tls" . | nindent 10 }}
|
||||
image: "{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ .Values.scaleFrontend.image}}:{{ coalesce .Values.global.image.tag .Values.image.tag }}"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.scaleFrontend.httpPort }}
|
||||
{{- include "openmatch.container.common" . | nindent 8 }}
|
@ -0,0 +1,57 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
scaleFrontend:
|
||||
hostName: om-scale-frontend
|
||||
httpPort: 51509
|
||||
replicas: 1
|
||||
image: openmatch-scale-frontend
|
||||
|
||||
scaleBackend:
|
||||
hostName: om-scale-backend
|
||||
httpPort: 51510
|
||||
replicas: 1
|
||||
image: openmatch-scale-backend
|
||||
|
||||
image:
|
||||
registry: gcr.io/open-match-public-images
|
||||
tag: 0.7.0
|
||||
pullPolicy: Always
|
||||
|
||||
configs:
|
||||
scale-configmap:
|
||||
mountPath: /app/config/om
|
||||
volumeName: scale-config-volume
|
||||
|
||||
testConfig:
|
||||
profile: greedy
|
||||
concurrentCreates: 500
|
||||
regions:
|
||||
- region.europe-west1
|
||||
- region.europe-west2
|
||||
- region.europe-west3
|
||||
- region.europe-west4
|
||||
characters:
|
||||
- char.cleric
|
||||
- char.knight
|
||||
minRating: 0
|
||||
maxRating: 100
|
||||
ticketsPerMatch: 8
|
||||
multifilter:
|
||||
rangeSize: 10
|
||||
rangeOverlap: 5
|
||||
multipool:
|
||||
rangeSize: 10
|
||||
rangeOverlap: 5
|
||||
characterCount: 4
|
@ -0,0 +1,19 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
appVersion: "1.0"
|
||||
description: A Helm chart for Kubernetes
|
||||
name: open-match-telemetry
|
||||
version: 0.0.0-dev
|
@ -0,0 +1,29 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# TIP: Find versions via `gsutil ls gs://kubernetes-charts`
|
||||
|
||||
dependencies:
|
||||
- name: prometheus
|
||||
version: 8.14.0
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
condition: global.telemetry.prometheus.enabled,prometheus.enabled
|
||||
- name: grafana
|
||||
version: 3.5.7
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
condition: global.telemetry.grafana.enabled,grafana.enabled
|
||||
- name: jaeger
|
||||
version: 0.12.0
|
||||
repository: https://kubernetes-charts-incubator.storage.googleapis.com/
|
||||
condition: global.telemetry.jaeger.enabled,jaeger.enabled
|
@ -12,7 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.grafana.enabled }}
|
||||
{{- if .Values.global.telemetry.grafana.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
@ -0,0 +1,155 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Default values for open-match-telemetry.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
image:
|
||||
registry: gcr.io/open-match-public-images
|
||||
tag: 0.7.0
|
||||
pullPolicy: Always
|
||||
|
||||
# https://github.com/helm/charts/tree/master/stable/prometheus
|
||||
prometheus:
|
||||
alertmanager:
|
||||
enabled: true
|
||||
nodeExporter:
|
||||
enabled: true
|
||||
kubeStateMetrics:
|
||||
enabled: true
|
||||
pushgateway:
|
||||
enabled: true
|
||||
server:
|
||||
resources:
|
||||
requests:
|
||||
memory: 4Gi
|
||||
cpu: 2
|
||||
prometheus.yml:
|
||||
rule_files:
|
||||
- /etc/config/rules
|
||||
- /etc/config/alerts
|
||||
|
||||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost:9090
|
||||
|
||||
# A scrape configuration for running Prometheus on a Kubernetes cluster.
|
||||
# This uses separate scrape configs for cluster components (i.e. API server, node)
|
||||
# and services to allow each to use different authentication configs.
|
||||
#
|
||||
# Kubernetes labels will be added as Prometheus labels on metrics via the
|
||||
# `labelmap` relabeling action.
|
||||
|
||||
# Scrape config for API servers.
|
||||
#
|
||||
# Kubernetes exposes API servers as endpoints to the default/kubernetes
|
||||
# service so this uses `endpoints` role and uses relabelling to only keep
|
||||
# the endpoints associated with the default/kubernetes service using the
|
||||
# default named port `https`. This works for single API server deployments as
|
||||
# well as HA API server deployments.
|
||||
- job_name: 'kubernetes-apiservers'
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
|
||||
# Default to scraping over https. If required, just disable this or change to
|
||||
# `http`.
|
||||
scheme: https
|
||||
|
||||
# This TLS & bearer token file config is used to connect to the actual scrape
|
||||
# endpoints for cluster components. This is separate to discovery auth
|
||||
# configuration because discovery & scraping are two separate concerns in
|
||||
# Prometheus. The discovery auth config is automatic if Prometheus runs inside
|
||||
# the cluster. Otherwise, more config options have to be provided within the
|
||||
# <kubernetes_sd_config>.
|
||||
tls_config:
|
||||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
# If your node certificates are self-signed or use a different CA to the
|
||||
# master CA, then disable certificate verification below. Note that
|
||||
# certificate verification is an integral part of a secure infrastructure
|
||||
# so this should only be disabled in a controlled environment. You can
|
||||
# disable certificate verification by uncommenting the line below.
|
||||
#
|
||||
insecure_skip_verify: true
|
||||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
|
||||
# Keep only the default/kubernetes service endpoints for the https port. This
|
||||
# will add targets for each API server which Kubernetes adds an endpoint to
|
||||
# the default/kubernetes service.
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
|
||||
action: keep
|
||||
regex: default;kubernetes;https
|
||||
|
||||
# Example scrape config for pods
|
||||
#
|
||||
# The relabeling allows the actual pod scrape endpoint to be configured via the
|
||||
# following annotations:
|
||||
#
|
||||
# * `prometheus.io/scrape`: Only scrape pods that have a value of `true`
|
||||
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
|
||||
# * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
|
||||
- job_name: 'kubernetes-pods'
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: pod
|
||||
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
|
||||
action: keep
|
||||
regex: true
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
|
||||
action: replace
|
||||
target_label: __metrics_path__
|
||||
regex: (.+)
|
||||
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
|
||||
action: replace
|
||||
regex: ([^:]+)(?::\d+)?;(\d+)
|
||||
replacement: $1:$2
|
||||
target_label: __address__
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_pod_label_(.+)
|
||||
- source_labels: [__meta_kubernetes_namespace]
|
||||
action: replace
|
||||
target_label: kubernetes_namespace
|
||||
- source_labels: [__meta_kubernetes_pod_name]
|
||||
action: replace
|
||||
target_label: kubernetes_pod_name
|
||||
|
||||
grafana:
|
||||
enabled: true
|
||||
persistence:
|
||||
enabled: true
|
||||
server:
|
||||
persistentVolume:
|
||||
size: 10Gi
|
||||
adminPassword: openmatch
|
||||
service:
|
||||
port: 3000
|
||||
sidecar:
|
||||
dashboards:
|
||||
enabled: true
|
||||
plugins: grafana-piechart-panel
|
||||
datasources:
|
||||
datasources.yaml:
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
url: http://open-match-prometheus-server.{{ .Release.Namespace }}.svc.cluster.local:80/
|
||||
access: proxy
|
||||
isDefault: true
|
19
install/helm/open-match/subcharts/open-match-test/Chart.yaml
Normal file
19
install/helm/open-match/subcharts/open-match-test/Chart.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: v1
|
||||
appVersion: "1.0"
|
||||
description: A Helm chart for Kubernetes
|
||||
name: open-match-test
|
||||
version: 0.0.0-dev
|
@ -0,0 +1,48 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: e2e-job
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: e2e-job
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: e2e-job
|
||||
# Specifies the number of retries before marking this job failed. Defaults to 6 if not specified.
|
||||
backoffLimit: 3
|
||||
# Specifies the desired number of successfully finished pods the job should be run with.
|
||||
completions: 1
|
||||
# Specifies the maximum desired number of pods the job should run at any given time.
|
||||
parallelism: 1
|
||||
# Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it.
|
||||
activeDeadlineSeconds: 900
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "openmatch.chartmeta" . | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: e2e-job
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
containers:
|
||||
- image: "{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ .Values.e2etest.image }}:{{ coalesce .Values.global.image.tag .Values.image.tag }}"
|
||||
name: e2e-job
|
||||
env:
|
||||
- name: NAMESPACE
|
||||
value: "{{ .Release.Namespace }}"
|
||||
command: ["go"]
|
||||
args:
|
||||
- "test"
|
||||
- "./test/e2e"
|
||||
- "./internal/testing/e2e/"
|
||||
- "-v"
|
||||
- "-race"
|
||||
- "-tags"
|
||||
- "e2ecluster"
|
||||
restartPolicy: Never
|
@ -12,21 +12,22 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# TODO: templates the ports
|
||||
{{- if .Values.openmatch.stresstest.install }}
|
||||
{{- if .Values.stresstest.enabled }}
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: locust-master
|
||||
name: {{ .Values.stresstest.masterName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
component: locust-master
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: locust-master
|
||||
type: {{ .Values.openmatch.stresstest.porttype }}
|
||||
type: {{ coalesce .Values.global.kubernetes.service.portType .Values.stresstest.portType }}
|
||||
ports:
|
||||
- name: loc-master-web
|
||||
port: 8089
|
||||
@ -44,32 +45,34 @@ spec:
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: locust-master
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
name: {{ .Values.stresstest.masterName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: locust-master
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: 1 # We only need one master
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: locust-master
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 6) }}
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "openmatch.chartmeta" . | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: locust-master
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 8) }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
{{- include "openmatch.spec.common" . | nindent 6 }}
|
||||
serviceAccountName: {{ .Values.kubernetes.serviceAccount }}
|
||||
containers:
|
||||
- name: locust-master
|
||||
{{- include "openmatch.container.common" . | nindent 8 }}
|
||||
image: "{{ .Values.openmatch.image.registry }}/{{ .Values.openmatch.image.stresstest.name }}:{{ .Values.openmatch.image.tag }}"
|
||||
- name: {{ .Values.stresstest.masterName }}
|
||||
image: "{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ .Values.stresstest.image}}:{{ coalesce .Values.global.image.tag .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: loc-master-web
|
||||
containerPort: 8089
|
||||
@ -80,19 +83,27 @@ spec:
|
||||
- name: loc-master-p2
|
||||
containerPort: 5558
|
||||
protocol: TCP
|
||||
{{- if .Values.stresstest.noweb }}
|
||||
env:
|
||||
- name: NO_WEB
|
||||
value: "{{ .Values.stresstest.noweb }}"
|
||||
- name: GCP_PROJECT
|
||||
value: "{{ .Values.global.gcpProjectId }}"
|
||||
{{- end }}
|
||||
command: ["python3"]
|
||||
# TODO: template the secure mode & target host
|
||||
# TODO: template the secure mode
|
||||
args:
|
||||
- "./locust"
|
||||
- "-f"
|
||||
- "./frontend.py"
|
||||
- "--host=http://om-frontend:{{ .Values.openmatch.frontend.http.port }}"
|
||||
- "--host=http://{{ .Values.frontend.hostName }}:{{ .Values.frontend.httpPort }}"
|
||||
- "--master"
|
||||
{{- if .Values.openmatch.stresstest.noweb }}
|
||||
{{- if .Values.stresstest.noweb }}
|
||||
- "--no-web"
|
||||
- "-c{{ .Values.openmatch.stresstest.clients }}"
|
||||
- "-r{{ .Values.openmatch.stresstest.rate }}"
|
||||
- "-t{{ .Values.openmatch.stresstest.duration }}"
|
||||
- "--expect-slaves={{ .Values.openmatch.stresstest.replicas }}"
|
||||
{{- end }}
|
||||
- "-c{{ .Values.stresstest.clients }}"
|
||||
- "-r{{ .Values.stresstest.rate }}"
|
||||
- "-t{{ .Values.stresstest.duration }}"
|
||||
- "--expect-slaves={{ .Values.stresstest.replicas }}"
|
||||
- "--csv=stress_user{{ .Values.stresstest.clients }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -0,0 +1,29 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.stresstest.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
# This annotation is not critical to security.
|
||||
# If the Cloud IAM binding does not exist, this annotation does not allow the Pod to use the GSA.
|
||||
# Ref: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
|
||||
annotations:
|
||||
iam.gke.io/gcp-service-account: stress-test-uploader@{{ .Values.global.gcpProjectId }}.iam.gserviceaccount.com
|
||||
name: {{ .Values.kubernetes.serviceAccount }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- end }}
|
@ -12,42 +12,44 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.openmatch.stresstest.install }}
|
||||
{{- if .Values.stresstest.enabled }}
|
||||
kind: Deployment
|
||||
apiVersion: extensions/v1beta1
|
||||
metadata:
|
||||
name: locust-worker
|
||||
name: {{ .Values.stresstest.slavesName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: locust-worker
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: {{ .Values.openmatch.stresstest.replicas }}
|
||||
replicas: {{ .Values.stresstest.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: locust-worker
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 6) }}
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: locust-worker
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 8) }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
{{- include "openmatch.spec.common" . | nindent 6 }}
|
||||
serviceAccountName: {{ .Values.kubernetes.serviceAccount }}
|
||||
containers:
|
||||
- name: locust-worker
|
||||
image: "{{ .Values.openmatch.image.registry }}/{{ .Values.openmatch.image.stresstest.name}}:{{ .Values.openmatch.image.tag }}"
|
||||
- name: {{ .Values.stresstest.slavesName }}
|
||||
image: "{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ .Values.stresstest.image}}:{{ coalesce .Values.global.image.tag .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: ["python3"]
|
||||
# TODO: template the secure mode
|
||||
args:
|
||||
- "./locust"
|
||||
- "-f"
|
||||
- "./frontend.py"
|
||||
- "--host=http://om-frontend:{{ .Values.openmatch.frontend.http.port }}"
|
||||
- "--host=http://{{ .Values.frontend.hostName }}:{{ .Values.frontend.httpPort }}"
|
||||
- "--slave"
|
||||
- "--master-host=locust-master"
|
||||
{{- end }}
|
||||
- "--master-host={{ .Values.stresstest.masterName }}"
|
||||
{{- end }}
|
@ -0,0 +1,40 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Default values for open-match-test.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
stresstest:
|
||||
masterName: locust-master
|
||||
slavesName: locust-slaves
|
||||
portType: ClusterIP
|
||||
image: openmatch-stress-frontend
|
||||
replicas: 5
|
||||
noweb: true
|
||||
clients: 1000
|
||||
rate: 200
|
||||
duration: 30s
|
||||
enabled: false
|
||||
|
||||
e2etest:
|
||||
image: openmatch-base-build
|
||||
|
||||
kubernetes:
|
||||
serviceAccount: stress-test-uploader
|
||||
|
||||
image:
|
||||
registry: gcr.io/open-match-public-images
|
||||
tag: 0.7.0
|
||||
pullPolicy: Always
|
@ -1,11 +0,0 @@
|
||||
The Open Match has been installed in the namespace {{ .Release.Namespace }}.
|
||||
|
||||
You can watch the status by running 'kubectl --namespace {{ .Release.Namespace }} get pods,svc'
|
||||
|
||||
Finally don't forget to explore our documentation and usage guides on how to develop Open Match match making functions:
|
||||
|
||||
- [Matchmaking Logic (MMLogic) API
|
||||
](https://github.com/googleforgames/open-match#matchmaking-logic-mmlogic-api)
|
||||
- [Go Example](https://open-match.dev/open-match/tree/master/examples/functions/golang/manual-simple)
|
||||
- [Python3 Example](https://open-match.dev/open-match/tree/master/examples/functions/python3/mmlogic-simple)
|
||||
|
@ -23,50 +23,15 @@ Expand the name of the chart.
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "openmatch.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "openmatch.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Render chart metadata labels unless "openmatch.noChartMeta" is set.
|
||||
Expects to find in a scope a field "indent" with an integer value to pass to function "nindent".
|
||||
Render chart metadata labels: "chart", "heritage" unless "openmatch.noChartMeta" is set.
|
||||
*/}}
|
||||
{{- define "openmatch.chartmeta" -}}
|
||||
{{- if not .Values.openmatch.noChartMeta -}}
|
||||
{{- include "openmatch.chartmetalabels" . | nindent .indent }}
|
||||
{{- if not .Values.noChartMeta -}}
|
||||
chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Print chart metadata labels: "chart", "release", "heritage".
|
||||
*/}}
|
||||
{{- define "openmatch.chartmetalabels" -}}
|
||||
chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "prometheus.annotations" -}}
|
||||
{{- if and (.prometheus.serviceDiscovery) (.prometheus.enabled) -}}
|
||||
prometheus.io/scrape: "true"
|
||||
@ -76,51 +41,61 @@ prometheus.io/path: {{ .prometheus.endpoint }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.container.common" -}}
|
||||
imagePullPolicy: {{ .Values.openmatch.image.pullPolicy }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
resources:
|
||||
requests:
|
||||
memory: 100Mi
|
||||
cpu: 100m
|
||||
volumeMounts:
|
||||
- name: om-config-volume
|
||||
mountPath: {{ .Values.openmatch.config.mountPath }}
|
||||
{{- if .Values.openmatch.tls.enabled }}
|
||||
- name: root-ca-volume
|
||||
mountPath: {{ .Values.openmatch.tls.root.mountPath }}
|
||||
- name: tls-server-volume
|
||||
mountPath: {{ .Values.openmatch.tls.server.mountPath }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.volumemounts.configs" -}}
|
||||
{{- range $configName, $configValues := (mergeOverwrite .Values.configs .Values.global.configs) }}
|
||||
- name: {{ $configValues.volumeName }}
|
||||
mountPath: {{ $configValues.mountPath }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.spec.common" -}}
|
||||
serviceAccountName: {{ .Values.openmatch.kubernetes.serviceAccount }}
|
||||
volumes:
|
||||
- name: om-config-volume
|
||||
{{- define "openmatch.volumes.configs" -}}
|
||||
{{- range $configName, $configValues := (mergeOverwrite .Values.configs .Values.global.configs) }}
|
||||
- name: {{ $configValues.volumeName }}
|
||||
configMap:
|
||||
name: om-configmap
|
||||
{{- if .Values.openmatch.tls.enabled }}
|
||||
name: {{ $configName }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.volumemounts.tls" -}}
|
||||
{{- if .Values.global.tls.enabled }}
|
||||
- name: tls-server-volume
|
||||
mountPath: {{ .Values.global.tls.server.mountPath }}
|
||||
- name: root-ca-volume
|
||||
secret:
|
||||
secretName: om-tls-rootca
|
||||
mountPath: {{ .Values.global.tls.rootca.mountPath }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.volumes.tls" -}}
|
||||
{{- if .Values.global.tls.enabled }}
|
||||
- name: tls-server-volume
|
||||
secret:
|
||||
secretName: om-tls-server
|
||||
{{- end }}
|
||||
- name: root-ca-volume
|
||||
secret:
|
||||
secretName: om-tls-rootca
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.container.withredis" -}}
|
||||
env:
|
||||
- name: REDIS_SERVICE_HOST
|
||||
value: "$(OM_REDIS_MASTER_SERVICE_HOST)"
|
||||
- name: REDIS_SERVICE_PORT
|
||||
value: "$(OM_REDIS_MASTER_SERVICE_PORT)"
|
||||
{{- define "openmatch.volumemounts.withredis" -}}
|
||||
{{- if .Values.redis.usePassword }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.redis.fullnameOverride }}
|
||||
key: redis-password
|
||||
{{- end}}
|
||||
- name: redis-password
|
||||
mountPath: {{ .Values.redis.secretMountPath }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.volumes.withredis" -}}
|
||||
{{- if .Values.redis.usePassword }}
|
||||
- name: redis-password
|
||||
secret:
|
||||
secretName: {{ .Values.redis.fullnameOverride }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "kubernetes.probe" -}}
|
||||
@ -141,3 +116,9 @@ readinessProbe:
|
||||
periodSeconds: 10
|
||||
failureThreshold: 2
|
||||
{{- end -}}
|
||||
|
||||
{{- define "openmatch.HorizontalPodAutoscaler.spec.common" -}}
|
||||
minReplicas: 1
|
||||
maxReplicas: 10
|
||||
targetCPUUtilizationPercentage: 50
|
||||
{{- end -}}
|
||||
|
@ -12,64 +12,87 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.openmatch.backend.install }}
|
||||
{{- if index .Values "open-match-core" "enabled" }}
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: om-backend
|
||||
name: {{ .Values.backend.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
component: backend
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: backend
|
||||
type: {{ .Values.openmatch.backend.porttype }}
|
||||
release: {{ .Release.Name }}
|
||||
type: {{ coalesce .Values.global.kubernetes.service.portType .Values.backend.portType }}
|
||||
ports:
|
||||
- name: grpc
|
||||
protocol: TCP
|
||||
port: {{ .Values.openmatch.backend.grpc.port }}
|
||||
port: {{ .Values.backend.grpcPort }}
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: {{ .Values.openmatch.backend.http.port }}
|
||||
port: {{ .Values.backend.httpPort }}
|
||||
---
|
||||
apiVersion: autoscaling/v1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ .Values.backend.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
name: {{ .Values.backend.hostName }}
|
||||
{{- include "openmatch.HorizontalPodAutoscaler.spec.common" . | nindent 2 }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: om-backend
|
||||
name: {{ .Values.backend.hostName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations: {{- include "openmatch.chartmeta" . | nindent 4 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: backend
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
replicas: {{ .Values.openmatch.backend.replicas }}
|
||||
replicas: {{ .Values.backend.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: backend
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 6) }}
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "prometheus.annotations" (dict "port" .Values.openmatch.backend.http.port "prometheus" .Values.openmatch.telemetry.prometheus) | nindent 8 }}
|
||||
{{- include "openmatch.chartmeta" . | nindent 8 }}
|
||||
{{- include "prometheus.annotations" (dict "port" .Values.backend.httpPort "prometheus" .Values.global.telemetry.prometheus) | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: backend
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 8) }}
|
||||
release: {{ .Release.Name }}
|
||||
spec:
|
||||
{{- include "openmatch.spec.common" . | nindent 6 }}
|
||||
volumes:
|
||||
{{- include "openmatch.volumes.configs" . | nindent 8}}
|
||||
{{- include "openmatch.volumes.tls" . | nindent 8}}
|
||||
{{- include "openmatch.volumes.withredis" . | nindent 8}}
|
||||
serviceAccountName: {{ .Values.global.kubernetes.serviceAccount }}
|
||||
containers:
|
||||
- name: om-backend
|
||||
{{- include "openmatch.container.common" . | nindent 8 }}
|
||||
{{- include "openmatch.container.withredis" . | nindent 8 }}
|
||||
image: "{{ .Values.openmatch.image.registry }}/{{ .Values.openmatch.image.backend.name}}:{{ .Values.openmatch.image.tag }}"
|
||||
- name: {{ .Values.backend.hostName }}
|
||||
volumeMounts:
|
||||
{{- include "openmatch.volumemounts.configs" . | nindent 10 }}
|
||||
{{- include "openmatch.volumemounts.tls" . | nindent 10 }}
|
||||
{{- include "openmatch.volumemounts.withredis" . | nindent 10}}
|
||||
image: "{{ coalesce .Values.global.image.registry .Values.image.registry }}/{{ .Values.backend.image}}:{{ coalesce .Values.global.image.tag .Values.image.tag }}"
|
||||
ports:
|
||||
- name: grpc
|
||||
containerPort: {{ .Values.openmatch.backend.grpc.port }}
|
||||
containerPort: {{ .Values.backend.grpcPort }}
|
||||
- name: http
|
||||
containerPort: {{ .Values.openmatch.backend.http.port }}
|
||||
{{- include "kubernetes.probe" (dict "port" .Values.openmatch.backend.http.port "isHTTPS" .Values.openmatch.tls.enabled) | nindent 8 }}
|
||||
containerPort: {{ .Values.backend.httpPort }}
|
||||
{{- include "openmatch.container.common" . | nindent 8 }}
|
||||
{{- include "kubernetes.probe" (dict "port" .Values.backend.httpPort "isHTTPS" .Values.global.tls.enabled) | nindent 8 }}
|
||||
{{- end }}
|
||||
|
@ -1,74 +0,0 @@
|
||||
# Copyright 2019 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- if .Values.openmatch.demoevaluator.install }}
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: om-demoevaluator
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
spec:
|
||||
selector:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demoevaluator
|
||||
ports:
|
||||
- name: grpc
|
||||
protocol: TCP
|
||||
port: {{ .Values.openmatch.demoevaluator.grpc.port }}
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: {{ .Values.openmatch.demoevaluator.http.port }}
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: om-demoevaluator
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demoevaluator
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 4) }}
|
||||
spec:
|
||||
replicas: {{ .Values.openmatch.demoevaluator.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demoevaluator
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 6) }}
|
||||
template:
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
annotations:
|
||||
{{- include "prometheus.annotations" (dict "port" .Values.openmatch.demoevaluator.http.port "prometheus" .Values.openmatch.telemetry.prometheus) | nindent 8 }}
|
||||
labels:
|
||||
app: {{ template "openmatch.name" . }}
|
||||
component: demoevaluator
|
||||
{{- include "openmatch.chartmeta" (set . "indent" 8) }}
|
||||
spec:
|
||||
{{- include "openmatch.spec.common" . | nindent 6 }}
|
||||
containers:
|
||||
- name: om-demoevaluator
|
||||
{{- include "openmatch.container.common" . | nindent 8 }}
|
||||
{{- include "openmatch.container.withredis" . | nindent 8 }}
|
||||
image: "{{ .Values.openmatch.image.registry }}/{{ .Values.openmatch.image.demoevaluator.name}}:{{ .Values.openmatch.image.tag }}"
|
||||
ports:
|
||||
- name: grpc
|
||||
containerPort: {{ .Values.openmatch.demoevaluator.grpc.port }}
|
||||
- name: http
|
||||
containerPort: {{ .Values.openmatch.demoevaluator.http.port }}
|
||||
{{- include "kubernetes.probe" (dict "port" .Values.openmatch.demoevaluator.http.port "isHTTPS" .Values.openmatch.tls.enabled) | nindent 8 }}
|
||||
{{- end }}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user