Search in sources :

Example 1 with MigrateService

use of org.eclipse.jkube.kit.common.service.MigrateService 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));
}
Also used : HelmService(org.eclipse.jkube.kit.resource.helm.HelmService) KubernetesUndeployService(org.eclipse.jkube.kit.config.service.kubernetes.KubernetesUndeployService) OpenshiftUndeployService(org.eclipse.jkube.kit.config.service.openshift.OpenshiftUndeployService) ClusterAccess(org.eclipse.jkube.kit.config.access.ClusterAccess) MigrateService(org.eclipse.jkube.kit.common.service.MigrateService)

Aggregations

MigrateService (org.eclipse.jkube.kit.common.service.MigrateService)1 ClusterAccess (org.eclipse.jkube.kit.config.access.ClusterAccess)1 KubernetesUndeployService (org.eclipse.jkube.kit.config.service.kubernetes.KubernetesUndeployService)1 OpenshiftUndeployService (org.eclipse.jkube.kit.config.service.openshift.OpenshiftUndeployService)1 HelmService (org.eclipse.jkube.kit.resource.helm.HelmService)1