Search in sources :

Example 1 with AutoScalingModule

use of com.netflix.titus.master.appscale.endpoint.v3.AutoScalingModule in project titus-control-plane by Netflix.

the class TitusMasterModule method configure.

@Override
protected void configure() {
    // Configuration
    bind(CellInfoResolver.class).to(ConfigurableCellInfoResolver.class);
    // Titus supervisor
    install(new SupervisorServiceModule());
    install(new SupervisorEndpointModule());
    install(new TitusEntitySanitizerModule());
    // Feature flags
    install(new FeatureFlagModule());
    // Kubernetes
    Preconditions.checkNotNull(mode, "Kube mode not set");
    if (mode == Mode.KUBE) {
        install(new KubeModule());
    } else if (mode == Mode.EMBEDDED_KUBE) {
        install(new KubeControllerModule());
        install(new KubePodModule());
    }
    // Storage
    install(new StoreModule());
    // Service
    install(new AuditModule());
    install(new SchedulerModule());
    install(new V3JobManagerModule());
    install(new ContainerHealthServiceModule());
    Multibinder.newSetBinder(binder(), ContainerHealthService.class).addBinding().to(AlwaysHealthyContainerHealthService.class);
    install(new ManagementModule());
    // REST/GRPC
    bind(V3EndpointModule.V3_LOG_STORAGE_INFO).toInstance(EmptyLogStorageInfo.INSTANCE);
    bind(ContextResolver.class).toInstance(EmptyContextResolver.INSTANCE);
    if (enableREST) {
        install(new GovernatorJerseySupportModule());
        // This should be in JerseyModule, but overrides get broken if we do that (possibly Governator bug).
        bind(HttpCallerIdResolver.class).to(ByRemoteAddressHttpCallerIdResolver.class);
        bind(HostCallerIdResolver.class).to(NoOpHostCallerIdResolver.class);
        install(new JerseyModule());
    }
    install(new JobCoordinatorAdmissionModule());
    install(new MasterEndpointModule());
    install(new HealthModule());
    install(new V3EndpointModule());
    install(new AutoScalingModule());
    install(new LoadBalancerModule());
    install(new EvictionServiceModule());
    install(new EvictionEndpointModule());
}
Also used : CellInfoResolver(com.netflix.titus.master.config.CellInfoResolver) ConfigurableCellInfoResolver(com.netflix.titus.master.config.ConfigurableCellInfoResolver) JerseyModule(com.netflix.titus.master.endpoint.v2.rest.JerseyModule) SupervisorServiceModule(com.netflix.titus.master.supervisor.service.SupervisorServiceModule) EvictionServiceModule(com.netflix.titus.master.eviction.service.EvictionServiceModule) GovernatorJerseySupportModule(com.netflix.governator.guice.jersey.GovernatorJerseySupportModule) V3JobManagerModule(com.netflix.titus.master.jobmanager.service.V3JobManagerModule) EvictionEndpointModule(com.netflix.titus.master.eviction.endpoint.grpc.EvictionEndpointModule) KubeControllerModule(com.netflix.titus.master.kubernetes.controller.KubeControllerModule) FeatureFlagModule(com.netflix.titus.runtime.FeatureFlagModule) ByRemoteAddressHttpCallerIdResolver(com.netflix.titus.runtime.endpoint.resolver.ByRemoteAddressHttpCallerIdResolver) HttpCallerIdResolver(com.netflix.titus.runtime.endpoint.resolver.HttpCallerIdResolver) KubeModule(com.netflix.titus.master.kubernetes.KubeModule) ManagementModule(com.netflix.titus.master.service.management.ManagementModule) AutoScalingModule(com.netflix.titus.master.appscale.endpoint.v3.AutoScalingModule) ContainerHealthServiceModule(com.netflix.titus.runtime.containerhealth.service.ContainerHealthServiceModule) SupervisorEndpointModule(com.netflix.titus.master.supervisor.endpoint.SupervisorEndpointModule) StoreModule(com.netflix.titus.master.store.StoreModule) SchedulerModule(com.netflix.titus.master.scheduler.SchedulerModule) HealthModule(com.netflix.titus.master.health.HealthModule) JobCoordinatorAdmissionModule(com.netflix.titus.master.endpoint.admission.JobCoordinatorAdmissionModule) V3EndpointModule(com.netflix.titus.master.jobmanager.endpoint.v3.V3EndpointModule) MasterEndpointModule(com.netflix.titus.master.endpoint.MasterEndpointModule) LoadBalancerModule(com.netflix.titus.master.loadbalancer.LoadBalancerModule) KubePodModule(com.netflix.titus.master.kubernetes.pod.KubePodModule) AuditModule(com.netflix.titus.master.audit.service.AuditModule) EmptyContextResolver(com.netflix.titus.master.endpoint.common.EmptyContextResolver) ContextResolver(com.netflix.titus.master.endpoint.common.ContextResolver) TitusEntitySanitizerModule(com.netflix.titus.runtime.TitusEntitySanitizerModule) NoOpHostCallerIdResolver(com.netflix.titus.runtime.endpoint.resolver.NoOpHostCallerIdResolver) HostCallerIdResolver(com.netflix.titus.runtime.endpoint.resolver.HostCallerIdResolver)

Aggregations

GovernatorJerseySupportModule (com.netflix.governator.guice.jersey.GovernatorJerseySupportModule)1 AutoScalingModule (com.netflix.titus.master.appscale.endpoint.v3.AutoScalingModule)1 AuditModule (com.netflix.titus.master.audit.service.AuditModule)1 CellInfoResolver (com.netflix.titus.master.config.CellInfoResolver)1 ConfigurableCellInfoResolver (com.netflix.titus.master.config.ConfigurableCellInfoResolver)1 MasterEndpointModule (com.netflix.titus.master.endpoint.MasterEndpointModule)1 JobCoordinatorAdmissionModule (com.netflix.titus.master.endpoint.admission.JobCoordinatorAdmissionModule)1 ContextResolver (com.netflix.titus.master.endpoint.common.ContextResolver)1 EmptyContextResolver (com.netflix.titus.master.endpoint.common.EmptyContextResolver)1 JerseyModule (com.netflix.titus.master.endpoint.v2.rest.JerseyModule)1 EvictionEndpointModule (com.netflix.titus.master.eviction.endpoint.grpc.EvictionEndpointModule)1 EvictionServiceModule (com.netflix.titus.master.eviction.service.EvictionServiceModule)1 HealthModule (com.netflix.titus.master.health.HealthModule)1 V3EndpointModule (com.netflix.titus.master.jobmanager.endpoint.v3.V3EndpointModule)1 V3JobManagerModule (com.netflix.titus.master.jobmanager.service.V3JobManagerModule)1 KubeModule (com.netflix.titus.master.kubernetes.KubeModule)1 KubeControllerModule (com.netflix.titus.master.kubernetes.controller.KubeControllerModule)1 KubePodModule (com.netflix.titus.master.kubernetes.pod.KubePodModule)1 LoadBalancerModule (com.netflix.titus.master.loadbalancer.LoadBalancerModule)1 SchedulerModule (com.netflix.titus.master.scheduler.SchedulerModule)1