Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.8-rc1 #1587

Merged
merged 83 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
a818dc6
Release changes for v1.7.0-rc.1 (#1534)
mridulji Feb 11, 2023
212751d
tutorial target version to v1.7.0-rc.1 (#1535)
mridulji Feb 16, 2023
86d4f4e
Release changes for v1.7.0 (#1538)
mridulji Feb 18, 2023
772f72c
debug
joeholley Aug 1, 2023
0090471
Debian Bookworm
joeholley Aug 1, 2023
a6d9f6d
Split sync-deps target into sync & clean targets; remove GO111MODULE …
joeholley Aug 1, 2023
64ef936
splitting sync-deps step into clean & sync steps
joeholley Aug 1, 2023
5f5fdf0
splitting sync-deps step into clean & sync steps pt 2
joeholley Aug 1, 2023
cfdff6f
splitting sync-deps step into clean & sync steps pt 2
joeholley Aug 1, 2023
8a3c474
Re-enable sync deps
joeholley Aug 1, 2023
0a73b37
Re-enable sync deps take 2
joeholley Aug 1, 2023
0ef8e28
protobuf only target
joeholley Aug 1, 2023
41dda74
Add golang-protos make target step
joeholley Aug 1, 2023
3401e89
Add golang-protos make target step
joeholley Aug 1, 2023
56f43cf
re-add
joeholley Aug 1, 2023
351b456
typo
joeholley Aug 1, 2023
f2da171
re-enable terraform validate step
joeholley Aug 3, 2023
e525739
re-enable terraform validate step take 2
joeholley Aug 3, 2023
6b9805b
re-enable build asset step
joeholley Aug 3, 2023
1f00381
re-enable build binaries step
joeholley Aug 3, 2023
60f87de
re-enable golang tests step
joeholley Aug 3, 2023
b246621
temp cgo testing
joeholley Aug 3, 2023
e696197
re-adding cgo to racew testing
joeholley Aug 3, 2023
7803b81
Add gcc for CGO compliation
joeholley Aug 3, 2023
461d7df
Add gcc for CGO compliation
joeholley Aug 7, 2023
4436e7c
Revert "Add gcc for CGO compliation"
joeholley Aug 7, 2023
f097d71
Add gcc for CGO compliation
joeholley Aug 7, 2023
112175f
turn goproxy back on to see if it gets past the module download
joeholley Aug 7, 2023
2d6f1de
Remove references to old testing module location
joeholley Aug 8, 2023
bd6254c
allow parallel testing
joeholley Aug 8, 2023
b77d07d
turn off vet during test; it's run as part of the linting step
joeholley Aug 8, 2023
2031e97
mod downloading for tests
joeholley Aug 8, 2023
9af228a
re-enable building container and linting
joeholley Aug 8, 2023
3b2fc72
Protoc reqs update
joeholley Aug 8, 2023
5434b4f
disable flakey test
joeholley Aug 8, 2023
abefecf
reenabling deployment test
joeholley Aug 8, 2023
7231217
merge in some changes from the redis-helm-chart branch
joeholley Aug 8, 2023
dad86db
Add gke auth plugin install, standardize indent
joeholley Aug 10, 2023
cad60f4
reenable deployment config generation
joeholley Aug 10, 2023
33ae442
reenable e2e cluster test
joeholley Aug 10, 2023
48024c2
Add ability to enable verbose output to test step for debugging purpo…
joeholley Aug 10, 2023
0798fc1
Fix to pass MD lint
joeholley Aug 10, 2023
122a4e1
Speed up golang test step
joeholley Aug 10, 2023
08f3dd8
Re-enable final step to delete the e2e cluster
joeholley Aug 10, 2023
42712ac
latest version of protobuf
joeholley Aug 15, 2023
ea27c3d
whitespace fix
joeholley Aug 15, 2023
ecfdc95
gRPC gateway update
joeholley Aug 15, 2023
43b2c87
bump to newest stable version of golang (1.21)
joeholley Aug 16, 2023
0f20975
update to latest redis helm chart from bitnami
joeholley Aug 16, 2023
65a2d2d
changes to the configmap for standalone redis
joeholley Aug 16, 2023
af4d6ce
standalone redis using bitnami chart populates hostname based on gene…
joeholley Aug 16, 2023
3c7c0a7
remove unused imports
joeholley Aug 16, 2023
a5e789c
manual merge of pr/1585
joeholley Aug 16, 2023
0d90197
output per release
joeholley Aug 16, 2023
1073324
bucket path fix; protoc output to buckets
joeholley Aug 16, 2023
0965585
add swagger json output to artifacts
joeholley Aug 16, 2023
71338a3
New Helm patch version
joeholley Aug 16, 2023
1fe959d
remove PodSecurityPolicy and related k8s resources pr/1540 pr/1572
joeholley Aug 16, 2023
00d7f1b
Generate new swagger with updated protoc and latest swagger gen plugin
joeholley Aug 16, 2023
e540357
Latest versions of compiled protobufs using current version of protoc
joeholley Aug 16, 2023
3aac63d
add internal protobuf protoc output to cloud build artifacts that go …
joeholley Aug 16, 2023
808772e
testing different dirs in output bucket
joeholley Aug 16, 2023
6d55796
Revert "testing different dirs in output bucket"
joeholley Aug 16, 2023
60b51e8
wildcards for artifacts to put in output bucket
joeholley Aug 16, 2023
3716471
Latest golang module dependancies
joeholley Aug 16, 2023
3f726bd
commit internal protos compiled with latest version of protoc
joeholley Aug 16, 2023
be29c48
remove support for jaeger, as the golang module is deprecated
joeholley Aug 17, 2023
b823b74
tidy up modules
joeholley Aug 17, 2023
7f8cc74
more jaeger removal
joeholley Aug 17, 2023
9ac3f27
more jaeger removal
joeholley Aug 17, 2023
3806bd5
move out of /output folder in artifacts bucket
joeholley Aug 17, 2023
db6c979
fix leftovers from removing jaeger
joeholley Aug 17, 2023
74d84a2
manaual merge of 'Unlock redsync locks using context.Background()' pr…
joeholley Aug 17, 2023
78da2a6
Merge remote-tracking branch 'live/main' into release-1.8
joeholley Aug 21, 2023
00d7239
1.8 rc1
joeholley Aug 22, 2023
0569696
resolving reviewer comments from pr/1587
joeholley Aug 22, 2023
d8dc86c
Remove deprecated flag to protoc-gen-doc
joeholley Aug 22, 2023
2746786
Merge branch 'release-1.8' of https://github.com/joeholley/open-match…
joeholley Aug 22, 2023
255ea67
bump versions since build at beginning of branch creation
joeholley Aug 22, 2023
e92cf40
Verbose testing with longer timeout
joeholley Aug 22, 2023
b5a971e
resolve merge conflict from d8dc86cb0da70b674677e3006dec2aba0dd89f18
joeholley Aug 22, 2023
c36d500
master branch renamed to main
joeholley Aug 25, 2023
1e170bd
Update to the version of K8s used in final RC testing
joeholley Aug 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Dockerfile.base-build
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
# limitations under the License.

# When updating Go version, update Dockerfile.ci, Dockerfile.base-build, and go.mod
FROM golang:1.19.5
ENV GO111MODULE=on
FROM golang:1.21.0

WORKDIR /go/src/open-match.dev/open-match

Expand Down
80 changes: 48 additions & 32 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,65 @@
# 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 debian:bookworm

FROM debian
# set env vars
ARG DEBIAN_FRONTEND=noninteractive
ENV OPEN_MATCH_CI_MODE=1
ENV KUBECONFIG=$HOME/.kube/config
ENV GOPATH=/go
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH

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
RUN apt-get update -y \
&& apt-get install -y -qq --no-install-recommends \
apt-utils \
git \
make \
python3 \
virtualenv \
curl \
sudo \
unzip \
apt-transport-https \
ca-certificates \
curl \
software-properties-common \
gnupg2 \
libc6 \
build-essential
RUN mkdir -p /usr/share/keyrings/

# Docker
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
RUN sudo apt-key fingerprint 0EBFCD88
RUN sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
stretch \
stable"
RUN sudo apt-get update
RUN sudo apt-get install -y -qq docker-ce docker-ce-cli containerd.io
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" | tee -a /etc/apt/sources.list.d/docker.list \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpg \
&& apt-get update -y \
&& apt-get install -y -qq \
docker-ce \
docker-ce-cli \
containerd.io

# Cloud SDK
RUN export CLOUD_SDK_REPO="cloud-sdk-stretch" && \
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
apt-get update -y && apt-get install google-cloud-sdk google-cloud-sdk-app-engine-go -y -qq && \
sudo apt-get update -y && \
sudo apt-get install -y google-cloud-sdk-gke-gcloud-auth-plugin
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
&& apt-get update -y \
&& apt-get install -y -qq \
google-cloud-cli \
google-cloud-sdk-gke-gcloud-auth-plugin

# Install Golang
# https://github.com/docker-library/golang/blob/master/1.14/stretch/Dockerfile
RUN mkdir -p /toolchain/golang
WORKDIR /toolchain/golang
RUN sudo rm -rf /usr/local/go/
RUN rm -rf /usr/local/go/

# When updating Go version, update Dockerfile.ci, Dockerfile.base-build, and go.mod
RUN curl -L https://golang.org/dl/go1.19.5.linux-amd64.tar.gz | sudo tar -C /usr/local -xz

ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

RUN sudo mkdir -p "$GOPATH/src" "$GOPATH/bin" \
&& sudo chmod -R 777 "$GOPATH"

# Prepare toolchain and workspace
RUN mkdir -p /toolchain
# reference: https://github.com/docker-library/golang/blob/master/1.20/bookworm/Dockerfile
RUN curl -L https://golang.org/dl/go1.21.0.linux-amd64.tar.gz | tar -C /usr/local -xz
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" \
&& chmod -R 777 "$GOPATH"

# Prepare toolchain, workspace, homedir
RUN mkdir -p \
/toolchain \
/workspace \
$HOME/.kube/
WORKDIR /workspace
ENV OPEN_MATCH_CI_MODE=1
ENV KUBECONFIG=$HOME/.kube/config
RUN mkdir -p $HOME/.kube/
74 changes: 30 additions & 44 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,31 @@
# If you want information on how to edit this file checkout,
# http://makefiletutorial.com/

BASE_VERSION = 0.0.0-dev
BASE_VERSION = 1.7.0
SHORT_SHA = $(shell git rev-parse --short=7 HEAD | tr -d [:punct:])
BRANCH_NAME = $(shell git rev-parse --abbrev-ref HEAD | tr -d [:punct:])
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)
PROTOC_VERSION = 3.19.4
HELM_VERSION = 3.8.0
KUBECTL_VERSION = 1.21.5
PROTOC_VERSION = 24.0
HELM_VERSION = 3.12.3
KUBECTL_VERSION = 1.27.3
MINIKUBE_VERSION = latest
GOLANGCI_VERSION = 1.18.0
KIND_VERSION = 0.5.1
SWAGGERUI_VERSION = 3.24.2
GOOGLE_APIS_VERSION = aba342359b6743353195ca53f944fe71e6fb6cd4
GRPC_GATEWAY_VERSION = 2.3.0
GRPC_GATEWAY_VERSION = 2.16.2
TERRAFORM_VERSION = 0.12.13
CHART_TESTING_VERSION = 2.4.0

# A workaround to simplify Open Match development workflow
REDIS_DEV_PASSWORD = helloworld

ENABLE_SECURITY_HARDENING = 0
GO = GO111MODULE=on go
GO = go
# Defines the absolute local directory of the open-match project
REPOSITORY_ROOT := $(patsubst %/,%,$(dir $(abspath $(MAKEFILE_LIST))))
BUILD_DIR = $(REPOSITORY_ROOT)/build
Expand All @@ -100,11 +100,10 @@ GCP_ZONE = us-west1-a
GCP_LOCATION = $(GCP_ZONE)
EXE_EXTENSION =
GCP_LOCATION_FLAG = --zone $(GCP_ZONE)
GO111MODULE = on
GOLANG_TEST_COUNT = 1
GOLANG_EXTRA_TEST_FLAGS =
SWAGGERUI_PORT = 51500
PROMETHEUS_PORT = 9090
JAEGER_QUERY_PORT = 16686
GRAFANA_PORT = 3000
FRONTEND_PORT = 51504
BACKEND_PORT = 51505
Expand Down Expand Up @@ -190,8 +189,10 @@ else
endif

GOLANG_PROTOS = pkg/pb/backend.pb.go pkg/pb/frontend.pb.go pkg/pb/matchfunction.pb.go pkg/pb/query.pb.go pkg/pb/messages.pb.go pkg/pb/extensions.pb.go pkg/pb/evaluator.pb.go internal/ipb/synchronizer.pb.go internal/ipb/messages.pb.go pkg/pb/backend.pb.gw.go pkg/pb/frontend.pb.gw.go pkg/pb/matchfunction.pb.gw.go pkg/pb/query.pb.gw.go pkg/pb/evaluator.pb.gw.go
golang-protos: $(GOLANG_PROTOS)

SWAGGER_JSON_DOCS = api/frontend.swagger.json api/backend.swagger.json api/query.swagger.json api/matchfunction.swagger.json api/evaluator.swagger.json
swagger-json-docs: $(SWAGGER_JSON_DOCS)

ALL_PROTOS = $(GOLANG_PROTOS) $(SWAGGER_JSON_DOCS)

Expand Down Expand Up @@ -229,10 +230,10 @@ 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_BUILDKIT=1 docker build -f Dockerfile.base-build -t open-match-base-build -t $(REGISTRY)/openmatch-base-build:$(TAG) -t $(REGISTRY)/openmatch-base-build:$(ALTERNATE_TAG) .
docker build -f Dockerfile.base-build -t open-match-base-build -t $(REGISTRY)/openmatch-base-build:$(TAG) -t $(REGISTRY)/openmatch-base-build:$(ALTERNATE_TAG) .

$(foreach CMD,$(CMDS),build-$(CMD)-image): build-%-image: docker build-base-build-image
DOCKER_BUILDKIT=1 docker build \
docker build \
-f Dockerfile.cmd \
$(IMAGE_BUILD_ARGS) \
--build-arg=IMAGE_TITLE=$* \
Expand All @@ -241,10 +242,10 @@ $(foreach CMD,$(CMDS),build-$(CMD)-image): build-%-image: docker build-base-buil
.

build-mmf-go-soloduel-image: docker build-base-build-image
DOCKER_BUILDKIT=1 docker build -f examples/functions/golang/soloduel/Dockerfile -t $(REGISTRY)/openmatch-mmf-go-soloduel:$(TAG) -t $(REGISTRY)/openmatch-mmf-go-soloduel:$(ALTERNATE_TAG) .
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-backfill-image: docker build-base-build-image
DOCKER_BUILDKIT=1 docker build -f examples/functions/golang/backfill/Dockerfile -t $(REGISTRY)/openmatch-mmf-go-backfill:$(TAG) -t $(REGISTRY)/openmatch-mmf-go-backfill:$(ALTERNATE_TAG) .
docker build -f examples/functions/golang/backfill/Dockerfile -t $(REGISTRY)/openmatch-mmf-go-backfill:$(TAG) -t $(REGISTRY)/openmatch-mmf-go-backfill:$(ALTERNATE_TAG) .

#######################################
## # Builds and pushes images to your container registry.
Expand Down Expand Up @@ -293,7 +294,7 @@ $(foreach IMAGE,$(IMAGES),clean-$(IMAGE)-image): clean-%-image:

#####################################################################################################################
update-chart-deps: build/toolchain/bin/helm$(EXE_EXTENSION)
(cd $(REPOSITORY_ROOT)/install/helm/open-match; $(HELM) repo add incubator https://charts.helm.sh/incubator; $(HELM) repo add bitnami-full-index https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami;$(HELM) dependency update)
(cd $(REPOSITORY_ROOT)/install/helm/open-match; $(HELM) repo add incubator https://charts.helm.sh/incubator; $(HELM) repo add bitnami https://charts.bitnami.com/bitnami;$(HELM) dependency update)

lint-chart: build/toolchain/bin/helm$(EXE_EXTENSION) build/toolchain/bin/ct$(EXE_EXTENSION)
(cd $(REPOSITORY_ROOT)/install/helm; $(HELM) lint $(OPEN_MATCH_HELM_NAME))
Expand Down Expand Up @@ -339,7 +340,6 @@ install-large-chart: install-chart-prerequisite install-demo build/toolchain/bin
--set open-match-customize.enabled=true \
--set open-match-customize.evaluator.enabled=true \
--set global.telemetry.grafana.enabled=true \
--set global.telemetry.jaeger.enabled=true \
--set global.telemetry.prometheus.enabled=true

# install-chart will install open-match-core, open-match-demo, with the demo evaluator and mmf.
Expand All @@ -357,7 +357,6 @@ install-scale-chart: install-chart-prerequisite build/toolchain/bin/helm$(EXE_EX
--set open-match-customize.evaluator.enabled=true \
--set open-match-customize.function.image=openmatch-scale-mmf \
--set global.telemetry.grafana.enabled=true \
--set global.telemetry.jaeger.enabled=false \
--set global.telemetry.prometheus.enabled=true
$(HELM) template $(OPEN_MATCH_HELM_NAME)-scale install/helm/open-match $(HELM_TEMPLATE_FLAGS) $(HELM_IMAGE_FLAGS) -f install/helm/open-match/values-production.yaml \
--set open-match-core.enabled=false \
Expand Down Expand Up @@ -397,14 +396,11 @@ ifneq ($(BASE_VERSION), 0.0.0-dev)
install/yaml/: REGISTRY = gcr.io/$(OPEN_MATCH_PUBLIC_IMAGES_PROJECT_ID)
install/yaml/: TAG = $(BASE_VERSION)
endif
install/yaml/: update-chart-deps 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/06-open-match-override-configmap.yaml install/yaml/07-open-match-default-evaluator.yaml
install/yaml/: update-chart-deps 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/06-open-match-override-configmap.yaml install/yaml/07-open-match-default-evaluator.yaml

# We have to hard-code the Jaeger endpoints as we are excluding Jaeger, so Helm cannot determine the endpoints from the Jaeger subchart
install/yaml/01-open-match-core.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
mkdir -p install/yaml/
$(HELM) template $(OPEN_MATCH_HELM_NAME) $(HELM_TEMPLATE_FLAGS) $(HELM_IMAGE_FLAGS) \
--set-string global.telemetry.jaeger.agentEndpoint="$(OPEN_MATCH_HELM_NAME)-jaeger-agent:6831" \
--set-string global.telemetry.jaeger.collectorEndpoint="http://$(OPEN_MATCH_HELM_NAME)-jaeger-collector:14268/api/traces" \
install/helm/open-match > install/yaml/01-open-match-core.yaml

install/yaml/02-open-match-demo.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
Expand Down Expand Up @@ -433,15 +429,6 @@ install/yaml/04-grafana-chart.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
--set-string global.telemetry.grafana.prometheusServer="http://$(OPEN_MATCH_HELM_NAME)-prometheus-server.$(OPEN_MATCH_KUBERNETES_NAMESPACE).svc.cluster.local:80/" \
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 $(OPEN_MATCH_HELM_NAME) $(HELM_TEMPLATE_FLAGS) $(HELM_IMAGE_FLAGS) \
--set open-match-core.enabled=false \
--set open-match-core.redis.enabled=false \
--set open-match-telemetry.enabled=true \
--set global.telemetry.jaeger.enabled=true \
install/helm/open-match > install/yaml/05-jaeger-chart.yaml

install/yaml/06-open-match-override-configmap.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
mkdir -p install/yaml/
$(HELM) template $(OPEN_MATCH_HELM_NAME) $(HELM_TEMPLATE_FLAGS) $(HELM_IMAGE_FLAGS) \
Expand All @@ -466,7 +453,6 @@ install/yaml/install.yaml: build/toolchain/bin/helm$(EXE_EXTENSION)
--set open-match-customize.enabled=true \
--set open-match-customize.evaluator.enabled=true \
--set open-match-telemetry.enabled=true \
--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
Expand Down Expand Up @@ -640,22 +626,20 @@ delete-kind-cluster: build/toolchain/bin/kind$(EXE_EXTENSION) build/toolchain/bi
create-cluster-role-binding:
$(KUBECTL) create clusterrolebinding myname-cluster-admin-binding --clusterrole=cluster-admin --user=$(GCLOUD_ACCOUNT_EMAIL)

create-gke-cluster: GKE_VERSION = 1.25.5-gke.2000 # gcloud beta container get-server-config --zone us-west1-a
create-gke-cluster: GKE_CLUSTER_SHAPE_FLAGS = --machine-type n1-standard-8 --enable-autoscaling --min-nodes 1 --num-nodes 6 --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) $(GCP_PROJECT_FLAG) container clusters create $(GKE_CLUSTER_NAME) $(GCP_LOCATION_FLAG) $(GKE_CLUSTER_SHAPE_FLAGS) $(GKE_FUTURE_COMPAT_FLAGS) $(GKE_CLUSTER_FLAGS) \
--cluster-version $(GKE_VERSION) \
$(GCLOUD) $(GCP_PROJECT_FLAG) container clusters create $(GKE_CLUSTER_NAME) $(GCP_LOCATION_FLAG) $(GKE_CLUSTER_SHAPE_FLAGS) $(GKE_FUTURE_COMPAT_FLAGS) $(GKE_CLUSTER_FLAGS) \
--cluster-version 1.27.2-gke.2100 \
--image-type cos_containerd \
--tags open-match \
--workload-pool $(GCP_PROJECT_ID).svc.id.goog


delete-gke-cluster: gcloud
-$(GCLOUD) $(GCP_PROJECT_FLAG) container clusters delete $(GKE_CLUSTER_NAME) $(GCP_LOCATION_FLAG) $(GCLOUD_EXTRA_FLAGS)

create-mini-cluster: build/toolchain/bin/minikube$(EXE_EXTENSION)
$(MINIKUBE) start -p openmatch --memory 6144 --cpus 4 --disk-size 50g --kubernetes-version=v1.21.5
$(MINIKUBE) start -p openmatch --memory 6144 --cpus 4 --disk-size 50g --kubernetes-version=v1.27.3

delete-mini-cluster: build/toolchain/bin/minikube$(EXE_EXTENSION)
-$(MINIKUBE) delete -p openmatch
Expand Down Expand Up @@ -741,8 +725,10 @@ build: assets
define test_folder
$(if $(wildcard $(1)/go.mod), \
cd $(1) && \
$(GO) test -p 1 -cover -test.count $(GOLANG_TEST_COUNT) -race ./... && \
$(GO) test -p 1 -cover -test.count $(GOLANG_TEST_COUNT) -run IgnoreRace$$ ./... \
$(GO) mod tidy && \
$(GO) mod download -x && \
CGO_ENABLED=1 $(GO) test $(GOLANG_EXTRA_TEST_FLAGS) -p 1 -cover -test.count $(GOLANG_TEST_COUNT) -race -vet=off ./... && \
CGO_ENABLED=0 $(GO) test $(GOLANG_EXTRA_TEST_FLAGS) -p 1 -cover -test.count $(GOLANG_TEST_COUNT) -vet=off -run IgnoreRace$$ ./... \
)
$(foreach dir, $(wildcard $(1)/*/.), $(call test_folder, $(dir)))
endef
Expand Down Expand Up @@ -778,7 +764,7 @@ vet:
$(GO) vet ./...

golangci: build/toolchain/bin/golangci-lint$(EXE_EXTENSION)
GO111MODULE=on $(GOLANGCI) run --config=$(REPOSITORY_ROOT)/.golangci.yaml
$(GOLANGCI) run --config=$(REPOSITORY_ROOT)/.golangci.yaml

## # Run linter on Go code, charts and terraform
## make lint
Expand Down Expand Up @@ -953,10 +939,6 @@ proxy-synchronizer: build/toolchain/bin/kubectl$(EXE_EXTENSION)
@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_HELM_NAME)" --output jsonpath='{.items[0].metadata.name}') $(SYNCHRONIZER_PORT):51506 $(PORT_FORWARD_ADDRESS_FLAG)

proxy-jaeger: build/toolchain/bin/kubectl$(EXE_EXTENSION)
@echo "Jaeger Query Frontend: http://localhost:16686"
$(KUBECTL) port-forward --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) $(shell $(KUBECTL) get pod --namespace $(OPEN_MATCH_KUBERNETES_NAMESPACE) --selector="app.kubernetes.io/name=jaeger,app.kubernetes.io/component=query" --output jsonpath='{.items[0].metadata.name}') $(JAEGER_QUERY_PORT):16686 $(PORT_FORWARD_ADDRESS_FLAG)

proxy-grafana: build/toolchain/bin/kubectl$(EXE_EXTENSION)
@echo "User: admin"
@echo "Password: openmatch"
Expand All @@ -978,7 +960,7 @@ proxy-demo: build/toolchain/bin/kubectl$(EXE_EXTENSION)

# Run `make proxy` instead to run everything at the same time.
# If you run this directly it will just run each proxy sequentially.
proxy-all: proxy-frontend proxy-backend proxy-query proxy-grafana proxy-prometheus proxy-jaeger proxy-synchronizer proxy-ui proxy-dashboard proxy-demo
proxy-all: proxy-frontend proxy-backend proxy-query proxy-grafana proxy-prometheus proxy-synchronizer proxy-ui proxy-dashboard proxy-demo

proxy:
# This is an exception case where we'll call recursive make.
Expand Down Expand Up @@ -1023,9 +1005,13 @@ third_party/swaggerui/:
$(SED_REPLACE) 's|0.0.0-dev|$(BASE_VERSION)|g' $(REPOSITORY_ROOT)/third_party/swaggerui/config.json
rm -rf $(TOOLCHAIN_DIR)/swaggerui-temp

sync-deps:

clean-deps:
$(GO) clean -modcache
$(GO) mod download

sync-deps: clean-deps
$(GO) mod tidy
$(GO) mod download -x

define tutorial_folder
$(if $(wildcard $(1)/go.mod), \
Expand Down
Loading