From f2313fb1fd119ea08f8da2b03bd9ed0a26cc58c8 Mon Sep 17 00:00:00 2001 From: foxikle Date: Thu, 20 Jun 2024 10:47:41 -0400 Subject: [PATCH] Kubernetes fixing --- .../java/net/cytonic/cytosis/Cytosis.java | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/cytonic/cytosis/Cytosis.java b/src/main/java/net/cytonic/cytosis/Cytosis.java index cb5b36f3..4e4db538 100644 --- a/src/main/java/net/cytonic/cytosis/Cytosis.java +++ b/src/main/java/net/cytonic/cytosis/Cytosis.java @@ -102,6 +102,13 @@ private Cytosis() { * @param args Runtime flags */ public static void main(String[] args) { + System.out.println("This is a test for gke1"); + System.out.println("This is a test for gke2"); + System.out.println("This is a test for gke3"); + System.out.println("This is a test for gke4"); + + + FLAGS = List.of(args); long start = System.currentTimeMillis(); // Initialize the server @@ -335,12 +342,16 @@ public static void completeNonEssentialTasks(long start) { Thread.ofVirtual().name("WorldLoader").start(Cytosis::loadWorld); - try { - Logger.info("Starting Containerized Instance Manager"); - containerizedInstanceManager = new ContainerizedInstanceManager(); - - } catch (Exception e) { - Logger.error("An error occurred whilst loading the kubernetes setup!", e); + if (FLAGS.contains("--skip-kubernetes") || FLAGS.contains("--skip-k8s")) { + Logger.warn("Skipping Kubernetes setup"); + CytosisSettings.KUBERNETES_SUPPORTED = false; + } else { + try { + Logger.info("Starting Containerized Instance Manager"); + containerizedInstanceManager = new ContainerizedInstanceManager(); + } catch (Exception e) { + Logger.error("An error occurred whilst loading the kubernetes setup!", e); + } } // Start the server @@ -350,6 +361,7 @@ public static void completeNonEssentialTasks(long start) { long end = System.currentTimeMillis(); Logger.info(STR."Server started in \{end - start}ms!"); Logger.info(STR."Server id = \{SERVER_ID}"); + System.out.println("This is a test for gke5"); if (FLAGS.contains("--ci-test")) { Logger.info("Stopping server due to '--ci-test' flag.");