Compare commits

..

3 Commits

Author SHA1 Message Date
Lala, Shahd 0e253e1811 fix: accept error
Build & Test (NowChessSystems) TeamCity build failed
2026-05-05 22:26:51 +00:00
Lala, Shahd bc279562ba fix: NOT FOR MAIN OR MERGE: just for the frontend to work insdie the same container
Build & Test (NowChessSystems) TeamCity build failed
2026-05-03 10:57:51 +00:00
Janis 82d0b754be fix(coordinator): use genericKubernetesResources API for Argo Rollout scaling (#44)
Build & Test (NowChessSystems) TeamCity build failed
Reviewed-on: #44
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
2026-05-02 22:27:18 +02:00
5 changed files with 10 additions and 7 deletions
+3
View File
@@ -2,9 +2,12 @@ FROM mcr.microsoft.com/devcontainers/java:21-bookworm
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
postgresql-client \
redis-tools \
stockfish \
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /home/vscode/.gradle/wrapper/dists \
+3 -2
View File
@@ -2,12 +2,13 @@
"name": "NowChessSystems",
"dockerComposeFile": ["docker-compose.yml"],
"service": "workspace",
"workspaceFolder": "/workspaces/NowChessSystems",
"workspaceFolder": "/workspace/NowChessSystems",
"shutdownAction": "stopCompose",
"overrideCommand": false,
"remoteUser": "vscode",
"forwardPorts": [8080, 8081, 8082, 8083, 8084, 8085, 8086, 9086],
"forwardPorts": [4200, 8080, 8081, 8082, 8083, 8084, 8085, 8086, 9086],
"portsAttributes": {
"4200": {"label": "NowChess Frontend", "onAutoForward": "notify"},
"8080": {"label": "NowChess Core", "onAutoForward": "notify"},
"8081": {"label": "NowChess Io", "onAutoForward": "notify"},
"8082": {"label": "NowChess Rule", "onAutoForward": "notify"},
Submodule
+1
Submodule frontend added at eadcd770ba
@@ -34,13 +34,11 @@ class AutoScaler:
private val argoKind = "Rollout"
// scalafix:off DisableSyntax.asInstanceOf
// scalafix:off DisableSyntax.isInstanceOf
private def rolloutSpec(rollout: GenericKubernetesResource): Option[java.util.Map[String, AnyRef]] =
Option(rollout.get("spec")).collect {
case m if m.isInstanceOf[java.util.Map[?, ?]] => m.asInstanceOf[java.util.Map[String, AnyRef]]
Option(rollout.get[AnyRef]("spec")).collect {
case m: java.util.Map[?, ?] => m.asInstanceOf[java.util.Map[String, AnyRef]]
}
// scalafix:on DisableSyntax.asInstanceOf
// scalafix:on DisableSyntax.isInstanceOf
def checkAndScale: Unit =
if config.autoScaleEnabled then
@@ -23,5 +23,5 @@ class InternalAuthFilter extends ContainerRequestFilter:
override def filter(ctx: ContainerRequestContext): Unit =
if authEnabled then
val header = Option(ctx.getHeaderString("X-Internal-Secret"))
if header.isEmpty || header.get.equals(secret) then
if header.isEmpty || header.get != secret then
ctx.abortWith(Response.status(Response.Status.UNAUTHORIZED).build())