From a7cc61157812afbeecb6419abebe2ecefdd68c41 Mon Sep 17 00:00:00 2001 From: kemurayama <7068107+kemurayama@users.noreply.github.com> Date: Tue, 14 Jan 2025 10:51:28 +0900 Subject: [PATCH] Changed Makefile to use OM2 (#58) * Changed Makefile to use OM2 Reverted integration test * Longer timeout * Updated local minikube command --- .github/workflows/build-test.yaml | 14 +++--- Makefile | 48 +++++-------------- README.md | 4 +- .../helm/space-agon/templates/frontend.yaml | 2 +- install/helm/space-agon/values.yaml | 2 +- 5 files changed, 22 insertions(+), 48 deletions(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index e71d7f90..bd3075e0 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -39,9 +39,9 @@ jobs: strategy: matrix: k8s_version: - - "v1.26.11" - - "v1.27.8" - - "v1.28.4" + - "v1.30.0" + - "v1.31.0" + - "v1.32.0" runs-on: ubuntu-latest steps: - name: Pull repo @@ -70,7 +70,7 @@ jobs: run: make build-local - name: Install space-agon in minikube run: make install-local - # - name: Run integration-test - # run: | - # nohup minikube tunnel & - # make integration-test \ No newline at end of file + - name: Run integration-test + run: | + nohup minikube tunnel & + make integration-test \ No newline at end of file diff --git a/Makefile b/Makefile index a9285949..1b9c9cd0 100644 --- a/Makefile +++ b/Makefile @@ -142,13 +142,11 @@ gcloud-test-cluster: .PHONY: helm-repo-add helm-repo-add: helm repo add $(AGONES_NS) https://agones.dev/chart/stable - helm repo add $(OM_NS) https://open-match.dev/chart/stable helm repo update .PHONY: helm-repo-remove helm-repo-remove: helm repo remove $(AGONES_NS) - helm repo remove $(OM_NS) # install agones in local-cluster .PHONY: agones-install-local @@ -177,48 +175,20 @@ agones-uninstall: # install open-match in local-cluster .PHONY: openmatch-install-local openmatch-install-local: - helm install $(OM_NS) \ - --create-namespace --namespace $(OM_NS) $(OM_NS)/open-match \ - --version $(OM_VER) \ - --set open-match-customize.enabled=true \ - --set open-match-customize.evaluator.enabled=true \ - --set open-match-customize.evaluator.replicas=1 \ - --set open-match-override.enabled=true \ - --set open-match-core.swaggerui.enabled=false \ - --set global.kubernetes.horizontalPodAutoScaler.frontend.maxReplicas=1 \ - --set global.kubernetes.horizontalPodAutoScaler.backend.maxReplicas=1 \ - --set global.kubernetes.horizontalPodAutoScaler.query.minReplicas=1 \ - --set global.kubernetes.horizontalPodAutoScaler.query.maxReplicas=1 \ - --set global.kubernetes.horizontalPodAutoScaler.evaluator.maxReplicas=1 \ - --set query.replicas=1 \ - --set frontend.replicas=1 \ - --set backend.replicas=1 \ - --set redis.master.resources.requests.cpu=0.1 \ - --set redis.replica.replicaCount=0 \ - --set redis.metrics.enabled=false + kubectl apply -f redis-config.yaml + kubectl apply -f om_install.yaml # install open-match .PHONY: openmatch-install openmatch-install: - helm install ${OM_NS} --create-namespace --namespace \ - ${OM_NS} $(OM_NS)/open-match \ - --version ${OM_VER} \ - --set open-match-customize.enabled=true \ - --set open-match-customize.evaluator.enabled=true \ - --set open-match-customize.evaluator.replicas=1 \ - --set open-match-override.enabled=true \ - --set open-match-core.swaggerui.enabled=false \ - --set redis.sentinel.enabled=false \ - --set redis.master.resources.requests.cpu=0.1 \ - --set redis.master.persistence.enabled=false \ - --set redis.replica.replicaCount=0 \ - --set redis.metrics.enabled=false + kubectl apply -f redis-config.yaml + kubectl apply -f om_install.yaml # uninstall open-match .PHONY: openmatch-uninstall openmatch-uninstall: - helm uninstall -n ${OM_NS} ${OM_NS} - kubectl delete namespace ${OM_NS} + kubectl delete -f redis-config.yaml + kubectl delete -f om_install.yaml .PHONY: skaffold-setup-local skaffold-setup-local: @@ -289,6 +259,10 @@ install-local: --set dedicated.autoscaler.buffer.bufferSize=1 \ --set dedicated.autoscaler.buffer.minReplicas=0 \ --set dedicated.autoscaler.buffer.maxReplicas=1 \ + --set frontend.imagePullPolicy=Never \ + --set mmf.imagePullPolicy=Never \ + --set director.imagePullPolicy=Never \ + --set dedicated.imagePullPolicy=Never \ ./install/helm/space-agon # uninstall space-agon itself @@ -309,4 +283,4 @@ test: # integration test .PHONY: integration-test integration-test: - go test -count=1 -v -timeout 60s test/integration_test.go + go test -count=1 -v -timeout 120s test/integration_test.go diff --git a/README.md b/README.md index 91f58b15..fb2af2e1 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ make openmatch-install # Start minikube # ref: https://minikube.sigs.k8s.io/docs/commands/start/ # Or you can other dirvers -minikube start --cpus="2" --memory="4096" --kubernetes-version=v1.25.15 --driver=hyperkit +minikube start --cpus="2" --memory="4096" --kubernetes-version=v1.31.0 --driver=hyperkit # Add Helm Repositories make helm-repo-add @@ -119,7 +119,7 @@ make install make build-local # Deploy Space Agon for minikube cluster -make install +make install-local ``` ## View and Play diff --git a/install/helm/space-agon/templates/frontend.yaml b/install/helm/space-agon/templates/frontend.yaml index 23790ae0..47bee8fb 100644 --- a/install/helm/space-agon/templates/frontend.yaml +++ b/install/helm/space-agon/templates/frontend.yaml @@ -40,7 +40,7 @@ spec: containers: - name: {{ template "frontend.name" .}} image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag }}" - imagePullPolicy: {{ .Values.frontend.image.imagePullPolicy }} + imagePullPolicy: {{ .Values.frontend.imagePullPolicy }} ports: - containerPort: {{ .Values.frontend.containerPort }} env: diff --git a/install/helm/space-agon/values.yaml b/install/helm/space-agon/values.yaml index 5a567dcc..6b398926 100644 --- a/install/helm/space-agon/values.yaml +++ b/install/helm/space-agon/values.yaml @@ -21,7 +21,7 @@ frontend: image: repository: local/space-agon-frontend tag: TAG - imagePullPolicy: Always + imagePullPolicy: Always omCoreAddress: "http://open-match-service.default.svc.cluster.local:50504" mmf: