Skip to content

Commit

Permalink
Remove unused username
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Stejskal <[email protected]>
  • Loading branch information
Frawless committed Nov 13, 2023
1 parent 54ce80a commit 540c606
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions src/main/java/io/tealc/ClusterManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/io/tealc/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,20 @@ public class Environment {
private static final Logger LOGGER = LoggerFactory.getLogger(Environment.class);
private static final Map<String, String> 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);

Expand Down

0 comments on commit 540c606

Please sign in to comment.