MetricsProxyContainerCluster extends ContainerCluster<MetricsProxyContainer> implements
        ApplicationDimensionsConfig.Producer,
        ConsumersConfig.Producer,
        MonitoringConfig.Producer,
        TelegrafConfig.Producer,
        MetricsNodesConfig.Producer { @Override public void getConfig(MetricsNodesConfig.Builder builder) { builder.node.addAll(MetricsNodesConfigGenerator.generate(getContainers())); } MetricsProxyContainerCluster(AbstractConfigProducer<?> parent, String name, DeployState deployState); @Override void getConfig(MetricsNodesConfig.Builder builder); @Override void getConfig(MonitoringConfig.Builder builder); @Override void getConfig(ConsumersConfig.Builder builder); @Override void getConfig(ApplicationDimensionsConfig.Builder builder); @Override void getConfig(TelegrafConfig.Builder builder); @Override void getConfig(ThreadpoolConfig.Builder builder); static final Logger log; }
@Test public void metrics_proxy_bundle_is_included_in_bundles_config() { VespaModel model = getModel(servicesWithAdminOnly(), self_hosted); var builder = new PlatformBundlesConfig.Builder(); model.getConfig(builder, CLUSTER_CONFIG_ID); PlatformBundlesConfig config = builder.build(); assertEquals(1, config.bundlePaths().size()); assertThat(config.bundlePaths(0), endsWith(METRICS_PROXY_BUNDLE_FILE.toString())); }
@Test public void cluster_is_prepared_so_that_application_metadata_config_is_produced() { VespaModel model = getModel(servicesWithAdminOnly(), self_hosted); var builder = new ApplicationMetadataConfig.Builder(); model.getConfig(builder, CLUSTER_CONFIG_ID); ApplicationMetadataConfig config = builder.build(); assertEquals(MockApplicationPackage.APPLICATION_GENERATION, config.generation()); assertEquals(MockApplicationPackage.APPLICATION_NAME, config.name()); assertEquals(MockApplicationPackage.DEPLOYED_BY_USER, config.user()); }