Skip to content

Commit

Permalink
fix: fix local run (intro in #1556) (#1558)
Browse files Browse the repository at this point in the history
* fix: fix local run (intro in #1556)

* turn off loading kube conf on migration

* Merge branch 'development' into fixlocal

* fix the env var check

* fix: disable load kube config on cypress run

* Merge branch 'development' into fixlocal
  • Loading branch information
dionizh committed Jul 14, 2021
1 parent 17a0c72 commit 4a5fb9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aimmo_runner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def run(

if using_cypress:
settings.DEBUG = False
os.environ["RUNNING_TESTS"] = "True"
os.environ["LOAD_KUBE_CONFIG"] = "0"

os.environ["NODE_ENV"] = "development" if settings.DEBUG else "production"

build_frontend(using_cypress, capture_output)
Expand Down
5 changes: 5 additions & 0 deletions example_project/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import os
import sys

from kubernetes.config import load_kube_config

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example_project.settings")

Expand All @@ -11,4 +13,7 @@

logging.basicConfig()

if os.environ.get("LOAD_KUBE_CONFIG", "1") == "1":
load_kube_config(context="agones")

execute_from_command_line(sys.argv)

0 comments on commit 4a5fb9a

Please sign in to comment.