File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
k8s/timoni/codebattle/templates
apps/codebattle/lib/codebattle/code_check/executor Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ import (
4747 }, {
4848 name : " CODEBATTLE_VERSION "
4949 value : #config .image .codebattle .tag
50+ }, {
51+ name : " KUBERNETES_NAMESPACE "
52+ valueFrom : fieldRef : fieldPath : " metadata.namespace "
5053 }]
5154 }, {
5255 name : " nginx "
Original file line number Diff line number Diff line change @@ -100,5 +100,8 @@ defmodule Codebattle.CodeCheck.Executor.RemoteRust do
100100 end
101101
102102 # defp runner_url(_lang), do: "http://localhost:4002/run"
103- defp runner_url ( lang ) , do: "http://runner-#{ lang } .default.svc/run"
103+ defp runner_url ( lang ) do
104+ namespace = Application . get_env ( :codebattle , :k8s_namespace , "default" )
105+ "http://runner-#{ lang } .#{ namespace } .svc/run"
106+ end
104107end
Original file line number Diff line number Diff line change @@ -123,6 +123,8 @@ config :codebattle,
123123config :codebattle ,
124124 jitsi_api_key: System . get_env ( "JITSI_API_KEY" , "" )
125125
126+ config :codebattle , k8s_namespace: System . get_env ( "KUBERNETES_NAMESPACE" , "default" )
127+
126128config :runner , :runner_url , "http://localhost:4001"
127129config :runner , load_dot_env_file: true
128130config :runner , pull_docker_images: false
You can’t perform that action at this time.
0 commit comments