diff --git a/src/main/java/io/tealc/ClusterManager.java b/src/main/java/io/tealc/ClusterManager.java index bd51c8e..a6744ab 100644 --- a/src/main/java/io/tealc/ClusterManager.java +++ b/src/main/java/io/tealc/ClusterManager.java @@ -21,7 +21,6 @@ public static synchronized ClusterManager getInstance() { } Config config = new ConfigBuilder() - .withUsername(Environment.WORKER_01_USERNAME) .withOauthToken(Environment.WORKER_01_TOKEN) .withMasterUrl(Environment.WORKER_01_URL) .withDisableHostnameVerification(true) @@ -31,7 +30,6 @@ public static synchronized ClusterManager getInstance() { CLIENTS.put(EClusters.WORKER_01, new KubeClient(config, "default")); config = new ConfigBuilder() - .withUsername(Environment.WORKER_02_USERNAME) .withOauthToken(Environment.WORKER_02_TOKEN) .withMasterUrl(Environment.WORKER_02_URL) .withDisableHostnameVerification(true) @@ -41,7 +39,6 @@ public static synchronized ClusterManager getInstance() { CLIENTS.put(EClusters.WORKER_02, new KubeClient(config, "default")); config = new ConfigBuilder() - .withUsername(Environment.WORKER_03_USERNAME) .withOauthToken(Environment.WORKER_03_TOKEN) .withMasterUrl(Environment.WORKER_03_URL) .withDisableHostnameVerification(true) diff --git a/src/main/java/io/tealc/Environment.java b/src/main/java/io/tealc/Environment.java index 676bbd5..3666319 100644 --- a/src/main/java/io/tealc/Environment.java +++ b/src/main/java/io/tealc/Environment.java @@ -19,26 +19,20 @@ public class Environment { private static final Logger LOGGER = LoggerFactory.getLogger(Environment.class); private static final Map VALUES = new HashMap<>(); - public static final String WORKER_01_USERNAME_ENV = "WORKER_01_USERNAME"; public static final String WORKER_01_TOKEN_ENV = "WORKER_01_OCP_TOKEN"; public static final String WORKER_01_URL_ENV = "WORKER_01_URL"; - public static final String WORKER_02_USERNAME_ENV = "WORKER_02_USERNAME"; public static final String WORKER_02_TOKEN_ENV = "WORKER_02_OCP_TOKEN"; public static final String WORKER_02_URL_ENV = "WORKER_02_URL"; - public static final String WORKER_03_USERNAME_ENV = "WORKER_03_USERNAME"; public static final String WORKER_03_TOKEN_ENV = "WORKER_03_OCP_TOKEN"; public static final String WORKER_03_URL_ENV = "WORKER_03_URL"; /** * Set values */ - public static final String WORKER_01_USERNAME = getOrDefault(WORKER_01_USERNAME_ENV, null); public static final String WORKER_01_TOKEN = getOrDefault(WORKER_01_TOKEN_ENV, null); public static final String WORKER_01_URL = getOrDefault(WORKER_01_URL_ENV, null); - public static final String WORKER_02_USERNAME = getOrDefault(WORKER_02_USERNAME_ENV, null); public static final String WORKER_02_TOKEN = getOrDefault(WORKER_02_TOKEN_ENV, null); public static final String WORKER_02_URL = getOrDefault(WORKER_02_URL_ENV, null); - public static final String WORKER_03_USERNAME = getOrDefault(WORKER_03_USERNAME_ENV, null); public static final String WORKER_03_TOKEN = getOrDefault(WORKER_03_TOKEN_ENV, null); public static final String WORKER_03_URL = getOrDefault(WORKER_03_URL_ENV, null);