Search in sources :

Example 1 with EnvVarProvider

use of org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider in project che-server by eclipse-che.

the class OpenShiftInfraModule method configure.

@Override
protected void configure() {
    Multibinder<WorkspaceAttributeValidator> workspaceAttributeValidators = Multibinder.newSetBinder(binder(), WorkspaceAttributeValidator.class);
    workspaceAttributeValidators.addBinding().to(K8sInfraNamespaceWsAttributeValidator.class);
    workspaceAttributeValidators.addBinding().to(AsyncStorageModeValidator.class);
    Multibinder<NamespaceConfigurator> namespaceConfigurators = Multibinder.newSetBinder(binder(), NamespaceConfigurator.class);
    namespaceConfigurators.addBinding().to(UserProfileConfigurator.class);
    namespaceConfigurators.addBinding().to(UserPreferencesConfigurator.class);
    namespaceConfigurators.addBinding().to(CredentialsSecretConfigurator.class);
    namespaceConfigurators.addBinding().to(PreferencesConfigMapConfigurator.class);
    namespaceConfigurators.addBinding().to(OpenShiftWorkspaceServiceAccountConfigurator.class);
    namespaceConfigurators.addBinding().to(OpenShiftStopWorkspaceRoleConfigurator.class);
    namespaceConfigurators.addBinding().to(SshKeysConfigurator.class);
    bind(KubernetesNamespaceService.class);
    MapBinder<String, InternalEnvironmentFactory> factories = MapBinder.newMapBinder(binder(), String.class, InternalEnvironmentFactory.class);
    factories.addBinding(OpenShiftEnvironment.TYPE).to(OpenShiftEnvironmentFactory.class);
    factories.addBinding(KubernetesEnvironment.TYPE).to(KubernetesEnvironmentFactory.class);
    factories.addBinding(Constants.NO_ENVIRONMENT_RECIPE_TYPE).to(NoEnvironmentFactory.class);
    bind(InconsistentRuntimesDetector.class).asEagerSingleton();
    bind(RuntimeInfrastructure.class).to(OpenShiftInfrastructure.class);
    bind(KubernetesNamespaceFactory.class).to(OpenShiftProjectFactory.class);
    bind(KubernetesClientFactory.class).to(OpenShiftClientFactory.class);
    bind(CheServerOpenshiftClientFactory.class);
    install(new FactoryModuleBuilder().build(OpenShiftRuntimeContextFactory.class));
    install(new FactoryModuleBuilder().build(OpenShiftRuntimeFactory.class));
    install(new FactoryModuleBuilder().build(StartSynchronizerFactory.class));
    bind(WorkspacePVCCleaner.class).asEagerSingleton();
    bind(RemoveProjectOnWorkspaceRemove.class).asEagerSingleton();
    bind(TrustedCAProvisioner.class).to(OpenshiftTrustedCAProvisioner.class);
    bind(CheApiInternalEnvVarProvider.class).to(KubernetesCheApiInternalEnvVarProvider.class);
    bind(CheApiExternalEnvVarProvider.class).to(KubernetesCheApiExternalEnvVarProvider.class);
    MapBinder<String, WorkspaceVolumesStrategy> volumesStrategies = MapBinder.newMapBinder(binder(), String.class, WorkspaceVolumesStrategy.class);
    volumesStrategies.addBinding(COMMON_STRATEGY).to(CommonPVCStrategy.class);
    volumesStrategies.addBinding(PER_WORKSPACE_STRATEGY).to(PerWorkspacePVCStrategy.class);
    volumesStrategies.addBinding(UNIQUE_STRATEGY).to(UniqueWorkspacePVCStrategy.class);
    bind(WorkspaceVolumesStrategy.class).toProvider(WorkspaceVolumeStrategyProvider.class);
    MapBinder<WorkspaceExposureType, ExternalServerExposer<OpenShiftEnvironment>> exposureStrategies = MapBinder.newMapBinder(binder(), new TypeLiteral<>() {
    }, new TypeLiteral<>() {
    });
    exposureStrategies.addBinding(WorkspaceExposureType.NATIVE).to(RouteServerExposer.class);
    exposureStrategies.addBinding(WorkspaceExposureType.GATEWAY).to(new TypeLiteral<GatewayServerExposer<OpenShiftEnvironment>>() {
    });
    bind(new TypeLiteral<ExternalServerExposer<OpenShiftEnvironment>>() {
    }).annotatedWith(com.google.inject.name.Names.named("multihost-exposer")).to(RouteServerExposer.class);
    bind(new TypeLiteral<ExternalServerExposerProvider<OpenShiftEnvironment>>() {
    }).to(OpenShiftExternalServerExposerProvider.class);
    bind(ServersConverter.class).to(new TypeLiteral<ServersConverter<OpenShiftEnvironment>>() {
    });
    bind(PreviewUrlExposer.class).to(new TypeLiteral<OpenShiftPreviewUrlExposer>() {
    });
    bind(PreviewUrlCommandProvisioner.class).to(new TypeLiteral<OpenShiftPreviewUrlCommandProvisioner>() {
    });
    Multibinder<EnvVarProvider> envVarProviders = Multibinder.newSetBinder(binder(), EnvVarProvider.class);
    envVarProviders.addBinding().to(LogsRootEnvVariableProvider.class);
    install(new JpaKubernetesRuntimeCacheModule());
    Multibinder.newSetBinder(binder(), ServiceTermination.class).addBinding().to(KubernetesClientTermination.class);
    MapBinder<String, ChePluginsApplier> pluginsAppliers = MapBinder.newMapBinder(binder(), String.class, ChePluginsApplier.class);
    pluginsAppliers.addBinding(OpenShiftEnvironment.TYPE).to(KubernetesPluginsToolingApplier.class);
    bind(SecureServerExposerFactoryProvider.class).to(new TypeLiteral<SecureServerExposerFactoryProvider<OpenShiftEnvironment>>() {
    });
    bind(BrokerService.class);
    bind(new TypeLiteral<BrokerEnvironmentFactory<OpenShiftEnvironment>>() {
    }).to(OpenshiftBrokerEnvironmentFactory.class);
    bind(PluginBrokerManager.class).to(new TypeLiteral<PluginBrokerManager<OpenShiftEnvironment>>() {
    });
    bind(SidecarToolingProvisioner.class).to(new TypeLiteral<SidecarToolingProvisioner<OpenShiftEnvironment>>() {
    });
    MapBinder<WorkspaceExposureType, TlsProvisioner<OpenShiftEnvironment>> tlsProvisioners = MapBinder.newMapBinder(binder(), new TypeLiteral<WorkspaceExposureType>() {
    }, new TypeLiteral<TlsProvisioner<OpenShiftEnvironment>>() {
    });
    tlsProvisioners.addBinding(WorkspaceExposureType.GATEWAY).to(new TypeLiteral<GatewayTlsProvisioner<OpenShiftEnvironment>>() {
    });
    tlsProvisioners.addBinding(WorkspaceExposureType.NATIVE).to(RouteTlsProvisioner.class);
    bind(new TypeLiteral<KubernetesEnvironmentProvisioner<OpenShiftEnvironment>>() {
    }).to(OpenShiftEnvironmentProvisioner.class);
    DevfileBindings.onComponentIntegrityValidatorBinder(binder(), binder -> {
        binder.addBinding(KUBERNETES_COMPONENT_TYPE).to(KubernetesComponentValidator.class);
        binder.addBinding(OPENSHIFT_COMPONENT_TYPE).to(KubernetesComponentValidator.class);
        binder.addBinding(DOCKERIMAGE_COMPONENT_TYPE).to(NoopComponentIntegrityValidator.class);
    });
    DevfileBindings.onWorkspaceApplierBinder(binder(), binder -> {
        binder.addBinding(KUBERNETES_COMPONENT_TYPE).to(KubernetesComponentToWorkspaceApplier.class);
        binder.addBinding(DOCKERIMAGE_COMPONENT_TYPE).to(DockerimageComponentToWorkspaceApplier.class);
        binder.addBinding(OPENSHIFT_COMPONENT_TYPE).to(OpenshiftComponentToWorkspaceApplier.class);
    });
    KubernetesDevfileBindings.addKubernetesBasedEnvironmentTypeBindings(binder(), KubernetesEnvironment.TYPE, OpenShiftEnvironment.TYPE);
    KubernetesDevfileBindings.addKubernetesBasedComponentTypeBindings(binder(), KUBERNETES_COMPONENT_TYPE, OPENSHIFT_COMPONENT_TYPE);
    KubernetesDevfileBindings.addAllowedEnvironmentTypeUpgradeBindings(binder(), OpenShiftEnvironment.TYPE, KubernetesEnvironment.TYPE);
    MapBinder<String, ExternalServiceExposureStrategy> ingressStrategies = MapBinder.newMapBinder(binder(), String.class, ExternalServiceExposureStrategy.class);
    ingressStrategies.addBinding(MULTI_HOST_STRATEGY).to(OpenShiftServerExposureStrategy.class);
    ingressStrategies.addBinding(SINGLE_HOST_STRATEGY).to(SingleHostExternalServiceExposureStrategy.class);
    bind(ExternalServiceExposureStrategy.class).toProvider(ServiceExposureStrategyProvider.class);
    bind(CookiePathStrategy.class).to(OpenShiftCookiePathStrategy.class);
    bind(NonTlsDistributedClusterModeNotifier.class);
    bind(AsyncStorageProvisioner.class);
    bind(AsyncStoragePodInterceptor.class);
    bind(AsyncStoragePodWatcher.class);
}
Also used : RemoveProjectOnWorkspaceRemove(org.eclipse.che.workspace.infrastructure.openshift.project.RemoveProjectOnWorkspaceRemove) OpenShiftPreviewUrlExposer(org.eclipse.che.workspace.infrastructure.openshift.server.OpenShiftPreviewUrlExposer) PreviewUrlExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.PreviewUrlExposer) CheApiExternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiExternalEnvVarProvider) KubernetesCheApiExternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiExternalEnvVarProvider) OpenShiftPreviewUrlCommandProvisioner(org.eclipse.che.workspace.infrastructure.openshift.provision.OpenShiftPreviewUrlCommandProvisioner) PreviewUrlCommandProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.PreviewUrlCommandProvisioner) StartSynchronizerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.StartSynchronizerFactory) SingleHostExternalServiceExposureStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.SingleHostExternalServiceExposureStrategy) ExternalServiceExposureStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.ExternalServiceExposureStrategy) ServersConverter(org.eclipse.che.workspace.infrastructure.kubernetes.provision.server.ServersConverter) GatewayTlsProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.GatewayTlsProvisioner) InconsistentRuntimesDetector(org.eclipse.che.workspace.infrastructure.kubernetes.InconsistentRuntimesDetector) WorkspacePVCCleaner(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.pvc.WorkspacePVCCleaner) CheApiInternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiInternalEnvVarProvider) KubernetesCheApiInternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiInternalEnvVarProvider) GatewayServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.GatewayServerExposer) OpenShiftPreviewUrlCommandProvisioner(org.eclipse.che.workspace.infrastructure.openshift.provision.OpenShiftPreviewUrlCommandProvisioner) CheApiExternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiExternalEnvVarProvider) EnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider) CheApiInternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiInternalEnvVarProvider) KubernetesCheApiExternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiExternalEnvVarProvider) KubernetesCheApiInternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiInternalEnvVarProvider) RuntimeInfrastructure(org.eclipse.che.api.workspace.server.spi.RuntimeInfrastructure) CookiePathStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.CookiePathStrategy) OpenShiftCookiePathStrategy(org.eclipse.che.workspace.infrastructure.openshift.server.OpenShiftCookiePathStrategy) NamespaceConfigurator(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.NamespaceConfigurator) TlsProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.TlsProvisioner) GatewayTlsProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.GatewayTlsProvisioner) RouteTlsProvisioner(org.eclipse.che.workspace.infrastructure.openshift.provision.RouteTlsProvisioner) KubernetesNamespaceFactory(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespaceFactory) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) WorkspaceExposureType(org.eclipse.che.workspace.infrastructure.kubernetes.server.WorkspaceExposureType) OpenShiftPreviewUrlExposer(org.eclipse.che.workspace.infrastructure.openshift.server.OpenShiftPreviewUrlExposer) OpenShiftEnvironment(org.eclipse.che.workspace.infrastructure.openshift.environment.OpenShiftEnvironment) SidecarToolingProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.wsplugins.SidecarToolingProvisioner) SecureServerExposerFactoryProvider(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.SecureServerExposerFactoryProvider) TypeLiteral(com.google.inject.TypeLiteral) JpaKubernetesRuntimeCacheModule(org.eclipse.che.workspace.infrastructure.kubernetes.cache.jpa.JpaKubernetesRuntimeCacheModule) ExternalServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.ExternalServerExposer) ChePluginsApplier(org.eclipse.che.api.workspace.server.wsplugins.ChePluginsApplier) WorkspaceVolumesStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.pvc.WorkspaceVolumesStrategy) WorkspaceAttributeValidator(org.eclipse.che.api.workspace.server.WorkspaceAttributeValidator) InternalEnvironmentFactory(org.eclipse.che.api.workspace.server.spi.environment.InternalEnvironmentFactory) PluginBrokerManager(org.eclipse.che.workspace.infrastructure.kubernetes.wsplugins.PluginBrokerManager) KubernetesClientFactory(org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFactory) OpenshiftTrustedCAProvisioner(org.eclipse.che.workspace.infrastructure.openshift.provision.OpenshiftTrustedCAProvisioner) TrustedCAProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.TrustedCAProvisioner)

Example 2 with EnvVarProvider

use of org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider in project che-server by eclipse-che.

the class KubernetesInfraModule method configure.

@Override
protected void configure() {
    Multibinder<WorkspaceAttributeValidator> workspaceAttributeValidators = Multibinder.newSetBinder(binder(), WorkspaceAttributeValidator.class);
    workspaceAttributeValidators.addBinding().to(K8sInfraNamespaceWsAttributeValidator.class);
    workspaceAttributeValidators.addBinding().to(AsyncStorageModeValidator.class);
    // order matters here!
    // We first need to grant permissions to user, only then we can run other configurators with
    // user's client.
    Multibinder<NamespaceConfigurator> namespaceConfigurators = Multibinder.newSetBinder(binder(), NamespaceConfigurator.class);
    namespaceConfigurators.addBinding().to(UserPermissionConfigurator.class);
    namespaceConfigurators.addBinding().to(CredentialsSecretConfigurator.class);
    namespaceConfigurators.addBinding().to(PreferencesConfigMapConfigurator.class);
    namespaceConfigurators.addBinding().to(WorkspaceServiceAccountConfigurator.class);
    namespaceConfigurators.addBinding().to(UserProfileConfigurator.class);
    namespaceConfigurators.addBinding().to(UserPreferencesConfigurator.class);
    namespaceConfigurators.addBinding().to(SshKeysConfigurator.class);
    bind(KubernetesNamespaceService.class);
    MapBinder<String, InternalEnvironmentFactory> factories = MapBinder.newMapBinder(binder(), String.class, InternalEnvironmentFactory.class);
    factories.addBinding(KubernetesEnvironment.TYPE).to(KubernetesEnvironmentFactory.class);
    factories.addBinding(Constants.NO_ENVIRONMENT_RECIPE_TYPE).to(NoEnvironmentFactory.class);
    bind(RuntimeInfrastructure.class).to(KubernetesInfrastructure.class);
    bind(InconsistentRuntimesDetector.class).asEagerSingleton();
    bind(TrustedCAProvisioner.class).to(KubernetesTrustedCAProvisioner.class);
    MapBinder<WorkspaceExposureType, TlsProvisioner<KubernetesEnvironment>> tlsProvisioners = MapBinder.newMapBinder(binder(), new TypeLiteral<WorkspaceExposureType>() {
    }, new TypeLiteral<TlsProvisioner<KubernetesEnvironment>>() {
    });
    tlsProvisioners.addBinding(WorkspaceExposureType.GATEWAY).to(new TypeLiteral<GatewayTlsProvisioner<KubernetesEnvironment>>() {
    });
    tlsProvisioners.addBinding(WorkspaceExposureType.NATIVE).to(IngressTlsProvisioner.class);
    bind(new TypeLiteral<KubernetesEnvironmentProvisioner<KubernetesEnvironment>>() {
    }).to(KubernetesEnvironmentProvisioner.KubernetesEnvironmentProvisionerImpl.class);
    install(new FactoryModuleBuilder().build(KubernetesRuntimeContextFactory.class));
    install(new FactoryModuleBuilder().build(new TypeLiteral<KubernetesRuntimeFactory<KubernetesEnvironment>>() {
    }));
    install(new FactoryModuleBuilder().build(StartSynchronizerFactory.class));
    bind(WorkspacePVCCleaner.class).asEagerSingleton();
    bind(RemoveNamespaceOnWorkspaceRemove.class).asEagerSingleton();
    bind(CheApiInternalEnvVarProvider.class).to(KubernetesCheApiInternalEnvVarProvider.class);
    bind(CheApiExternalEnvVarProvider.class).to(KubernetesCheApiExternalEnvVarProvider.class);
    MapBinder<String, WorkspaceVolumesStrategy> volumesStrategies = MapBinder.newMapBinder(binder(), String.class, WorkspaceVolumesStrategy.class);
    volumesStrategies.addBinding(COMMON_STRATEGY).to(CommonPVCStrategy.class);
    volumesStrategies.addBinding(PER_WORKSPACE_STRATEGY).to(PerWorkspacePVCStrategy.class);
    volumesStrategies.addBinding(UNIQUE_STRATEGY).to(UniqueWorkspacePVCStrategy.class);
    bind(WorkspaceVolumesStrategy.class).toProvider(WorkspaceVolumeStrategyProvider.class);
    Multibinder.newSetBinder(binder(), ServiceTermination.class).addBinding().to(KubernetesClientTermination.class);
    MapBinder<String, ExternalServiceExposureStrategy> ingressStrategies = MapBinder.newMapBinder(binder(), String.class, ExternalServiceExposureStrategy.class);
    ingressStrategies.addBinding(MULTI_HOST_STRATEGY).to(MultiHostExternalServiceExposureStrategy.class);
    ingressStrategies.addBinding(SINGLE_HOST_STRATEGY).to(SingleHostExternalServiceExposureStrategy.class);
    ingressStrategies.addBinding(DEFAULT_HOST_STRATEGY).to(DefaultHostExternalServiceExposureStrategy.class);
    bind(ExternalServiceExposureStrategy.class).toProvider(ServiceExposureStrategyProvider.class);
    MapBinder<WorkspaceExposureType, ExternalServerExposer<KubernetesEnvironment>> exposureStrategies = MapBinder.newMapBinder(binder(), new TypeLiteral<>() {
    }, new TypeLiteral<>() {
    });
    exposureStrategies.addBinding(WorkspaceExposureType.NATIVE).to(new TypeLiteral<IngressServerExposer<KubernetesEnvironment>>() {
    });
    exposureStrategies.addBinding(WorkspaceExposureType.GATEWAY).to(new TypeLiteral<GatewayServerExposer<KubernetesEnvironment>>() {
    });
    bind(new TypeLiteral<ExternalServerExposer<KubernetesEnvironment>>() {
    }).annotatedWith(com.google.inject.name.Names.named("multihost-exposer")).to(new TypeLiteral<MultihostIngressServerExposer<KubernetesEnvironment>>() {
    });
    bind(new TypeLiteral<ExternalServerExposerProvider<KubernetesEnvironment>>() {
    }).to(new TypeLiteral<KubernetesExternalServerExposerProvider<KubernetesEnvironment>>() {
    });
    bind(ServersConverter.class).to(new TypeLiteral<ServersConverter<KubernetesEnvironment>>() {
    });
    bind(PreviewUrlExposer.class).to(new TypeLiteral<PreviewUrlExposer<KubernetesEnvironment>>() {
    });
    bind(PreviewUrlCommandProvisioner.class).to(new TypeLiteral<KubernetesPreviewUrlCommandProvisioner>() {
    });
    Multibinder<EnvVarProvider> envVarProviders = Multibinder.newSetBinder(binder(), EnvVarProvider.class);
    envVarProviders.addBinding().to(LogsRootEnvVariableProvider.class);
    bind(new TypeLiteral<Map<String, String>>() {
    }).annotatedWith(named("infra.kubernetes.ingress.annotations")).toProvider(IngressAnnotationsProvider.class);
    install(new JpaKubernetesRuntimeCacheModule());
    bind(SecureServerExposerFactoryProvider.class).to(new TypeLiteral<SecureServerExposerFactoryProvider<KubernetesEnvironment>>() {
    });
    MapBinder<String, ChePluginsApplier> chePluginsAppliers = MapBinder.newMapBinder(binder(), String.class, ChePluginsApplier.class);
    chePluginsAppliers.addBinding(KubernetesEnvironment.TYPE).to(KubernetesPluginsToolingApplier.class);
    bind(BrokerService.class);
    bind(new TypeLiteral<BrokerEnvironmentFactory<KubernetesEnvironment>>() {
    }).to(KubernetesBrokerEnvironmentFactory.class);
    bind(PluginBrokerManager.class).to(new TypeLiteral<PluginBrokerManager<KubernetesEnvironment>>() {
    });
    bind(SidecarToolingProvisioner.class).to(new TypeLiteral<SidecarToolingProvisioner<KubernetesEnvironment>>() {
    });
    DevfileBindings.onComponentIntegrityValidatorBinder(binder(), binder -> {
        binder.addBinding(KUBERNETES_COMPONENT_TYPE).to(KubernetesComponentValidator.class);
        binder.addBinding(DOCKERIMAGE_COMPONENT_TYPE).to(NoopComponentIntegrityValidator.class);
    });
    DevfileBindings.onWorkspaceApplierBinder(binder(), binder -> {
        binder.addBinding(KUBERNETES_COMPONENT_TYPE).to(KubernetesComponentToWorkspaceApplier.class);
        binder.addBinding(DOCKERIMAGE_COMPONENT_TYPE).to(DockerimageComponentToWorkspaceApplier.class);
    });
    KubernetesDevfileBindings.addKubernetesBasedEnvironmentTypeBindings(binder(), KubernetesEnvironment.TYPE);
    KubernetesDevfileBindings.addKubernetesBasedComponentTypeBindings(binder(), KUBERNETES_COMPONENT_TYPE);
    // We need to initialize the bindings somehow. Because no other environment type is upgradable
    // to kubernetes, we just call this in a way that initializes the binding with an empty map.
    KubernetesDevfileBindings.addAllowedEnvironmentTypeUpgradeBindings(binder(), KubernetesEnvironment.TYPE);
    bind(NonTlsDistributedClusterModeNotifier.class);
    bind(AsyncStorageProvisioner.class);
}
Also used : PreviewUrlExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.PreviewUrlExposer) CheApiExternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiExternalEnvVarProvider) KubernetesCheApiExternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiExternalEnvVarProvider) KubernetesPreviewUrlCommandProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesPreviewUrlCommandProvisioner) KubernetesPreviewUrlCommandProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesPreviewUrlCommandProvisioner) PreviewUrlCommandProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.PreviewUrlCommandProvisioner) SingleHostExternalServiceExposureStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.SingleHostExternalServiceExposureStrategy) MultiHostExternalServiceExposureStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.MultiHostExternalServiceExposureStrategy) DefaultHostExternalServiceExposureStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.DefaultHostExternalServiceExposureStrategy) ExternalServiceExposureStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.ExternalServiceExposureStrategy) ServersConverter(org.eclipse.che.workspace.infrastructure.kubernetes.provision.server.ServersConverter) GatewayTlsProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.GatewayTlsProvisioner) MultihostIngressServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.MultihostIngressServerExposer) WorkspacePVCCleaner(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.pvc.WorkspacePVCCleaner) CheApiInternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiInternalEnvVarProvider) KubernetesCheApiInternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiInternalEnvVarProvider) GatewayServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.GatewayServerExposer) CheApiExternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiExternalEnvVarProvider) EnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider) CheApiInternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiInternalEnvVarProvider) KubernetesCheApiExternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiExternalEnvVarProvider) KubernetesCheApiInternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiInternalEnvVarProvider) Map(java.util.Map) RuntimeInfrastructure(org.eclipse.che.api.workspace.server.spi.RuntimeInfrastructure) NamespaceConfigurator(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.NamespaceConfigurator) TlsProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.TlsProvisioner) IngressTlsProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.IngressTlsProvisioner) GatewayTlsProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.GatewayTlsProvisioner) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) WorkspaceExposureType(org.eclipse.che.workspace.infrastructure.kubernetes.server.WorkspaceExposureType) SidecarToolingProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.wsplugins.SidecarToolingProvisioner) SecureServerExposerFactoryProvider(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.SecureServerExposerFactoryProvider) TypeLiteral(com.google.inject.TypeLiteral) JpaKubernetesRuntimeCacheModule(org.eclipse.che.workspace.infrastructure.kubernetes.cache.jpa.JpaKubernetesRuntimeCacheModule) ExternalServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.ExternalServerExposer) ChePluginsApplier(org.eclipse.che.api.workspace.server.wsplugins.ChePluginsApplier) RemoveNamespaceOnWorkspaceRemove(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.RemoveNamespaceOnWorkspaceRemove) WorkspaceVolumesStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.pvc.WorkspaceVolumesStrategy) WorkspaceAttributeValidator(org.eclipse.che.api.workspace.server.WorkspaceAttributeValidator) InternalEnvironmentFactory(org.eclipse.che.api.workspace.server.spi.environment.InternalEnvironmentFactory) PluginBrokerManager(org.eclipse.che.workspace.infrastructure.kubernetes.wsplugins.PluginBrokerManager) KubernetesEnvironment(org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment) KubernetesExternalServerExposerProvider(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.KubernetesExternalServerExposerProvider) IngressServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.IngressServerExposer) MultihostIngressServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.MultihostIngressServerExposer) KubernetesTrustedCAProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesTrustedCAProvisioner) TrustedCAProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.TrustedCAProvisioner)

Example 3 with EnvVarProvider

use of org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider in project devspaces-images by redhat-developer.

the class KubernetesInfraModule method configure.

@Override
protected void configure() {
    Multibinder<WorkspaceAttributeValidator> workspaceAttributeValidators = Multibinder.newSetBinder(binder(), WorkspaceAttributeValidator.class);
    workspaceAttributeValidators.addBinding().to(K8sInfraNamespaceWsAttributeValidator.class);
    workspaceAttributeValidators.addBinding().to(AsyncStorageModeValidator.class);
    // order matters here!
    // We first need to grant permissions to user, only then we can run other configurators with
    // user's client.
    Multibinder<NamespaceConfigurator> namespaceConfigurators = Multibinder.newSetBinder(binder(), NamespaceConfigurator.class);
    namespaceConfigurators.addBinding().to(UserPermissionConfigurator.class);
    namespaceConfigurators.addBinding().to(CredentialsSecretConfigurator.class);
    namespaceConfigurators.addBinding().to(PreferencesConfigMapConfigurator.class);
    namespaceConfigurators.addBinding().to(WorkspaceServiceAccountConfigurator.class);
    namespaceConfigurators.addBinding().to(UserProfileConfigurator.class);
    namespaceConfigurators.addBinding().to(UserPreferencesConfigurator.class);
    namespaceConfigurators.addBinding().to(SshKeysConfigurator.class);
    bind(KubernetesNamespaceService.class);
    MapBinder<String, InternalEnvironmentFactory> factories = MapBinder.newMapBinder(binder(), String.class, InternalEnvironmentFactory.class);
    factories.addBinding(KubernetesEnvironment.TYPE).to(KubernetesEnvironmentFactory.class);
    factories.addBinding(Constants.NO_ENVIRONMENT_RECIPE_TYPE).to(NoEnvironmentFactory.class);
    bind(RuntimeInfrastructure.class).to(KubernetesInfrastructure.class);
    bind(InconsistentRuntimesDetector.class).asEagerSingleton();
    bind(TrustedCAProvisioner.class).to(KubernetesTrustedCAProvisioner.class);
    MapBinder<WorkspaceExposureType, TlsProvisioner<KubernetesEnvironment>> tlsProvisioners = MapBinder.newMapBinder(binder(), new TypeLiteral<WorkspaceExposureType>() {
    }, new TypeLiteral<TlsProvisioner<KubernetesEnvironment>>() {
    });
    tlsProvisioners.addBinding(WorkspaceExposureType.GATEWAY).to(new TypeLiteral<GatewayTlsProvisioner<KubernetesEnvironment>>() {
    });
    tlsProvisioners.addBinding(WorkspaceExposureType.NATIVE).to(IngressTlsProvisioner.class);
    bind(new TypeLiteral<KubernetesEnvironmentProvisioner<KubernetesEnvironment>>() {
    }).to(KubernetesEnvironmentProvisioner.KubernetesEnvironmentProvisionerImpl.class);
    install(new FactoryModuleBuilder().build(KubernetesRuntimeContextFactory.class));
    install(new FactoryModuleBuilder().build(new TypeLiteral<KubernetesRuntimeFactory<KubernetesEnvironment>>() {
    }));
    install(new FactoryModuleBuilder().build(StartSynchronizerFactory.class));
    bind(WorkspacePVCCleaner.class).asEagerSingleton();
    bind(RemoveNamespaceOnWorkspaceRemove.class).asEagerSingleton();
    bind(CheApiInternalEnvVarProvider.class).to(KubernetesCheApiInternalEnvVarProvider.class);
    bind(CheApiExternalEnvVarProvider.class).to(KubernetesCheApiExternalEnvVarProvider.class);
    MapBinder<String, WorkspaceVolumesStrategy> volumesStrategies = MapBinder.newMapBinder(binder(), String.class, WorkspaceVolumesStrategy.class);
    volumesStrategies.addBinding(COMMON_STRATEGY).to(CommonPVCStrategy.class);
    volumesStrategies.addBinding(PER_WORKSPACE_STRATEGY).to(PerWorkspacePVCStrategy.class);
    volumesStrategies.addBinding(UNIQUE_STRATEGY).to(UniqueWorkspacePVCStrategy.class);
    bind(WorkspaceVolumesStrategy.class).toProvider(WorkspaceVolumeStrategyProvider.class);
    Multibinder.newSetBinder(binder(), ServiceTermination.class).addBinding().to(KubernetesClientTermination.class);
    MapBinder<String, ExternalServiceExposureStrategy> ingressStrategies = MapBinder.newMapBinder(binder(), String.class, ExternalServiceExposureStrategy.class);
    ingressStrategies.addBinding(MULTI_HOST_STRATEGY).to(MultiHostExternalServiceExposureStrategy.class);
    ingressStrategies.addBinding(SINGLE_HOST_STRATEGY).to(SingleHostExternalServiceExposureStrategy.class);
    ingressStrategies.addBinding(DEFAULT_HOST_STRATEGY).to(DefaultHostExternalServiceExposureStrategy.class);
    bind(ExternalServiceExposureStrategy.class).toProvider(ServiceExposureStrategyProvider.class);
    MapBinder<WorkspaceExposureType, ExternalServerExposer<KubernetesEnvironment>> exposureStrategies = MapBinder.newMapBinder(binder(), new TypeLiteral<>() {
    }, new TypeLiteral<>() {
    });
    exposureStrategies.addBinding(WorkspaceExposureType.NATIVE).to(new TypeLiteral<IngressServerExposer<KubernetesEnvironment>>() {
    });
    exposureStrategies.addBinding(WorkspaceExposureType.GATEWAY).to(new TypeLiteral<GatewayServerExposer<KubernetesEnvironment>>() {
    });
    bind(new TypeLiteral<ExternalServerExposer<KubernetesEnvironment>>() {
    }).annotatedWith(com.google.inject.name.Names.named("multihost-exposer")).to(new TypeLiteral<MultihostIngressServerExposer<KubernetesEnvironment>>() {
    });
    bind(new TypeLiteral<ExternalServerExposerProvider<KubernetesEnvironment>>() {
    }).to(new TypeLiteral<KubernetesExternalServerExposerProvider<KubernetesEnvironment>>() {
    });
    bind(ServersConverter.class).to(new TypeLiteral<ServersConverter<KubernetesEnvironment>>() {
    });
    bind(PreviewUrlExposer.class).to(new TypeLiteral<PreviewUrlExposer<KubernetesEnvironment>>() {
    });
    bind(PreviewUrlCommandProvisioner.class).to(new TypeLiteral<KubernetesPreviewUrlCommandProvisioner>() {
    });
    Multibinder<EnvVarProvider> envVarProviders = Multibinder.newSetBinder(binder(), EnvVarProvider.class);
    envVarProviders.addBinding().to(LogsRootEnvVariableProvider.class);
    bind(new TypeLiteral<Map<String, String>>() {
    }).annotatedWith(named("infra.kubernetes.ingress.annotations")).toProvider(IngressAnnotationsProvider.class);
    install(new JpaKubernetesRuntimeCacheModule());
    bind(SecureServerExposerFactoryProvider.class).to(new TypeLiteral<SecureServerExposerFactoryProvider<KubernetesEnvironment>>() {
    });
    MapBinder<String, ChePluginsApplier> chePluginsAppliers = MapBinder.newMapBinder(binder(), String.class, ChePluginsApplier.class);
    chePluginsAppliers.addBinding(KubernetesEnvironment.TYPE).to(KubernetesPluginsToolingApplier.class);
    bind(BrokerService.class);
    bind(new TypeLiteral<BrokerEnvironmentFactory<KubernetesEnvironment>>() {
    }).to(KubernetesBrokerEnvironmentFactory.class);
    bind(PluginBrokerManager.class).to(new TypeLiteral<PluginBrokerManager<KubernetesEnvironment>>() {
    });
    bind(SidecarToolingProvisioner.class).to(new TypeLiteral<SidecarToolingProvisioner<KubernetesEnvironment>>() {
    });
    DevfileBindings.onComponentIntegrityValidatorBinder(binder(), binder -> {
        binder.addBinding(KUBERNETES_COMPONENT_TYPE).to(KubernetesComponentValidator.class);
        binder.addBinding(DOCKERIMAGE_COMPONENT_TYPE).to(NoopComponentIntegrityValidator.class);
    });
    DevfileBindings.onWorkspaceApplierBinder(binder(), binder -> {
        binder.addBinding(KUBERNETES_COMPONENT_TYPE).to(KubernetesComponentToWorkspaceApplier.class);
        binder.addBinding(DOCKERIMAGE_COMPONENT_TYPE).to(DockerimageComponentToWorkspaceApplier.class);
    });
    KubernetesDevfileBindings.addKubernetesBasedEnvironmentTypeBindings(binder(), KubernetesEnvironment.TYPE);
    KubernetesDevfileBindings.addKubernetesBasedComponentTypeBindings(binder(), KUBERNETES_COMPONENT_TYPE);
    // We need to initialize the bindings somehow. Because no other environment type is upgradable
    // to kubernetes, we just call this in a way that initializes the binding with an empty map.
    KubernetesDevfileBindings.addAllowedEnvironmentTypeUpgradeBindings(binder(), KubernetesEnvironment.TYPE);
    bind(NonTlsDistributedClusterModeNotifier.class);
    bind(AsyncStorageProvisioner.class);
}
Also used : PreviewUrlExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.PreviewUrlExposer) CheApiExternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiExternalEnvVarProvider) KubernetesCheApiExternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiExternalEnvVarProvider) KubernetesPreviewUrlCommandProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesPreviewUrlCommandProvisioner) KubernetesPreviewUrlCommandProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesPreviewUrlCommandProvisioner) PreviewUrlCommandProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.PreviewUrlCommandProvisioner) SingleHostExternalServiceExposureStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.SingleHostExternalServiceExposureStrategy) MultiHostExternalServiceExposureStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.MultiHostExternalServiceExposureStrategy) DefaultHostExternalServiceExposureStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.DefaultHostExternalServiceExposureStrategy) ExternalServiceExposureStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.ExternalServiceExposureStrategy) ServersConverter(org.eclipse.che.workspace.infrastructure.kubernetes.provision.server.ServersConverter) GatewayTlsProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.GatewayTlsProvisioner) MultihostIngressServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.MultihostIngressServerExposer) WorkspacePVCCleaner(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.pvc.WorkspacePVCCleaner) CheApiInternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiInternalEnvVarProvider) KubernetesCheApiInternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiInternalEnvVarProvider) GatewayServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.GatewayServerExposer) CheApiExternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiExternalEnvVarProvider) EnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider) CheApiInternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiInternalEnvVarProvider) KubernetesCheApiExternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiExternalEnvVarProvider) KubernetesCheApiInternalEnvVarProvider(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiInternalEnvVarProvider) Map(java.util.Map) RuntimeInfrastructure(org.eclipse.che.api.workspace.server.spi.RuntimeInfrastructure) NamespaceConfigurator(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.NamespaceConfigurator) TlsProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.TlsProvisioner) IngressTlsProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.IngressTlsProvisioner) GatewayTlsProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.GatewayTlsProvisioner) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) WorkspaceExposureType(org.eclipse.che.workspace.infrastructure.kubernetes.server.WorkspaceExposureType) SidecarToolingProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.wsplugins.SidecarToolingProvisioner) SecureServerExposerFactoryProvider(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.SecureServerExposerFactoryProvider) TypeLiteral(com.google.inject.TypeLiteral) JpaKubernetesRuntimeCacheModule(org.eclipse.che.workspace.infrastructure.kubernetes.cache.jpa.JpaKubernetesRuntimeCacheModule) ExternalServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.ExternalServerExposer) ChePluginsApplier(org.eclipse.che.api.workspace.server.wsplugins.ChePluginsApplier) RemoveNamespaceOnWorkspaceRemove(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.RemoveNamespaceOnWorkspaceRemove) WorkspaceVolumesStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.pvc.WorkspaceVolumesStrategy) WorkspaceAttributeValidator(org.eclipse.che.api.workspace.server.WorkspaceAttributeValidator) InternalEnvironmentFactory(org.eclipse.che.api.workspace.server.spi.environment.InternalEnvironmentFactory) PluginBrokerManager(org.eclipse.che.workspace.infrastructure.kubernetes.wsplugins.PluginBrokerManager) KubernetesEnvironment(org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment) KubernetesExternalServerExposerProvider(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.KubernetesExternalServerExposerProvider) IngressServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.IngressServerExposer) MultihostIngressServerExposer(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.MultihostIngressServerExposer) KubernetesTrustedCAProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesTrustedCAProvisioner) TrustedCAProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.TrustedCAProvisioner)

Example 4 with EnvVarProvider

use of org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider in project che-server by eclipse-che.

the class WsMasterModule method configure.

@Override
protected void configure() {
    // Can be removed after upgrade to Fabric8 4.10.2 or higher or to Java 11
    if (System.getProperty("java.version", "").startsWith("1.8")) {
        System.setProperty("http2.disable", "true");
    }
    // db related components modules
    install(new org.eclipse.che.account.api.AccountModule());
    install(new org.eclipse.che.api.ssh.server.jpa.SshJpaModule());
    install(new org.eclipse.che.api.core.jsonrpc.impl.JsonRpcModule());
    install(new org.eclipse.che.api.core.websocket.impl.WebSocketModule());
    // db configuration
    bind(SchemaInitializer.class).to(org.eclipse.che.core.db.schema.impl.flyway.FlywaySchemaInitializer.class);
    bind(org.eclipse.che.core.db.DBInitializer.class).asEagerSingleton();
    bind(PlaceholderReplacer.class).toProvider(org.eclipse.che.core.db.schema.impl.flyway.PlaceholderReplacerProvider.class);
    // factory
    bind(FactoryAcceptValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryAcceptValidatorImpl.class);
    bind(FactoryCreateValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryCreateValidatorImpl.class);
    bind(FactoryEditValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryEditValidatorImpl.class);
    bind(org.eclipse.che.api.factory.server.FactoryService.class);
    bind(ScmService.class);
    install(new org.eclipse.che.api.factory.server.jpa.FactoryJpaModule());
    // Service-specific factory resolvers.
    Multibinder<FactoryParametersResolver> factoryParametersResolverMultibinder = Multibinder.newSetBinder(binder(), FactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(GithubFactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(BitbucketServerAuthorizingFactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(GitlabFactoryParametersResolver.class);
    Multibinder<ScmFileResolver> scmFileResolverResolverMultibinder = Multibinder.newSetBinder(binder(), ScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(GithubScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(GitlabScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(BitbucketServerScmFileResolver.class);
    install(new org.eclipse.che.api.factory.server.scm.KubernetesScmModule());
    install(new org.eclipse.che.api.factory.server.bitbucket.BitbucketServerModule());
    install(new org.eclipse.che.api.factory.server.gitlab.GitlabModule());
    install(new org.eclipse.che.api.factory.server.github.GithubModule());
    bind(org.eclipse.che.api.core.rest.ApiInfoService.class);
    bind(org.eclipse.che.api.ssh.server.SshService.class);
    bind(org.eclipse.che.api.user.server.UserService.class);
    bind(org.eclipse.che.api.user.server.ProfileService.class);
    bind(org.eclipse.che.api.user.server.PreferencesService.class);
    bind(org.eclipse.che.security.oauth.OAuthAuthenticationService.class);
    bind(org.eclipse.che.security.oauth1.OAuthAuthenticationService.class);
    install(new DevfileModule());
    bind(WorkspaceEntityProvider.class);
    bind(org.eclipse.che.api.workspace.server.TemporaryWorkspaceRemover.class);
    bind(org.eclipse.che.api.workspace.server.WorkspaceService.class);
    bind(org.eclipse.che.api.devfile.server.DevfileService.class);
    bind(org.eclipse.che.api.devfile.server.UserDevfileEntityProvider.class);
    install(new FactoryModuleBuilder().build(ServersCheckerFactory.class));
    Multibinder<InternalEnvironmentProvisioner> internalEnvironmentProvisioners = Multibinder.newSetBinder(binder(), InternalEnvironmentProvisioner.class);
    internalEnvironmentProvisioners.addBinding().to(EnvVarEnvironmentProvisioner.class);
    internalEnvironmentProvisioners.addBinding().to(MachineNameProvisioner.class);
    Multibinder<EnvVarProvider> envVarProviders = Multibinder.newSetBinder(binder(), EnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiEnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiInternalEnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiExternalEnvVarProvider.class);
    envVarProviders.addBinding().to(MachineTokenEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceIdEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceNamespaceNameEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceNameEnvVarProvider.class);
    envVarProviders.addBinding().to(ProjectsRootEnvVariableProvider.class);
    Multibinder<LegacyEnvVarProvider> legacyEnvVarProviderMultibinders = Multibinder.newSetBinder(binder(), LegacyEnvVarProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(JavaOptsEnvVariableProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(MavenOptsEnvVariableProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(AgentAuthEnableEnvVarProvider.class);
    bind(org.eclipse.che.api.workspace.server.event.WorkspaceJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.everrest.EverrestDownloadFileResponseFilter.class);
    bind(org.eclipse.che.everrest.ETagResponseFilter.class);
    // temporary solution
    bind(org.eclipse.che.api.workspace.server.event.RuntimeStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.MachineStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.ServerStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.RuntimeLogJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.security.oauth.OAuthAuthenticatorProvider.class).to(org.eclipse.che.security.oauth.OAuthAuthenticatorProviderImpl.class);
    install(new org.eclipse.che.api.core.rest.CoreRestModule());
    install(new org.eclipse.che.api.core.util.FileCleaner.FileCleanerModule());
    install(new org.eclipse.che.swagger.deploy.DocsModule());
    install(new org.eclipse.che.commons.schedule.executor.ScheduleModule());
    install(new org.eclipse.che.api.logger.deploy.LoggerModule());
    final Multibinder<MessageBodyAdapter> adaptersMultibinder = Multibinder.newSetBinder(binder(), MessageBodyAdapter.class);
    final MessageBodyAdapterInterceptor interceptor = new MessageBodyAdapterInterceptor();
    requestInjection(interceptor);
    bindInterceptor(subclassesOf(CheJsonProvider.class), names("readFrom"), interceptor);
    // system components
    install(new SystemModule());
    Multibinder<ServiceTermination> terminationMultiBinder = Multibinder.newSetBinder(binder(), ServiceTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.workspace.server.WorkspaceServiceTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.system.server.CronThreadPullTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.workspace.server.hc.probe.ProbeSchedulerTermination.class);
    bind(DBTermination.class);
    final Map<String, String> persistenceProperties = new HashMap<>();
    persistenceProperties.put(PersistenceUnitProperties.TARGET_SERVER, "None");
    persistenceProperties.put(PersistenceUnitProperties.LOGGING_LOGGER, "DefaultLogger");
    persistenceProperties.put(PersistenceUnitProperties.LOGGING_LEVEL, "SEVERE");
    persistenceProperties.put(PersistenceUnitProperties.NON_JTA_DATASOURCE, "java:/comp/env/jdbc/che");
    bindConstant().annotatedWith(Names.named("jndi.datasource.name")).to("java:/comp/env/jdbc/che");
    String infrastructure = System.getenv("CHE_INFRASTRUCTURE_ACTIVE");
    install(new FactoryModuleBuilder().build(JwtProxyConfigBuilderFactory.class));
    install(new FactoryModuleBuilder().build(PassThroughProxyProvisionerFactory.class));
    installDefaultSecureServerExposer(infrastructure);
    install(new org.eclipse.che.security.oauth1.BitbucketModule());
    install(new GitLabModule());
    configureMultiUserMode(persistenceProperties, infrastructure);
    install(new com.google.inject.persist.jpa.JpaPersistModule("main").properties(persistenceProperties));
    if (OpenShiftInfrastructure.NAME.equals(infrastructure)) {
        install(new OpenShiftInfraModule());
    } else if (KubernetesInfrastructure.NAME.equals(infrastructure)) {
        install(new KubernetesInfraModule());
    }
    install(new CheJsonRpcWebSocketConfigurationModule());
    bind(org.eclipse.che.api.user.server.AppStatesPreferenceCleaner.class);
    MapBinder.newMapBinder(binder(), String.class, ChePluginsApplier.class);
    if (Boolean.valueOf(System.getenv("CHE_TRACING_ENABLED"))) {
        install(new org.eclipse.che.core.tracing.TracingModule());
    } else {
        install(new org.eclipse.che.core.tracing.NopTracingModule());
    }
    if (Boolean.valueOf(System.getenv("CHE_METRICS_ENABLED"))) {
        install(new org.eclipse.che.core.metrics.MetricsModule());
        install(new WsMasterMetricsModule());
        install(new InfrastructureMetricsModule());
    } else {
        install(new org.eclipse.che.core.metrics.NoopMetricsModule());
    }
    if (Boolean.valueOf(System.getenv("CHE_TRACING_ENABLED")) && Boolean.valueOf(System.getenv("CHE_METRICS_ENABLED"))) {
        install(new TracingMetricsModule());
    }
    install(new ExecutorWrapperModule());
    install(new OpenShiftOAuthModule());
}
Also used : HashMap(java.util.HashMap) GitLabModule(org.eclipse.che.security.oauth.GitLabModule) FactoryEditValidator(org.eclipse.che.api.factory.server.FactoryEditValidator) CheJsonProvider(org.eclipse.che.api.core.rest.CheJsonProvider) MessageBodyAdapter(org.eclipse.che.api.core.rest.MessageBodyAdapter) DevfileModule(org.eclipse.che.api.workspace.server.devfile.DevfileModule) ServiceTermination(org.eclipse.che.api.system.server.ServiceTermination) WorkspaceStatusCache(org.eclipse.che.api.workspace.server.WorkspaceStatusCache) SystemModule(org.eclipse.che.api.system.server.SystemModule) ServersCheckerFactory(org.eclipse.che.api.workspace.server.hc.ServersCheckerFactory) FactoryCreateValidator(org.eclipse.che.api.factory.server.FactoryCreateValidator) GithubScmFileResolver(org.eclipse.che.api.factory.server.github.GithubScmFileResolver) GitlabScmFileResolver(org.eclipse.che.api.factory.server.gitlab.GitlabScmFileResolver) BitbucketServerScmFileResolver(org.eclipse.che.api.factory.server.bitbucket.BitbucketServerScmFileResolver) ScmFileResolver(org.eclipse.che.api.factory.server.ScmFileResolver) InternalEnvironmentProvisioner(org.eclipse.che.api.workspace.server.spi.provision.InternalEnvironmentProvisioner) WsMasterMetricsModule(org.eclipse.che.api.metrics.WsMasterMetricsModule) KubernetesInfraModule(org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesInfraModule) MessageBodyAdapterInterceptor(org.eclipse.che.api.core.rest.MessageBodyAdapterInterceptor) CheApiEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiEnvVarProvider) MachineTokenEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.MachineTokenEnvVarProvider) WorkspaceNamespaceNameEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceNamespaceNameEnvVarProvider) CheApiInternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiInternalEnvVarProvider) AgentAuthEnableEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.AgentAuthEnableEnvVarProvider) CheApiExternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiExternalEnvVarProvider) EnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider) WorkspaceNameEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceNameEnvVarProvider) LegacyEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.LegacyEnvVarProvider) WorkspaceIdEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceIdEnvVarProvider) GitlabFactoryParametersResolver(org.eclipse.che.api.factory.server.gitlab.GitlabFactoryParametersResolver) FactoryParametersResolver(org.eclipse.che.api.factory.server.FactoryParametersResolver) GithubFactoryParametersResolver(org.eclipse.che.api.factory.server.github.GithubFactoryParametersResolver) BitbucketServerAuthorizingFactoryParametersResolver(org.eclipse.che.api.factory.server.bitbucket.BitbucketServerAuthorizingFactoryParametersResolver) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) PlaceholderReplacer(org.flywaydb.core.internal.util.PlaceholderReplacer) OpenShiftOAuthModule(org.eclipse.che.security.oauth.OpenShiftOAuthModule) SchemaInitializer(org.eclipse.che.core.db.schema.SchemaInitializer) LegacyEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.LegacyEnvVarProvider) CheJsonRpcWebSocketConfigurationModule(org.eclipse.che.api.deploy.jsonrpc.CheJsonRpcWebSocketConfigurationModule) PassThroughProxyProvisionerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.PassThroughProxyProvisionerFactory) OpenShiftInfraModule(org.eclipse.che.workspace.infrastructure.openshift.OpenShiftInfraModule) InfrastructureMetricsModule(org.eclipse.che.workspace.infrastructure.metrics.InfrastructureMetricsModule) FactoryAcceptValidator(org.eclipse.che.api.factory.server.FactoryAcceptValidator) ExecutorWrapperModule(org.eclipse.che.commons.observability.deploy.ExecutorWrapperModule) JwtProxyConfigBuilderFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.JwtProxyConfigBuilderFactory) TracingMetricsModule(org.eclipse.che.core.tracing.metrics.TracingMetricsModule)

Example 5 with EnvVarProvider

use of org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider in project devspaces-images by redhat-developer.

the class WsMasterModule method configure.

@Override
protected void configure() {
    // Can be removed after upgrade to Fabric8 4.10.2 or higher or to Java 11
    if (System.getProperty("java.version", "").startsWith("1.8")) {
        System.setProperty("http2.disable", "true");
    }
    // db related components modules
    install(new org.eclipse.che.account.api.AccountModule());
    install(new org.eclipse.che.api.ssh.server.jpa.SshJpaModule());
    install(new org.eclipse.che.api.core.jsonrpc.impl.JsonRpcModule());
    install(new org.eclipse.che.api.core.websocket.impl.WebSocketModule());
    // db configuration
    bind(SchemaInitializer.class).to(org.eclipse.che.core.db.schema.impl.flyway.FlywaySchemaInitializer.class);
    bind(org.eclipse.che.core.db.DBInitializer.class).asEagerSingleton();
    bind(PlaceholderReplacer.class).toProvider(org.eclipse.che.core.db.schema.impl.flyway.PlaceholderReplacerProvider.class);
    // factory
    bind(FactoryAcceptValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryAcceptValidatorImpl.class);
    bind(FactoryCreateValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryCreateValidatorImpl.class);
    bind(FactoryEditValidator.class).to(org.eclipse.che.api.factory.server.impl.FactoryEditValidatorImpl.class);
    bind(org.eclipse.che.api.factory.server.FactoryService.class);
    bind(ScmService.class);
    install(new org.eclipse.che.api.factory.server.jpa.FactoryJpaModule());
    // Service-specific factory resolvers.
    Multibinder<FactoryParametersResolver> factoryParametersResolverMultibinder = Multibinder.newSetBinder(binder(), FactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(GithubFactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(BitbucketServerAuthorizingFactoryParametersResolver.class);
    factoryParametersResolverMultibinder.addBinding().to(GitlabFactoryParametersResolver.class);
    Multibinder<ScmFileResolver> scmFileResolverResolverMultibinder = Multibinder.newSetBinder(binder(), ScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(GithubScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(GitlabScmFileResolver.class);
    scmFileResolverResolverMultibinder.addBinding().to(BitbucketServerScmFileResolver.class);
    install(new org.eclipse.che.api.factory.server.scm.KubernetesScmModule());
    install(new org.eclipse.che.api.factory.server.bitbucket.BitbucketServerModule());
    install(new org.eclipse.che.api.factory.server.gitlab.GitlabModule());
    install(new org.eclipse.che.api.factory.server.github.GithubModule());
    bind(org.eclipse.che.api.core.rest.ApiInfoService.class);
    bind(org.eclipse.che.api.ssh.server.SshService.class);
    bind(org.eclipse.che.api.user.server.UserService.class);
    bind(org.eclipse.che.api.user.server.ProfileService.class);
    bind(org.eclipse.che.api.user.server.PreferencesService.class);
    bind(org.eclipse.che.security.oauth.OAuthAuthenticationService.class);
    bind(org.eclipse.che.security.oauth1.OAuthAuthenticationService.class);
    install(new DevfileModule());
    bind(WorkspaceEntityProvider.class);
    bind(org.eclipse.che.api.workspace.server.TemporaryWorkspaceRemover.class);
    bind(org.eclipse.che.api.workspace.server.WorkspaceService.class);
    bind(org.eclipse.che.api.devfile.server.DevfileService.class);
    bind(org.eclipse.che.api.devfile.server.UserDevfileEntityProvider.class);
    install(new FactoryModuleBuilder().build(ServersCheckerFactory.class));
    Multibinder<InternalEnvironmentProvisioner> internalEnvironmentProvisioners = Multibinder.newSetBinder(binder(), InternalEnvironmentProvisioner.class);
    internalEnvironmentProvisioners.addBinding().to(EnvVarEnvironmentProvisioner.class);
    internalEnvironmentProvisioners.addBinding().to(MachineNameProvisioner.class);
    Multibinder<EnvVarProvider> envVarProviders = Multibinder.newSetBinder(binder(), EnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiEnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiInternalEnvVarProvider.class);
    envVarProviders.addBinding().to(CheApiExternalEnvVarProvider.class);
    envVarProviders.addBinding().to(MachineTokenEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceIdEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceNamespaceNameEnvVarProvider.class);
    envVarProviders.addBinding().to(WorkspaceNameEnvVarProvider.class);
    envVarProviders.addBinding().to(ProjectsRootEnvVariableProvider.class);
    Multibinder<LegacyEnvVarProvider> legacyEnvVarProviderMultibinders = Multibinder.newSetBinder(binder(), LegacyEnvVarProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(JavaOptsEnvVariableProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(MavenOptsEnvVariableProvider.class);
    legacyEnvVarProviderMultibinders.addBinding().to(AgentAuthEnableEnvVarProvider.class);
    bind(org.eclipse.che.api.workspace.server.event.WorkspaceJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.everrest.EverrestDownloadFileResponseFilter.class);
    bind(org.eclipse.che.everrest.ETagResponseFilter.class);
    // temporary solution
    bind(org.eclipse.che.api.workspace.server.event.RuntimeStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.MachineStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.ServerStatusJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.api.workspace.server.event.RuntimeLogJsonRpcMessenger.class).asEagerSingleton();
    bind(org.eclipse.che.security.oauth.OAuthAuthenticatorProvider.class).to(org.eclipse.che.security.oauth.OAuthAuthenticatorProviderImpl.class);
    install(new org.eclipse.che.api.core.rest.CoreRestModule());
    install(new org.eclipse.che.api.core.util.FileCleaner.FileCleanerModule());
    install(new org.eclipse.che.swagger.deploy.DocsModule());
    install(new org.eclipse.che.commons.schedule.executor.ScheduleModule());
    install(new org.eclipse.che.api.logger.deploy.LoggerModule());
    final Multibinder<MessageBodyAdapter> adaptersMultibinder = Multibinder.newSetBinder(binder(), MessageBodyAdapter.class);
    final MessageBodyAdapterInterceptor interceptor = new MessageBodyAdapterInterceptor();
    requestInjection(interceptor);
    bindInterceptor(subclassesOf(CheJsonProvider.class), names("readFrom"), interceptor);
    // system components
    install(new SystemModule());
    Multibinder<ServiceTermination> terminationMultiBinder = Multibinder.newSetBinder(binder(), ServiceTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.workspace.server.WorkspaceServiceTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.system.server.CronThreadPullTermination.class);
    terminationMultiBinder.addBinding().to(org.eclipse.che.api.workspace.server.hc.probe.ProbeSchedulerTermination.class);
    bind(DBTermination.class);
    final Map<String, String> persistenceProperties = new HashMap<>();
    persistenceProperties.put(PersistenceUnitProperties.TARGET_SERVER, "None");
    persistenceProperties.put(PersistenceUnitProperties.LOGGING_LOGGER, "DefaultLogger");
    persistenceProperties.put(PersistenceUnitProperties.LOGGING_LEVEL, "SEVERE");
    persistenceProperties.put(PersistenceUnitProperties.NON_JTA_DATASOURCE, "java:/comp/env/jdbc/che");
    bindConstant().annotatedWith(Names.named("jndi.datasource.name")).to("java:/comp/env/jdbc/che");
    String infrastructure = System.getenv("CHE_INFRASTRUCTURE_ACTIVE");
    install(new FactoryModuleBuilder().build(JwtProxyConfigBuilderFactory.class));
    install(new FactoryModuleBuilder().build(PassThroughProxyProvisionerFactory.class));
    installDefaultSecureServerExposer(infrastructure);
    install(new org.eclipse.che.security.oauth1.BitbucketModule());
    install(new GitLabModule());
    configureMultiUserMode(persistenceProperties, infrastructure);
    install(new com.google.inject.persist.jpa.JpaPersistModule("main").properties(persistenceProperties));
    if (OpenShiftInfrastructure.NAME.equals(infrastructure)) {
        install(new OpenShiftInfraModule());
    } else if (KubernetesInfrastructure.NAME.equals(infrastructure)) {
        install(new KubernetesInfraModule());
    }
    install(new CheJsonRpcWebSocketConfigurationModule());
    bind(org.eclipse.che.api.user.server.AppStatesPreferenceCleaner.class);
    MapBinder.newMapBinder(binder(), String.class, ChePluginsApplier.class);
    if (Boolean.valueOf(System.getenv("CHE_TRACING_ENABLED"))) {
        install(new org.eclipse.che.core.tracing.TracingModule());
    } else {
        install(new org.eclipse.che.core.tracing.NopTracingModule());
    }
    if (Boolean.valueOf(System.getenv("CHE_METRICS_ENABLED"))) {
        install(new org.eclipse.che.core.metrics.MetricsModule());
        install(new WsMasterMetricsModule());
        install(new InfrastructureMetricsModule());
    } else {
        install(new org.eclipse.che.core.metrics.NoopMetricsModule());
    }
    if (Boolean.valueOf(System.getenv("CHE_TRACING_ENABLED")) && Boolean.valueOf(System.getenv("CHE_METRICS_ENABLED"))) {
        install(new TracingMetricsModule());
    }
    install(new ExecutorWrapperModule());
    install(new OpenShiftOAuthModule());
}
Also used : HashMap(java.util.HashMap) GitLabModule(org.eclipse.che.security.oauth.GitLabModule) FactoryEditValidator(org.eclipse.che.api.factory.server.FactoryEditValidator) CheJsonProvider(org.eclipse.che.api.core.rest.CheJsonProvider) MessageBodyAdapter(org.eclipse.che.api.core.rest.MessageBodyAdapter) DevfileModule(org.eclipse.che.api.workspace.server.devfile.DevfileModule) ServiceTermination(org.eclipse.che.api.system.server.ServiceTermination) WorkspaceStatusCache(org.eclipse.che.api.workspace.server.WorkspaceStatusCache) SystemModule(org.eclipse.che.api.system.server.SystemModule) ServersCheckerFactory(org.eclipse.che.api.workspace.server.hc.ServersCheckerFactory) FactoryCreateValidator(org.eclipse.che.api.factory.server.FactoryCreateValidator) GithubScmFileResolver(org.eclipse.che.api.factory.server.github.GithubScmFileResolver) GitlabScmFileResolver(org.eclipse.che.api.factory.server.gitlab.GitlabScmFileResolver) BitbucketServerScmFileResolver(org.eclipse.che.api.factory.server.bitbucket.BitbucketServerScmFileResolver) ScmFileResolver(org.eclipse.che.api.factory.server.ScmFileResolver) InternalEnvironmentProvisioner(org.eclipse.che.api.workspace.server.spi.provision.InternalEnvironmentProvisioner) WsMasterMetricsModule(org.eclipse.che.api.metrics.WsMasterMetricsModule) KubernetesInfraModule(org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesInfraModule) MessageBodyAdapterInterceptor(org.eclipse.che.api.core.rest.MessageBodyAdapterInterceptor) CheApiEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiEnvVarProvider) MachineTokenEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.MachineTokenEnvVarProvider) WorkspaceNamespaceNameEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceNamespaceNameEnvVarProvider) CheApiInternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiInternalEnvVarProvider) AgentAuthEnableEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.AgentAuthEnableEnvVarProvider) CheApiExternalEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.CheApiExternalEnvVarProvider) EnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider) WorkspaceNameEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceNameEnvVarProvider) LegacyEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.LegacyEnvVarProvider) WorkspaceIdEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.WorkspaceIdEnvVarProvider) GitlabFactoryParametersResolver(org.eclipse.che.api.factory.server.gitlab.GitlabFactoryParametersResolver) FactoryParametersResolver(org.eclipse.che.api.factory.server.FactoryParametersResolver) GithubFactoryParametersResolver(org.eclipse.che.api.factory.server.github.GithubFactoryParametersResolver) BitbucketServerAuthorizingFactoryParametersResolver(org.eclipse.che.api.factory.server.bitbucket.BitbucketServerAuthorizingFactoryParametersResolver) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) PlaceholderReplacer(org.flywaydb.core.internal.util.PlaceholderReplacer) OpenShiftOAuthModule(org.eclipse.che.security.oauth.OpenShiftOAuthModule) SchemaInitializer(org.eclipse.che.core.db.schema.SchemaInitializer) LegacyEnvVarProvider(org.eclipse.che.api.workspace.server.spi.provision.env.LegacyEnvVarProvider) CheJsonRpcWebSocketConfigurationModule(org.eclipse.che.api.deploy.jsonrpc.CheJsonRpcWebSocketConfigurationModule) PassThroughProxyProvisionerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.PassThroughProxyProvisionerFactory) OpenShiftInfraModule(org.eclipse.che.workspace.infrastructure.openshift.OpenShiftInfraModule) InfrastructureMetricsModule(org.eclipse.che.workspace.infrastructure.metrics.InfrastructureMetricsModule) FactoryAcceptValidator(org.eclipse.che.api.factory.server.FactoryAcceptValidator) ExecutorWrapperModule(org.eclipse.che.commons.observability.deploy.ExecutorWrapperModule) JwtProxyConfigBuilderFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.secure.jwtproxy.factory.JwtProxyConfigBuilderFactory) TracingMetricsModule(org.eclipse.che.core.tracing.metrics.TracingMetricsModule)

Aggregations

FactoryModuleBuilder (com.google.inject.assistedinject.FactoryModuleBuilder)6 CheApiExternalEnvVarProvider (org.eclipse.che.api.workspace.server.spi.provision.env.CheApiExternalEnvVarProvider)6 CheApiInternalEnvVarProvider (org.eclipse.che.api.workspace.server.spi.provision.env.CheApiInternalEnvVarProvider)6 EnvVarProvider (org.eclipse.che.api.workspace.server.spi.provision.env.EnvVarProvider)6 TypeLiteral (com.google.inject.TypeLiteral)3 WorkspaceAttributeValidator (org.eclipse.che.api.workspace.server.WorkspaceAttributeValidator)3 RuntimeInfrastructure (org.eclipse.che.api.workspace.server.spi.RuntimeInfrastructure)3 InternalEnvironmentFactory (org.eclipse.che.api.workspace.server.spi.environment.InternalEnvironmentFactory)3 ChePluginsApplier (org.eclipse.che.api.workspace.server.wsplugins.ChePluginsApplier)3 JpaKubernetesRuntimeCacheModule (org.eclipse.che.workspace.infrastructure.kubernetes.cache.jpa.JpaKubernetesRuntimeCacheModule)3 NamespaceConfigurator (org.eclipse.che.workspace.infrastructure.kubernetes.namespace.configurator.NamespaceConfigurator)3 WorkspacePVCCleaner (org.eclipse.che.workspace.infrastructure.kubernetes.namespace.pvc.WorkspacePVCCleaner)3 WorkspaceVolumesStrategy (org.eclipse.che.workspace.infrastructure.kubernetes.namespace.pvc.WorkspaceVolumesStrategy)3 GatewayTlsProvisioner (org.eclipse.che.workspace.infrastructure.kubernetes.provision.GatewayTlsProvisioner)3 KubernetesCheApiExternalEnvVarProvider (org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiExternalEnvVarProvider)3 KubernetesCheApiInternalEnvVarProvider (org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesCheApiInternalEnvVarProvider)3 PreviewUrlCommandProvisioner (org.eclipse.che.workspace.infrastructure.kubernetes.provision.PreviewUrlCommandProvisioner)3 TlsProvisioner (org.eclipse.che.workspace.infrastructure.kubernetes.provision.TlsProvisioner)3 TrustedCAProvisioner (org.eclipse.che.workspace.infrastructure.kubernetes.provision.TrustedCAProvisioner)3 ServersConverter (org.eclipse.che.workspace.infrastructure.kubernetes.provision.server.ServersConverter)3