diff --git a/core/src/main/java/org/arquillian/cube/impl/util/SystemEnvironmentVariables.java b/core/src/main/java/org/arquillian/cube/impl/util/SystemEnvironmentVariables.java index 5223fc212..b1be933f9 100644 --- a/core/src/main/java/org/arquillian/cube/impl/util/SystemEnvironmentVariables.java +++ b/core/src/main/java/org/arquillian/cube/impl/util/SystemEnvironmentVariables.java @@ -56,17 +56,17 @@ public static String getPropertyOrEnvironmentVariable(String property) { } public static boolean getPropertyOrEnvironmentVariable(String property, boolean defaultValue) { - String result = getPropertyOrEnvironmentVariable(property, new Boolean(defaultValue).toString()); + String result = getPropertyOrEnvironmentVariable(property, Boolean.toString(defaultValue)); return Boolean.parseBoolean(result); } public static int getPropertyOrEnvironmentVariable(String property, int defaultValue) { - String result = getPropertyOrEnvironmentVariable(property, new Integer(defaultValue).toString()); + String result = getPropertyOrEnvironmentVariable(property, Integer.toString(defaultValue)); return Integer.parseInt(result); } public static long getPropertyOrEnvironmentVariable(String property, long defaultValue) { - String result = getPropertyOrEnvironmentVariable(property, new Long(defaultValue).toString()); + String result = getPropertyOrEnvironmentVariable(property, Long.toString(defaultValue)); return Long.parseLong(result); } diff --git a/docs/kubernetes.adoc b/docs/kubernetes.adoc index a3a81f08f..91ac24942 100644 --- a/docs/kubernetes.adoc +++ b/docs/kubernetes.adoc @@ -74,7 +74,12 @@ You can configure Kubernetes by using any of the next configuration properties i |=== | Options | Type | Env | Description | kubernetes.master | URL | Any | The URL to the Kubernetes master -| kubernetes.domain | String | OSE | Domain to use for creating routes for services +| name | String | Any | Username to log in server +| password | String | Any | Password to log in server +| authToken | String | Any | Bearer token for authentication to the API server +| apiVersion | String(v1) | Any | Version for API server +| trustCerts | Boolean(true) | Any | Boolean to trust Certificate +| kubernetes.domain | String | OSE | Domain to use for creating routes for services | docker.registry | String | Any | The docker registry | namespace.use.current | Boolean (false)| Any | Don't generate a testing namespace use the current instead | namespace.use.existing | String | Any | Don't generate a testing namespace use the specified one instead diff --git a/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/api/Configuration.java b/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/api/Configuration.java index 95afdb0a8..9e6bc43a4 100644 --- a/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/api/Configuration.java +++ b/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/api/Configuration.java @@ -54,6 +54,12 @@ public interface Configuration { String LOGS_COPY = "logs.copy"; String LOGS_PATH = "logs.path"; + String USERNAME = "name"; + String PASSWORD = "password"; + String AUTH_TOKEN = "authToken"; + String API_VERSION = "apiVersion"; + String TRUST_CERTS = "trustCerts"; + Long DEFAULT_WAIT_TIMEOUT = 5 * 60 * 1000L; Long DEFAULT_WAIT_POLL_INTERVAL = 5 * 1000L; @@ -80,6 +86,16 @@ public interface Configuration { String getNamespace(); + String getUsername(); + + String getPassword(); + + String getApiVersion(); + + String getToken(); + + boolean isTrustCerts(); + boolean isNamespaceLazyCreateEnabled(); boolean isNamespaceCleanupEnabled(); diff --git a/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/ClientCreator.java b/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/ClientCreator.java index 193c90170..4909a5ee7 100644 --- a/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/ClientCreator.java +++ b/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/ClientCreator.java @@ -15,9 +15,11 @@ */ package org.arquillian.cube.kubernetes.impl; +import io.fabric8.kubernetes.api.builder.v3_1.TypedVisitor; import io.fabric8.kubernetes.clnt.v3_1.ConfigBuilder; import io.fabric8.kubernetes.clnt.v3_1.DefaultKubernetesClient; import io.fabric8.kubernetes.clnt.v3_1.KubernetesClient; +import org.arquillian.cube.impl.util.Strings; import org.arquillian.cube.kubernetes.api.Configuration; import org.jboss.arquillian.core.api.InstanceProducer; import org.jboss.arquillian.core.api.annotation.ApplicationScoped; @@ -34,15 +36,34 @@ public class ClientCreator { private InstanceProducer producer; public void createClient(@Observes Configuration config) { - if (config.getMasterUrl() != null) { + + if (config.getMasterUrl() == null) { producer.set(new DefaultKubernetesClient(new ConfigBuilder() - .withMasterUrl(config.getMasterUrl().toString()) .withNamespace(config.getNamespace()) .build())); } else { - producer.set(new DefaultKubernetesClient(new ConfigBuilder() + final ConfigBuilder configBuilder = new ConfigBuilder() + .withMasterUrl(config.getMasterUrl().toString()) .withNamespace(config.getNamespace()) - .build())); + .withApiVersion(config.getApiVersion()) + .withTrustCerts(config.isTrustCerts()) + .accept(new TypedVisitor() { + @Override + public void visit(ConfigBuilder b) { + b.withNoProxy(b.getNoProxy() == null ? new String[0] : b.getNoProxy()); + } + }); + + if (Strings.isNotNullOrEmpty(config.getToken())) { + configBuilder.withOauthToken(config.getToken()); + } + + if (Strings.isNotNullOrEmpty(config.getUsername()) && Strings.isNotNullOrEmpty(config.getPassword())) { + configBuilder.withUsername(config.getUsername()); + configBuilder.withPassword(config.getPassword()); + } + + producer.set(new DefaultKubernetesClient(configBuilder.build())); } } } diff --git a/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/DefaultConfiguration.java b/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/DefaultConfiguration.java index c3dfcfb51..666d8aa3d 100644 --- a/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/DefaultConfiguration.java +++ b/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/DefaultConfiguration.java @@ -3,7 +3,6 @@ import io.fabric8.kubernetes.clnt.v3_1.ConfigBuilder; import io.fabric8.kubernetes.clnt.v3_1.utils.Utils; import io.sundr.builder.annotations.Buildable; - import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; @@ -16,9 +15,7 @@ import java.util.Map; import java.util.Properties; import java.util.UUID; -import java.util.regex.Matcher; import java.util.regex.Pattern; - import org.arquillian.cube.impl.util.Strings; import org.arquillian.cube.impl.util.SystemEnvironmentVariables; import org.arquillian.cube.kubernetes.api.Configuration; @@ -35,7 +32,7 @@ public class DefaultConfiguration implements Configuration { private static final String ENV_VAR_REGEX = "env.([a-zA-Z0-9_]+)"; private static final Pattern ENV_VAR_PATTERN = Pattern.compile(ENV_VAR_REGEX); - public static final String ROOT = "/"; + private static final String ROOT = "/"; private final String sessionId; private final String namespace; @@ -68,6 +65,12 @@ public class DefaultConfiguration implements Configuration { private final String logPath; private final String kubernetesDomain; private final String dockerRegistry; + private final String username; + private final String password; + private final String apiVersion; + private final boolean trustCerts; + + private String token; public DefaultConfiguration(String sessionId, URL masterUrl, String namespace, Map scriptEnvironmentVariables, URL environmentSetupScriptUrl, URL environmentTeardownScriptUrl, URL environmentConfigUrl, List environmentDependencies, @@ -75,7 +78,8 @@ public DefaultConfiguration(String sessionId, URL masterUrl, String namespace, M boolean namespaceCleanupConfirmationEnabled, boolean namespaceDestroyEnabled, boolean namespaceDestroyConfirmationEnabled, long namespaceDestroyTimeout, boolean waitEnabled, long waitTimeout, long waitPollInterval, List waitForServiceList, boolean ansiLoggerEnabled, boolean environmentInitEnabled, boolean logCopyEnabled, - String logPath, String kubernetesDomain, String dockerRegistry) { + String logPath, String kubernetesDomain, String dockerRegistry, String token, String username, String password, + String apiVersion, boolean trustCerts) { this.masterUrl = masterUrl; this.scriptEnvironmentVariables = scriptEnvironmentVariables; this.environmentSetupScriptUrl = environmentSetupScriptUrl; @@ -101,6 +105,11 @@ public DefaultConfiguration(String sessionId, URL masterUrl, String namespace, M this.logPath = logPath; this.kubernetesDomain = kubernetesDomain; this.dockerRegistry = dockerRegistry; + this.token = token; + this.username = username; + this.password = password; + this.apiVersion = apiVersion; + this.trustCerts = trustCerts; } public static DefaultConfiguration fromMap(Map map) { @@ -155,6 +164,11 @@ public static DefaultConfiguration fromMap(Map map) { .withAnsiLoggerEnabled(getBooleanProperty(ANSI_LOGGER_ENABLED, map, true)) .withKubernetesDomain(getStringProperty(DOMAIN, KUBERNETES_DOMAIN, map, null)) .withDockerRegistry(getDockerRegistry(map)) + .withToken(getStringProperty(AUTH_TOKEN, map, null)) + .withUsername(getStringProperty(USERNAME, map, null)) + .withPassword(getStringProperty(PASSWORD, map, null)) + .withApiVersion(getStringProperty(API_VERSION, map, "v1")) + .withTrustCerts(getBooleanProperty(TRUST_CERTS, map, true)) .build(); } catch (Throwable t) { if (t instanceof RuntimeException) { @@ -402,4 +416,35 @@ public String getKubernetesDomain() { public String getDockerRegistry() { return dockerRegistry; } + + public boolean hasBasicAuth() { + return Strings.isNotNullOrEmpty(username) && Strings.isNotNullOrEmpty(password); + } + + public String getUsername() { + return username; + } + + public String getPassword() { + return password; + } + + @Override + public String getApiVersion() { + return apiVersion; + } + + @Override + public String getToken() { + return token; + } + + @Override + public boolean isTrustCerts() { + return trustCerts; + } + + protected void setToken(String token) { + this.token = token; + } } diff --git a/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/DefaultConfigurationFactory.java b/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/DefaultConfigurationFactory.java index 638ade77d..2359d04c5 100644 --- a/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/DefaultConfigurationFactory.java +++ b/kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/DefaultConfigurationFactory.java @@ -33,7 +33,7 @@ protected static void configureProtocolHandlers(Map conf) { Set handlers = new LinkedHashSet<>(); handlers.addAll(Strings.splitAndTrimAsList(System.getProperty(JAVA_PROTOCOL_HANDLER, ""), " ")); handlers.addAll(Strings.splitAndTrimAsList( - conf.containsKey(PROTOCOL_HANDLERS) ? conf.get(PROTOCOL_HANDLERS) : DEFAULT_MAVEN_PROTOCOL_HANDLER, " ")); + conf.getOrDefault(PROTOCOL_HANDLERS, DEFAULT_MAVEN_PROTOCOL_HANDLER), " ")); System.setProperty(JAVA_PROTOCOL_HANDLER, Strings.join(handlers, " ")); } diff --git a/openshift/ftest-standalone/src/test/java/org/arquillian/cube/openshift/standalone/HelloWorldIT.java b/openshift/ftest-standalone/src/test/java/org/arquillian/cube/openshift/standalone/HelloWorldIT.java index 8cf003da8..ed3d35a8e 100644 --- a/openshift/ftest-standalone/src/test/java/org/arquillian/cube/openshift/standalone/HelloWorldIT.java +++ b/openshift/ftest-standalone/src/test/java/org/arquillian/cube/openshift/standalone/HelloWorldIT.java @@ -26,15 +26,15 @@ public class HelloWorldIT { @Named("hello-openshift-service") @PortForward @ArquillianResource - Service service; + private Service service; @Named("hello-openshift-service") @PortForward @ArquillianResource - URL url; + private URL url; @ArquillianResource - OpenShiftClient client; + private OpenShiftClient client; @Test public void client_should_not_be_null() throws IOException { diff --git a/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/CubeOpenShiftConfiguration.java b/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/CubeOpenShiftConfiguration.java index 813d40541..e00f6df73 100644 --- a/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/CubeOpenShiftConfiguration.java +++ b/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/CubeOpenShiftConfiguration.java @@ -21,7 +21,6 @@ import static org.arquillian.cube.impl.util.ConfigUtil.getIntProperty; import static org.arquillian.cube.impl.util.ConfigUtil.getLongProperty; import static org.arquillian.cube.impl.util.ConfigUtil.getStringProperty; -import static org.arquillian.cube.openshift.impl.utils.Strings.isNotNullOrEmpty; import static org.arquillian.cube.openshift.impl.utils.Strings.isNullOrEmpty; @Buildable(builderPackage = "io.fabric8.kubernetes.api.builder.v3_1", generateBuilderPackage = false, editableEnabled = false, refs = { @@ -46,16 +45,11 @@ public class CubeOpenShiftConfiguration extends DefaultConfiguration implements private static final String ROUTER_HOST = "routerHost"; private static final String OPENSHIFT_ROUTER_HTTP_PORT = "openshiftRouterHttpPort"; private static final String OPENSHIFT_ROUTER_HTTPS_PORT = "openshiftRouterHttpsPort"; - private static final String AUTH_TOKEN = "authToken"; private static final String ROUTER_SNI_PORT = "routerSniPort"; private static final String TEMPLATE_URL = "templateUrl"; private static final String TEMPLATE_LABELS = "templateLabels"; private static final String TEMPLATE_PARAMETERS = "templateParameters"; private static final String TEMPLATE_PROCESS = "templateProcess"; - private static final String USERNAME = "username"; - private static final String PASSWORD = "password"; - private static final String API_VERSION = "apiVersion"; - private static final String TRUST_CERTS = "trustCerts"; private static final String STARTUP_TIMEOUT = "stratupTimeout"; private static final String HTTP_CLIENT_TIMEOUT = "httpClientTimeout"; @@ -70,16 +64,11 @@ public class CubeOpenShiftConfiguration extends DefaultConfiguration implements private final int openshiftRouterHttpPort; private final int openshiftRouterHttpsPort; private final boolean enableImageStreamDetection; - private String token; private final int routerSniPort; private final String templateURL; private final String templateLabels; private final String templateParameters; private final boolean templateProcess; - private final String username; - private final String password; - private final String apiVersion; - private final boolean trustCerts; private final long startupTimeout; private final long httpClientTimeout; @@ -101,7 +90,7 @@ public CubeOpenShiftConfiguration(String sessionId, URL masterUrl, String namesp environmentConfigUrl, environmentDependencies, namespaceLazyCreateEnabled, namespaceCleanupEnabled, namespaceCleanupTimeout, namespaceCleanupConfirmationEnabled, namespaceDestroyEnabled, namespaceDestroyConfirmationEnabled, namespaceDestroyTimeout, waitEnabled, waitTimeout, waitPollInterval, - waitForServiceList, ansiLoggerEnabled, environmentInitEnabled, logCopyEnabled, logPath, kubernetesDomain, dockerRegistry); + waitForServiceList, ansiLoggerEnabled, environmentInitEnabled, logCopyEnabled, logPath, kubernetesDomain, dockerRegistry, token, username, password, apiVersion, trustCerts); this.keepAliveGitServer = keepAliveGitServer; this.definitions = definitions; this.definitionsFile = definitionsFile; @@ -112,16 +101,11 @@ public CubeOpenShiftConfiguration(String sessionId, URL masterUrl, String namesp this.openshiftRouterHttpPort = openshiftRouterHttpPort; this.openshiftRouterHttpsPort = openshiftRouterHttpsPort; this.enableImageStreamDetection = enableImageStreamDetection; - this.token = token; this.routerSniPort = routerSniPort; this.templateLabels = templateLabels; this.templateParameters = templateParameters; this.templateURL = templateURL; this.templateProcess = templateProcess; - this.username = username; - this.password = password; - this.apiVersion = apiVersion; - this.trustCerts = trustCerts; this.startupTimeout = startupTimeout; this.httpClientTimeout = httpClientTimeout; } @@ -204,8 +188,8 @@ public static CubeOpenShiftConfiguration fromMap(Map map) { .withTemplateLabels(getStringProperty(TEMPLATE_LABELS, "openshift.template.labels", map, null)) .withTemplateParameters(getStringProperty(TEMPLATE_PARAMETERS, "openshift.template.parameters", map, null)) .withTemplateProcess(getBooleanProperty(TEMPLATE_PROCESS, "openshift.template.process", map, true)) - .withUsername(getStringProperty(USERNAME, "openshift.username", map, "guest")) - .withPassword(getStringProperty(PASSWORD, "openshift.password", map, "guest")) + .withUsername(getStringProperty(USERNAME, "openshift.username", map, null)) + .withPassword(getStringProperty(PASSWORD, "openshift.password", map, null)) .withApiVersion(getStringProperty(API_VERSION, "kubernetes.api.version", map, "v1")) .withTrustCerts(getBooleanProperty(TRUST_CERTS, "kubernetes.trust.certs", map, true)) .withStartupTimeout(getLongProperty(STARTUP_TIMEOUT, "arquillian.startup.timeout", map, 600L)) @@ -285,11 +269,12 @@ public int getRouterSniPort() { @Override public String getToken() { - if ((token == null || token.isEmpty()) && (client != null)) { - token = client.getClientExt().getConfiguration().getOauthToken(); + if ((super.getToken() == null || super.getToken().isEmpty()) && (client != null)) { + String token = client.getClientExt().getConfiguration().getOauthToken(); + setToken(token); } - return token; + return super.getToken(); } public Properties getProperties() { @@ -298,7 +283,7 @@ public Properties getProperties() { return properties; } - protected void apply(Properties properties) { + private void apply(Properties properties) { // namespace properties.put("kubernetes.namespace", this.getNamespace()); properties.put("namespace", this.getNamespace()); @@ -307,16 +292,6 @@ protected void apply(Properties properties) { properties.put("kubernetes.api.version", getApiVersion()); } - public void validate() { - - if (isNullOrEmpty(this.getMasterUrl().toString())) - throw new IllegalArgumentException("NULL master URL"); - - if ((isNullOrEmpty(username) || isNullOrEmpty(password)) && isNullOrEmpty(token)) { - throw new IllegalArgumentException("Missing OpenShift authentification -- username/password or token!"); - } - } - public String getTemplateURL() { return templateURL; } @@ -349,22 +324,6 @@ public String getKubernetesMaster() { return this.getMasterUrl().toString(); } - public boolean hasOpenshiftBasicAuth() { - return isNotNullOrEmpty(username) && isNotNullOrEmpty(password); - } - - public String getUsername() { - return username; - } - - public String getPassword() { - return password; - } - - public boolean isTrustCerts() { - return trustCerts; - } - public long getStartupTimeout() { return startupTimeout; } @@ -376,8 +335,4 @@ public long getHttpClientTimeout() { public OpenShiftClient getClient() { return client; } - - public String getApiVersion() { - return apiVersion; - } } diff --git a/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/CubeOpenShiftConfigurationFactory.java b/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/CubeOpenShiftConfigurationFactory.java index 49cd75df3..ac32d24ae 100644 --- a/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/CubeOpenShiftConfigurationFactory.java +++ b/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/CubeOpenShiftConfigurationFactory.java @@ -32,8 +32,6 @@ public CubeOpenShiftConfiguration create(ArquillianDescriptor arquillian) { config.putAll(arquillian.extension(OPENSHIFT_EXTENSION_NAME).getExtensionProperties()); configureProtocolHandlers(config); - final CubeOpenShiftConfiguration cubeOpenShiftConfiguration = CubeOpenShiftConfiguration.fromMap(config); - cubeOpenShiftConfiguration.validate(); - return cubeOpenShiftConfiguration; + return CubeOpenShiftConfiguration.fromMap(config); } } diff --git a/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/OpenShiftClientCreator.java b/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/OpenShiftClientCreator.java index bb74fa9fa..ad06d9e00 100644 --- a/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/OpenShiftClientCreator.java +++ b/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/client/OpenShiftClientCreator.java @@ -3,6 +3,7 @@ import io.fabric8.kubernetes.api.builder.v3_1.TypedVisitor; import io.fabric8.kubernetes.clnt.v3_1.Config; import io.fabric8.kubernetes.clnt.v3_1.ConfigBuilder; +import org.arquillian.cube.impl.util.Strings; import org.arquillian.cube.kubernetes.api.Configuration; import org.arquillian.cube.kubernetes.impl.event.AfterStart; import org.jboss.arquillian.core.api.InstanceProducer; @@ -24,26 +25,37 @@ public void createClient(@Observes AfterStart afterStart, Configuration conf) { CubeOpenShiftConfiguration configuration = (CubeOpenShiftConfiguration) conf; System.setProperty("KUBERNETES_TRUST_CERT", "true"); // override defaults for master and namespace - final Config config = new ConfigBuilder() + final ConfigBuilder configBuilder = new ConfigBuilder() .withMasterUrl(configuration.getMasterUrl().toString()) .withNamespace(configuration.getNamespace()) - .withTrustCerts(true) + .withApiVersion(configuration.getApiVersion()) + .withTrustCerts(configuration.isTrustCerts()) .accept(new TypedVisitor() { @Override public void visit(ConfigBuilder b) { b.withNoProxy(b.getNoProxy() == null ? new String[0] : b.getNoProxy()); } - }).build(); + }); + + if (Strings.isNotNullOrEmpty(configuration.getToken())) { + configBuilder.withOauthToken(configuration.getToken()); + } + + if (Strings.isNotNullOrEmpty(configuration.getUsername()) && Strings.isNotNullOrEmpty( + configuration.getPassword())) { + configBuilder.withUsername(configuration.getUsername()); + configBuilder.withPassword(configuration.getPassword()); + } openShiftClientProducer.set( - createClient(config, configuration.getNamespace(), configuration.shouldKeepAliveGitServer())); + createClient(configBuilder.build(), configuration.getNamespace(), configuration.shouldKeepAliveGitServer())); } public void clean(@Observes AfterSuite event, OpenShiftClient client) throws Exception { client.shutdown(); } - public OpenShiftClient createClient(Config openShiftConfig, String namespace, boolean keepAliveGitServer) { + private OpenShiftClient createClient(Config openShiftConfig, String namespace, boolean keepAliveGitServer) { return new OpenShiftClient(openShiftConfig, namespace, keepAliveGitServer); } } diff --git a/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/fabric8/F8OpenShiftAdapter.java b/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/fabric8/F8OpenShiftAdapter.java index 68ac7c944..39f004de2 100644 --- a/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/fabric8/F8OpenShiftAdapter.java +++ b/openshift/openshift/src/main/java/org/arquillian/cube/openshift/impl/fabric8/F8OpenShiftAdapter.java @@ -112,7 +112,7 @@ static OpenShiftConfig toOpenShiftConfig(CubeOpenShiftConfiguration configuratio .withMasterUrl(configuration.getKubernetesMaster()) .withTrustCerts(configuration.isTrustCerts()); - if (configuration.hasOpenshiftBasicAuth()) { + if (configuration.hasBasicAuth()) { builder .withUsername(configuration.getUsername()) .withPassword(configuration.getPassword());