Skip to content

Commit 42b16f7

Browse files
authored
Merge pull request #2081 from hexlet-codebattle/bundle-env-fixes
fix codebattle env
2 parents ac26857 + 8efe86c commit 42b16f7

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

k8s/flux.cue

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,21 @@ bundle: {
6363
name: "gateway"
6464
namespace: "codebattle"
6565
}
66+
}, {
67+
patch: [{
68+
op: "add"
69+
path: "/spec/template/spec/containers/0/env/-"
70+
value: {
71+
name: "CODEBATTLE_HOSTNAME"
72+
value: _hostname
73+
}
74+
}]
75+
target: {
76+
group: "apps"
77+
kind: "Deployment"
78+
name: "codebattle"
79+
namespace: "codebattle"
80+
}
6681
}]
6782
}
6883
}

k8s/timoni/codebattle/templates/config.cue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ import (
7272
}
7373

7474
certManager: enable: *false | bool
75+
76+
rustExecutor: *false | bool
7577
}
7678

7779
// Instance takes the config values and outputs the Kubernetes objects.

k8s/timoni/codebattle/templates/deployment.cue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ import (
5050
}, {
5151
name: "KUBERNETES_NAMESPACE"
5252
valueFrom: fieldRef: fieldPath: "metadata.namespace"
53+
}, if #config.rustExecutor {
54+
name: "CODEBATTLE_EXECUTOR"
55+
value: "rust"
5356
}]
5457
}, {
5558
name: "nginx"

k8s/timoni/values.cue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ codebattleValues: {
44
gatewayName: "gateway"
55
}
66
certManager: enable: true
7+
rustExecutor: true
78
}

0 commit comments

Comments
 (0)