use of io.fabric8.maven.plugin.converter.NamespaceOpenShiftConverter in project fabric8-maven-plugin by fabric8io.
the class ResourceMojo method lateInit.
private void lateInit() throws MojoExecutionException {
if (goalFinder.runningWithGoal(project, session, "fabric8:watch") || goalFinder.runningWithGoal(project, session, "fabric8:watch")) {
Properties properties = project.getProperties();
properties.setProperty("fabric8.watch", "true");
}
platformMode = clusterAccess.resolvePlatformMode(mode, log);
log.info("Running in [[B]]%s[[B]] mode", platformMode.getLabel());
if (isOpenShiftMode()) {
Properties properties = project.getProperties();
if (!properties.contains(DOCKER_IMAGE_USER)) {
String namespace = clusterAccess.getNamespace();
log.info("Using docker image name of namespace: " + namespace);
properties.setProperty(DOCKER_IMAGE_USER, namespace);
}
if (!properties.contains(PlatformMode.FABRIC8_EFFECTIVE_PLATFORM_MODE)) {
properties.setProperty(PlatformMode.FABRIC8_EFFECTIVE_PLATFORM_MODE, platformMode.toString());
}
}
openShiftConverters = new HashMap<>();
openShiftConverters.put("ReplicaSet", new ReplicSetOpenShiftConverter());
openShiftConverters.put("Deployment", new DeploymentOpenShiftConverter(platformMode, getOpenshiftDeployTimeoutSeconds()));
// TODO : This converter shouldn't be here. See its javadoc.
openShiftConverters.put("DeploymentConfig", new DeploymentConfigOpenShiftConverter(getOpenshiftDeployTimeoutSeconds()));
openShiftConverters.put("Namespace", new NamespaceOpenShiftConverter());
handlerHub = new HandlerHub(project);
}
Aggregations