Search in sources :

Example 1 with InternalEnvironmentProvisioner

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

the class KubernetesInternalRuntime method provisionWorkspace.

protected void provisionWorkspace(Map<String, String> startOptions, KubernetesRuntimeContext<E> context, String workspaceId) throws InfrastructureException {
    // Tooling side car provisioner should be applied before other provisioners
    // because new machines may be provisioned there
    toolingProvisioner.provision(context.getIdentity(), startSynchronizer, context.getEnvironment(), startOptions);
    startSynchronizer.checkFailure();
    // changed into new machines that came during tooling provisioning
    for (InternalEnvironmentProvisioner envProvisioner : internalEnvironmentProvisioners) {
        envProvisioner.provision(context.getIdentity(), context.getEnvironment());
    }
    // commands might be updated during provisioning
    runtimeStates.updateCommands(context.getIdentity(), context.getEnvironment().getCommands());
    // Infrastructure specific provisioners should be applied last
    // because it converts all Workspace API model objects that comes
    // from previous provisioners into infrastructure specific objects
    kubernetesEnvironmentProvisioner.provision(context.getEnvironment(), context.getIdentity());
    secretAsContainerResourceProvisioner.provision(context.getEnvironment(), context.getIdentity(), namespace);
    LOG.debug("Provisioning of workspace '{}' completed.", workspaceId);
}
Also used : InternalEnvironmentProvisioner(org.eclipse.che.api.workspace.server.spi.provision.InternalEnvironmentProvisioner)

Example 2 with InternalEnvironmentProvisioner

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

the class KubernetesInternalRuntime method provisionWorkspace.

protected void provisionWorkspace(Map<String, String> startOptions, KubernetesRuntimeContext<E> context, String workspaceId) throws InfrastructureException {
    // Tooling side car provisioner should be applied before other provisioners
    // because new machines may be provisioned there
    toolingProvisioner.provision(context.getIdentity(), startSynchronizer, context.getEnvironment(), startOptions);
    startSynchronizer.checkFailure();
    // changed into new machines that came during tooling provisioning
    for (InternalEnvironmentProvisioner envProvisioner : internalEnvironmentProvisioners) {
        envProvisioner.provision(context.getIdentity(), context.getEnvironment());
    }
    // commands might be updated during provisioning
    runtimeStates.updateCommands(context.getIdentity(), context.getEnvironment().getCommands());
    // Infrastructure specific provisioners should be applied last
    // because it converts all Workspace API model objects that comes
    // from previous provisioners into infrastructure specific objects
    kubernetesEnvironmentProvisioner.provision(context.getEnvironment(), context.getIdentity());
    secretAsContainerResourceProvisioner.provision(context.getEnvironment(), context.getIdentity(), namespace);
    LOG.debug("Provisioning of workspace '{}' completed.", workspaceId);
}
Also used : InternalEnvironmentProvisioner(org.eclipse.che.api.workspace.server.spi.provision.InternalEnvironmentProvisioner)

Example 3 with InternalEnvironmentProvisioner

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

the class KubernetesInternalRuntimeTest method shouldReturnCommandsAfterRuntimeStart.

@Test
public void shouldReturnCommandsAfterRuntimeStart() throws Exception {
    // given
    CommandImpl commandToProvision = new CommandImpl("provisioned-command", "build", "env");
    doAnswer((Answer<Void>) invocationOnMock -> {
        k8sEnv.getCommands().add(commandToProvision);
        return null;
    }).when(internalEnvironmentProvisioner).provision(any(), any());
    internalRuntime.start(emptyMap());
    // when
    List<? extends Command> commands = internalRuntime.getCommands();
    // then
    assertEquals(commands.size(), 2);
    Optional<? extends Command> envCommandOpt = commands.stream().filter(c -> "envCommand".equals(c.getName())).findAny();
    assertTrue(envCommandOpt.isPresent());
    Command envCommand = envCommandOpt.get();
    assertEquals(envCommand.getCommandLine(), envCommand.getCommandLine());
    assertEquals(envCommand.getType(), envCommand.getType());
    Optional<? extends Command> provisionedCommandOpt = commands.stream().filter(c -> "provisioned-command".equals(c.getName())).findAny();
    assertTrue(provisionedCommandOpt.isPresent());
    Command provisionedCommand = provisionedCommandOpt.get();
    assertEquals(provisionedCommand.getCommandLine(), provisionedCommand.getCommandLine());
    assertEquals(provisionedCommand.getType(), provisionedCommand.getType());
}
Also used : CommandImpl(org.eclipse.che.api.workspace.server.model.impl.CommandImpl) KubernetesRuntimeCommandImpl(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesRuntimeCommandImpl) Arrays(java.util.Arrays) ServerStatus(org.eclipse.che.api.core.model.workspace.runtime.ServerStatus) KubernetesServerImpl(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesServerImpl) IntOrString(io.fabric8.kubernetes.api.model.IntOrString) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) CREATE_IN_CHE_INSTALLATION_NAMESPACE(org.eclipse.che.workspace.infrastructure.kubernetes.Annotations.CREATE_IN_CHE_INSTALLATION_NAMESPACE) KubernetesEnvironment(org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment) Test(org.testng.annotations.Test) Collections.singletonList(java.util.Collections.singletonList) KubernetesObjectUtil.putLabels(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesObjectUtil.putLabels) Mockito.doThrow(org.mockito.Mockito.doThrow) MockitoAnnotations(org.mockito.MockitoAnnotations) KubernetesRuntimeState(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesRuntimeState) Arrays.asList(java.util.Arrays.asList) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Map(java.util.Map) WorkspaceExposureType(org.eclipse.che.workspace.infrastructure.kubernetes.server.WorkspaceExposureType) IngressBackend(io.fabric8.kubernetes.api.model.networking.v1.IngressBackend) ServiceExposureStrategyProvider(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.ServiceExposureStrategyProvider) Mockito.doReturn(org.mockito.Mockito.doReturn) Assert.assertFalse(org.testng.Assert.assertFalse) KubernetesConfigsMaps(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesConfigsMaps) KubernetesDeployments(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesDeployments) Mockito.atLeastOnce(org.mockito.Mockito.atLeastOnce) Set(java.util.Set) KubernetesMachineCache(org.eclipse.che.workspace.infrastructure.kubernetes.cache.KubernetesMachineCache) IngressPathTransformInverter(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.IngressPathTransformInverter) SidecarToolingProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.wsplugins.SidecarToolingProvisioner) Mockito.doNothing(org.mockito.Mockito.doNothing) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) Executors(java.util.concurrent.Executors) RuntimeStartInterruptedException(org.eclipse.che.api.workspace.server.spi.RuntimeStartInterruptedException) UnrecoverablePodEventListenerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.util.UnrecoverablePodEventListenerFactory) ObjectMeta(io.fabric8.kubernetes.api.model.ObjectMeta) RuntimeIdentity(org.eclipse.che.api.core.model.workspace.runtime.RuntimeIdentity) LogWatcher(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.log.LogWatcher) Mockito.mock(org.mockito.Mockito.mock) MachineStatus(org.eclipse.che.api.core.model.workspace.runtime.MachineStatus) InternalEnvironmentProvisioner(org.eclipse.che.api.workspace.server.spi.provision.InternalEnvironmentProvisioner) Mock(org.mockito.Mock) CommandImpl(org.eclipse.che.api.workspace.server.model.impl.CommandImpl) ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortBuilder) Mockito.spy(org.mockito.Mockito.spy) KubernetesMachineImpl(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesMachineImpl) ArrayList(java.util.ArrayList) CheNamespace(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.CheNamespace) ServersChecker(org.eclipse.che.api.workspace.server.hc.ServersChecker) KubernetesNamespace(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespace) Answer(org.mockito.stubbing.Answer) Stream.concat(java.util.stream.Stream.concat) ProbeScheduler(org.eclipse.che.api.workspace.server.hc.probe.ProbeScheduler) LogWatchTimeouts(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.log.LogWatchTimeouts) KubernetesSecrets(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesSecrets) Pod(io.fabric8.kubernetes.api.model.Pod) MachineStatusEvent(org.eclipse.che.api.workspace.shared.dto.event.MachineStatusEvent) KubernetesIngresses(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesIngresses) Mockito.times(org.mockito.Mockito.times) ConfigMap(io.fabric8.kubernetes.api.model.ConfigMap) ConfigMapBuilder(io.fabric8.kubernetes.api.model.ConfigMapBuilder) ContainerPort(io.fabric8.kubernetes.api.model.ContainerPort) Mockito.never(org.mockito.Mockito.never) KubernetesRuntimeStateCache(org.eclipse.che.workspace.infrastructure.kubernetes.cache.KubernetesRuntimeStateCache) PodData(org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment.PodData) DEBUG_WORKSPACE_START_LOG_LIMIT_BYTES(org.eclipse.che.api.workspace.shared.Constants.DEBUG_WORKSPACE_START_LOG_LIMIT_BYTES) PodEvent(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.event.PodEvent) ServersCheckerFactory(org.eclipse.che.api.workspace.server.hc.ServersCheckerFactory) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) Date(java.util.Date) DtoConverter(org.eclipse.che.api.workspace.server.DtoConverter) ServicePort(io.fabric8.kubernetes.api.model.ServicePort) ServiceBackendPort(io.fabric8.kubernetes.api.model.networking.v1.ServiceBackendPort) KubernetesPreviewUrlCommandProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesPreviewUrlCommandProvisioner) Collectors.toMap(java.util.stream.Collectors.toMap) IngressRule(io.fabric8.kubernetes.api.model.networking.v1.IngressRule) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) PodBuilder(io.fabric8.kubernetes.api.model.PodBuilder) KubernetesServices(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesServices) PodEvents(org.eclipse.che.workspace.infrastructure.kubernetes.util.PodEvents) ParseException(java.text.ParseException) StateException(org.eclipse.che.api.workspace.server.spi.StateException) KubernetesObjectUtil.putAnnotations(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesObjectUtil.putAnnotations) EventService(org.eclipse.che.api.core.notification.EventService) Command(org.eclipse.che.api.core.model.workspace.config.Command) PodLogHandler(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.log.PodLogHandler) WorkspaceProbes(org.eclipse.che.api.workspace.server.hc.probe.WorkspaceProbes) ImmutableSet(com.google.common.collect.ImmutableSet) ImmutableMap(com.google.common.collect.ImmutableMap) KubernetesServerResolverFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.resolver.KubernetesServerResolverFactory) Collections.emptyList(java.util.Collections.emptyList) Predicate(java.util.function.Predicate) MULTI_HOST_STRATEGY(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.MultiHostExternalServiceExposureStrategy.MULTI_HOST_STRATEGY) DtoFactory.newDto(org.eclipse.che.dto.server.DtoFactory.newDto) URLRewriter(org.eclipse.che.api.workspace.server.URLRewriter) BeforeMethod(org.testng.annotations.BeforeMethod) STARTING(org.eclipse.che.api.core.model.workspace.runtime.MachineStatus.STARTING) InternalMachineConfig(org.eclipse.che.api.workspace.server.spi.environment.InternalMachineConfig) KubernetesSharedPool(org.eclipse.che.workspace.infrastructure.kubernetes.util.KubernetesSharedPool) InfrastructureException(org.eclipse.che.api.workspace.server.spi.InfrastructureException) List(java.util.List) WorkspaceVolumesStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.pvc.WorkspaceVolumesStrategy) RuntimeIdentityImpl(org.eclipse.che.api.workspace.server.model.impl.RuntimeIdentityImpl) IngressServiceBackend(io.fabric8.kubernetes.api.model.networking.v1.IngressServiceBackend) Ingress(io.fabric8.kubernetes.api.model.networking.v1.Ingress) Entry(java.util.Map.Entry) KubernetesRuntimeCommandImpl(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesRuntimeCommandImpl) Secret(io.fabric8.kubernetes.api.model.Secret) Optional(java.util.Optional) WorkspaceProbesFactory(org.eclipse.che.api.workspace.server.hc.probe.WorkspaceProbesFactory) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) ServiceSpec(io.fabric8.kubernetes.api.model.ServiceSpec) NoopExecutorServiceWrapper(org.eclipse.che.commons.observability.NoopExecutorServiceWrapper) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) Container(io.fabric8.kubernetes.api.model.Container) DataProvider(org.testng.annotations.DataProvider) DEBUG_WORKSPACE_START(org.eclipse.che.api.workspace.shared.Constants.DEBUG_WORKSPACE_START) Assert.assertEquals(org.testng.Assert.assertEquals) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) ServerResolver(org.eclipse.che.workspace.infrastructure.kubernetes.server.resolver.ServerResolver) Captor(org.mockito.Captor) HashSet(java.util.HashSet) InternalInfrastructureException(org.eclipse.che.api.workspace.server.spi.InternalInfrastructureException) ArgumentCaptor(org.mockito.ArgumentCaptor) ImmutableList(com.google.common.collect.ImmutableList) IngressSpec(io.fabric8.kubernetes.api.model.networking.v1.IngressSpec) Collections.singletonMap(java.util.Collections.singletonMap) Service(io.fabric8.kubernetes.api.model.Service) RUNNING(org.eclipse.che.api.core.model.workspace.runtime.MachineStatus.RUNNING) LinkedList(java.util.LinkedList) RuntimeEventsPublisher(org.eclipse.che.workspace.infrastructure.kubernetes.util.RuntimeEventsPublisher) Collections.emptyMap(java.util.Collections.emptyMap) MachineId(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesMachineImpl.MachineId) Answers(org.mockito.Answers) InOrder(org.mockito.InOrder) Tracer(io.opentracing.Tracer) RuntimeLogEvent(org.eclipse.che.api.workspace.shared.dto.event.RuntimeLogEvent) IntOrStringBuilder(io.fabric8.kubernetes.api.model.IntOrStringBuilder) Assert.fail(org.testng.Assert.fail) WorkspaceStatus(org.eclipse.che.api.core.model.workspace.WorkspaceStatus) SecretAsContainerResourceProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.secret.SecretAsContainerResourceProvisioner) Mockito.when(org.mockito.Mockito.when) DeploymentBuilder(io.fabric8.kubernetes.api.model.apps.DeploymentBuilder) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) Mockito(org.mockito.Mockito) Collectors.toList(java.util.stream.Collectors.toList) CHE_ORIGINAL_NAME_LABEL(org.eclipse.che.workspace.infrastructure.kubernetes.Constants.CHE_ORIGINAL_NAME_LABEL) Assert.assertTrue(org.testng.Assert.assertTrue) ContainerPortBuilder(io.fabric8.kubernetes.api.model.ContainerPortBuilder) Deployment(io.fabric8.kubernetes.api.model.apps.Deployment) Command(org.eclipse.che.api.core.model.workspace.config.Command) Test(org.testng.annotations.Test)

Example 4 with InternalEnvironmentProvisioner

use of org.eclipse.che.api.workspace.server.spi.provision.InternalEnvironmentProvisioner 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 InternalEnvironmentProvisioner

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

the class KubernetesInternalRuntimeTest method shouldReturnCommandsAfterRuntimeStart.

@Test
public void shouldReturnCommandsAfterRuntimeStart() throws Exception {
    // given
    CommandImpl commandToProvision = new CommandImpl("provisioned-command", "build", "env");
    doAnswer((Answer<Void>) invocationOnMock -> {
        k8sEnv.getCommands().add(commandToProvision);
        return null;
    }).when(internalEnvironmentProvisioner).provision(any(), any());
    internalRuntime.start(emptyMap());
    // when
    List<? extends Command> commands = internalRuntime.getCommands();
    // then
    assertEquals(commands.size(), 2);
    Optional<? extends Command> envCommandOpt = commands.stream().filter(c -> "envCommand".equals(c.getName())).findAny();
    assertTrue(envCommandOpt.isPresent());
    Command envCommand = envCommandOpt.get();
    assertEquals(envCommand.getCommandLine(), envCommand.getCommandLine());
    assertEquals(envCommand.getType(), envCommand.getType());
    Optional<? extends Command> provisionedCommandOpt = commands.stream().filter(c -> "provisioned-command".equals(c.getName())).findAny();
    assertTrue(provisionedCommandOpt.isPresent());
    Command provisionedCommand = provisionedCommandOpt.get();
    assertEquals(provisionedCommand.getCommandLine(), provisionedCommand.getCommandLine());
    assertEquals(provisionedCommand.getType(), provisionedCommand.getType());
}
Also used : CommandImpl(org.eclipse.che.api.workspace.server.model.impl.CommandImpl) KubernetesRuntimeCommandImpl(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesRuntimeCommandImpl) Arrays(java.util.Arrays) ServerStatus(org.eclipse.che.api.core.model.workspace.runtime.ServerStatus) KubernetesServerImpl(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesServerImpl) IntOrString(io.fabric8.kubernetes.api.model.IntOrString) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) CREATE_IN_CHE_INSTALLATION_NAMESPACE(org.eclipse.che.workspace.infrastructure.kubernetes.Annotations.CREATE_IN_CHE_INSTALLATION_NAMESPACE) KubernetesEnvironment(org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment) Test(org.testng.annotations.Test) Collections.singletonList(java.util.Collections.singletonList) KubernetesObjectUtil.putLabels(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesObjectUtil.putLabels) Mockito.doThrow(org.mockito.Mockito.doThrow) MockitoAnnotations(org.mockito.MockitoAnnotations) KubernetesRuntimeState(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesRuntimeState) Arrays.asList(java.util.Arrays.asList) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Map(java.util.Map) WorkspaceExposureType(org.eclipse.che.workspace.infrastructure.kubernetes.server.WorkspaceExposureType) IngressBackend(io.fabric8.kubernetes.api.model.networking.v1.IngressBackend) ServiceExposureStrategyProvider(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.ServiceExposureStrategyProvider) Mockito.doReturn(org.mockito.Mockito.doReturn) Assert.assertFalse(org.testng.Assert.assertFalse) KubernetesConfigsMaps(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesConfigsMaps) KubernetesDeployments(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesDeployments) Mockito.atLeastOnce(org.mockito.Mockito.atLeastOnce) Set(java.util.Set) KubernetesMachineCache(org.eclipse.che.workspace.infrastructure.kubernetes.cache.KubernetesMachineCache) IngressPathTransformInverter(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.IngressPathTransformInverter) SidecarToolingProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.wsplugins.SidecarToolingProvisioner) Mockito.doNothing(org.mockito.Mockito.doNothing) HasMetadata(io.fabric8.kubernetes.api.model.HasMetadata) Executors(java.util.concurrent.Executors) RuntimeStartInterruptedException(org.eclipse.che.api.workspace.server.spi.RuntimeStartInterruptedException) UnrecoverablePodEventListenerFactory(org.eclipse.che.workspace.infrastructure.kubernetes.util.UnrecoverablePodEventListenerFactory) ObjectMeta(io.fabric8.kubernetes.api.model.ObjectMeta) RuntimeIdentity(org.eclipse.che.api.core.model.workspace.runtime.RuntimeIdentity) LogWatcher(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.log.LogWatcher) Mockito.mock(org.mockito.Mockito.mock) MachineStatus(org.eclipse.che.api.core.model.workspace.runtime.MachineStatus) InternalEnvironmentProvisioner(org.eclipse.che.api.workspace.server.spi.provision.InternalEnvironmentProvisioner) Mock(org.mockito.Mock) CommandImpl(org.eclipse.che.api.workspace.server.model.impl.CommandImpl) ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortBuilder) Mockito.spy(org.mockito.Mockito.spy) KubernetesMachineImpl(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesMachineImpl) ArrayList(java.util.ArrayList) CheNamespace(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.CheNamespace) ServersChecker(org.eclipse.che.api.workspace.server.hc.ServersChecker) KubernetesNamespace(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesNamespace) Answer(org.mockito.stubbing.Answer) Stream.concat(java.util.stream.Stream.concat) ProbeScheduler(org.eclipse.che.api.workspace.server.hc.probe.ProbeScheduler) LogWatchTimeouts(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.log.LogWatchTimeouts) KubernetesSecrets(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesSecrets) Pod(io.fabric8.kubernetes.api.model.Pod) MachineStatusEvent(org.eclipse.che.api.workspace.shared.dto.event.MachineStatusEvent) KubernetesIngresses(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesIngresses) Mockito.times(org.mockito.Mockito.times) ConfigMap(io.fabric8.kubernetes.api.model.ConfigMap) ConfigMapBuilder(io.fabric8.kubernetes.api.model.ConfigMapBuilder) ContainerPort(io.fabric8.kubernetes.api.model.ContainerPort) Mockito.never(org.mockito.Mockito.never) KubernetesRuntimeStateCache(org.eclipse.che.workspace.infrastructure.kubernetes.cache.KubernetesRuntimeStateCache) PodData(org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment.PodData) DEBUG_WORKSPACE_START_LOG_LIMIT_BYTES(org.eclipse.che.api.workspace.shared.Constants.DEBUG_WORKSPACE_START_LOG_LIMIT_BYTES) PodEvent(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.event.PodEvent) ServersCheckerFactory(org.eclipse.che.api.workspace.server.hc.ServersCheckerFactory) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) Date(java.util.Date) DtoConverter(org.eclipse.che.api.workspace.server.DtoConverter) ServicePort(io.fabric8.kubernetes.api.model.ServicePort) ServiceBackendPort(io.fabric8.kubernetes.api.model.networking.v1.ServiceBackendPort) KubernetesPreviewUrlCommandProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.KubernetesPreviewUrlCommandProvisioner) Collectors.toMap(java.util.stream.Collectors.toMap) IngressRule(io.fabric8.kubernetes.api.model.networking.v1.IngressRule) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) PodBuilder(io.fabric8.kubernetes.api.model.PodBuilder) KubernetesServices(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesServices) PodEvents(org.eclipse.che.workspace.infrastructure.kubernetes.util.PodEvents) ParseException(java.text.ParseException) StateException(org.eclipse.che.api.workspace.server.spi.StateException) KubernetesObjectUtil.putAnnotations(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.KubernetesObjectUtil.putAnnotations) EventService(org.eclipse.che.api.core.notification.EventService) Command(org.eclipse.che.api.core.model.workspace.config.Command) PodLogHandler(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.log.PodLogHandler) WorkspaceProbes(org.eclipse.che.api.workspace.server.hc.probe.WorkspaceProbes) ImmutableSet(com.google.common.collect.ImmutableSet) ImmutableMap(com.google.common.collect.ImmutableMap) KubernetesServerResolverFactory(org.eclipse.che.workspace.infrastructure.kubernetes.server.resolver.KubernetesServerResolverFactory) Collections.emptyList(java.util.Collections.emptyList) Predicate(java.util.function.Predicate) MULTI_HOST_STRATEGY(org.eclipse.che.workspace.infrastructure.kubernetes.server.external.MultiHostExternalServiceExposureStrategy.MULTI_HOST_STRATEGY) DtoFactory.newDto(org.eclipse.che.dto.server.DtoFactory.newDto) URLRewriter(org.eclipse.che.api.workspace.server.URLRewriter) BeforeMethod(org.testng.annotations.BeforeMethod) STARTING(org.eclipse.che.api.core.model.workspace.runtime.MachineStatus.STARTING) InternalMachineConfig(org.eclipse.che.api.workspace.server.spi.environment.InternalMachineConfig) KubernetesSharedPool(org.eclipse.che.workspace.infrastructure.kubernetes.util.KubernetesSharedPool) InfrastructureException(org.eclipse.che.api.workspace.server.spi.InfrastructureException) List(java.util.List) WorkspaceVolumesStrategy(org.eclipse.che.workspace.infrastructure.kubernetes.namespace.pvc.WorkspaceVolumesStrategy) RuntimeIdentityImpl(org.eclipse.che.api.workspace.server.model.impl.RuntimeIdentityImpl) IngressServiceBackend(io.fabric8.kubernetes.api.model.networking.v1.IngressServiceBackend) Ingress(io.fabric8.kubernetes.api.model.networking.v1.Ingress) Entry(java.util.Map.Entry) KubernetesRuntimeCommandImpl(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesRuntimeCommandImpl) Secret(io.fabric8.kubernetes.api.model.Secret) Optional(java.util.Optional) WorkspaceProbesFactory(org.eclipse.che.api.workspace.server.hc.probe.WorkspaceProbesFactory) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) ServiceSpec(io.fabric8.kubernetes.api.model.ServiceSpec) NoopExecutorServiceWrapper(org.eclipse.che.commons.observability.NoopExecutorServiceWrapper) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) Container(io.fabric8.kubernetes.api.model.Container) DataProvider(org.testng.annotations.DataProvider) DEBUG_WORKSPACE_START(org.eclipse.che.api.workspace.shared.Constants.DEBUG_WORKSPACE_START) Assert.assertEquals(org.testng.Assert.assertEquals) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) ServerResolver(org.eclipse.che.workspace.infrastructure.kubernetes.server.resolver.ServerResolver) Captor(org.mockito.Captor) HashSet(java.util.HashSet) InternalInfrastructureException(org.eclipse.che.api.workspace.server.spi.InternalInfrastructureException) ArgumentCaptor(org.mockito.ArgumentCaptor) ImmutableList(com.google.common.collect.ImmutableList) IngressSpec(io.fabric8.kubernetes.api.model.networking.v1.IngressSpec) Collections.singletonMap(java.util.Collections.singletonMap) Service(io.fabric8.kubernetes.api.model.Service) RUNNING(org.eclipse.che.api.core.model.workspace.runtime.MachineStatus.RUNNING) LinkedList(java.util.LinkedList) RuntimeEventsPublisher(org.eclipse.che.workspace.infrastructure.kubernetes.util.RuntimeEventsPublisher) Collections.emptyMap(java.util.Collections.emptyMap) MachineId(org.eclipse.che.workspace.infrastructure.kubernetes.model.KubernetesMachineImpl.MachineId) Answers(org.mockito.Answers) InOrder(org.mockito.InOrder) Tracer(io.opentracing.Tracer) RuntimeLogEvent(org.eclipse.che.api.workspace.shared.dto.event.RuntimeLogEvent) IntOrStringBuilder(io.fabric8.kubernetes.api.model.IntOrStringBuilder) Assert.fail(org.testng.Assert.fail) WorkspaceStatus(org.eclipse.che.api.core.model.workspace.WorkspaceStatus) SecretAsContainerResourceProvisioner(org.eclipse.che.workspace.infrastructure.kubernetes.provision.secret.SecretAsContainerResourceProvisioner) Mockito.when(org.mockito.Mockito.when) DeploymentBuilder(io.fabric8.kubernetes.api.model.apps.DeploymentBuilder) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) Mockito(org.mockito.Mockito) Collectors.toList(java.util.stream.Collectors.toList) CHE_ORIGINAL_NAME_LABEL(org.eclipse.che.workspace.infrastructure.kubernetes.Constants.CHE_ORIGINAL_NAME_LABEL) Assert.assertTrue(org.testng.Assert.assertTrue) ContainerPortBuilder(io.fabric8.kubernetes.api.model.ContainerPortBuilder) Deployment(io.fabric8.kubernetes.api.model.apps.Deployment) Command(org.eclipse.che.api.core.model.workspace.config.Command) Test(org.testng.annotations.Test)

Aggregations

InternalEnvironmentProvisioner (org.eclipse.che.api.workspace.server.spi.provision.InternalEnvironmentProvisioner)6 HashMap (java.util.HashMap)4 ServersCheckerFactory (org.eclipse.che.api.workspace.server.hc.ServersCheckerFactory)4 ImmutableList (com.google.common.collect.ImmutableList)2 ImmutableMap (com.google.common.collect.ImmutableMap)2 ImmutableSet (com.google.common.collect.ImmutableSet)2 FactoryModuleBuilder (com.google.inject.assistedinject.FactoryModuleBuilder)2 ConfigMap (io.fabric8.kubernetes.api.model.ConfigMap)2 ConfigMapBuilder (io.fabric8.kubernetes.api.model.ConfigMapBuilder)2 Container (io.fabric8.kubernetes.api.model.Container)2 ContainerPort (io.fabric8.kubernetes.api.model.ContainerPort)2 ContainerPortBuilder (io.fabric8.kubernetes.api.model.ContainerPortBuilder)2 HasMetadata (io.fabric8.kubernetes.api.model.HasMetadata)2 IntOrString (io.fabric8.kubernetes.api.model.IntOrString)2 IntOrStringBuilder (io.fabric8.kubernetes.api.model.IntOrStringBuilder)2 ObjectMeta (io.fabric8.kubernetes.api.model.ObjectMeta)2 Pod (io.fabric8.kubernetes.api.model.Pod)2 PodBuilder (io.fabric8.kubernetes.api.model.PodBuilder)2 Secret (io.fabric8.kubernetes.api.model.Secret)2 Service (io.fabric8.kubernetes.api.model.Service)2