use of org.eclipse.jkube.kit.resource.helm.HelmService in project jkube by eclipse.
the class JKubeServiceHub method initClusterAccessAndLazyBuilders.
private void initClusterAccessAndLazyBuilders() {
if (!offline) {
if (clusterAccess == null) {
clusterAccess = new ClusterAccess(log, ClusterConfiguration.from(System.getProperties(), configuration.getProject().getProperties()).build());
}
this.client = clusterAccess.createDefaultClient();
}
buildServiceManager = new LazyBuilder<>(() -> new BuildServiceManager(this));
applyService = new LazyBuilder<>(() -> {
validateIfConnectedToCluster();
return new ApplyService(client, log);
});
portForwardService = new LazyBuilder<>(() -> {
validateIfConnectedToCluster();
return new PortForwardService(client, log);
});
debugService = new LazyBuilder<>(() -> {
validateIfConnectedToCluster();
return new DebugService(log, client, portForwardService.get(), applyService.get());
});
undeployService = new LazyBuilder<>(() -> {
validateIfConnectedToCluster();
if (platformMode == RuntimeMode.OPENSHIFT && isOpenShift(client)) {
return new OpenshiftUndeployService(this, log);
}
return new KubernetesUndeployService(this, log);
});
migrateService = new LazyBuilder<>(() -> new MigrateService(getConfiguration().getBasedir(), log));
helmService = new LazyBuilder<>(() -> new HelmService(getConfiguration(), log));
}
Aggregations