From aa6d15d0e920fdf37ef003ca765f83c6a38bd7d4 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Tue, 12 Nov 2024 18:04:42 +0530 Subject: [PATCH 01/28] feat: common namespace --- templates.tf | 20 +++++++++++--------- templates/apiary-hms-readonly.json | 2 +- templates/apiary-hms-readwrite.json | 2 +- variables.tf | 13 +++++++++++++ 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/templates.tf b/templates.tf index af1cfdd..8ff1f7a 100644 --- a/templates.tf +++ b/templates.tf @@ -117,14 +117,16 @@ locals{ mysql_user_cred_arn = data.aws_secretsmanager_secret.db_ro_user.arn # Datadog variables - datadog_agent_enabled = var.datadog_agent_enabled - datadog_secret_key = length(var.datadog_key_secret_name) > 0 ? chomp(data.external.datadog_key[0].result["api_key"]) : "" - wd_instance_type = var.hms_instance_type - metrics_port = var.datadog_metrics_port - datadog_agent_version = var.datadog_agent_version - datadog_tags = local.datadog_tags - tcp_keepalive_time = var.tcp_keepalive_time - tcp_keepalive_intvl = var.tcp_keepalive_intvl - tcp_keepalive_probes = var.tcp_keepalive_probes + datadog_agent_enabled = var.datadog_agent_enabled + datadog_secret_key = length(var.datadog_key_secret_name) > 0 ? chomp(data.external.datadog_key[0].result["api_key"]) : "" + wd_instance_type = var.hms_instance_type + metrics_port = var.datadog_metrics_port + datadog_agent_version = var.datadog_agent_version + datadog_tags = local.datadog_tags + tcp_keepalive_time = var.tcp_keepalive_time + tcp_keepalive_intvl = var.tcp_keepalive_intvl + tcp_keepalive_probes = var.tcp_keepalive_probes + hms_readwrite_namespace = var.hms_readwrite_namespace + hms_readonly_namespace = var.hms_readonly_namespace }) } diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index 20c4f82..f610664 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"hms_readonly_legacy\", \"metrics\": [\"metrics_classloading_loaded_value\", \"metrics_threads_count_value\", \"metrics_memory_heap_max_value\", \"metrics_init_total_count_tables_value\", \"metrics_init_total_count_dbs_value\", \"metrics_memory_heap_used_value\", \"metrics_init_total_count_partitions_value\", \"jvm_threads_current\", \"jvm_threads_started_total\", \"jvm_memory_bytes_used\", \"jvm_memory_bytes_init\", \"jvm_gc_collection_seconds_count\", \"jvm_gc_collection_seconds\", \"process_cpu_seconds_total\", \"java_lang_operatingsystem_processcpuload\", \"java_lang_operatingsystem_processcputime\", \"metrics_threads_runnable_count_value\", \"metrics_threads_waiting_count_value\", \"java_lang_memory_heapmemoryusage_used\", \"metrics_memory_heap_init_value\", \"metrics_api_get_partition_by_name_count\", \"metrics_api_get_partitions_by_names_count\", \"metrics_api_get_partition_names_count\", \"metrics_api_get_partitions_by_expr_count\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partition_count\", \"metrics_api_get_partitions_by_filter_count\", \"metrics_api_add_partitions_count\", \"metrics_api_add_partitions_req_count\", \"metrics_api_drop_partition_by_name_count\", \"metrics_api_add_partition_count\", \"metrics_api_alter_partitions_count\", \"metrics_api_create_table_count\", \"metrics_api_alter_table_with_cascade_count\", \"metrics_api_get_table_meta_count\", \"metrics_api_get_table_metas_count\", \"metrics_api_get_table_count\", \"metrics_api_alter_table_count\", \"metrics_api_get_tables_count\", \"metrics_api_get_all_tables_count\", \"metrics_api_drop_table_count\", \"metrics_api_get_multi_table_count\", \"metrics_api_get_database_count\", \"metrics_api_get_all_databases_count\", \"metrics_api_get_databases_count\", \"metrics_api_create_function_count\", \"metrics_api_getmetaconf_count\", \"metrics_api_alter_table_with_environment_context_count\", \"metrics_api_delete_column_statistics_by_table_count\", \"metrics_api_get_functions_count\", \"metrics_api_get_function_count\", \"metrics_api_shutdown_count\", \"metrics_api_flushcache_count\", \"metrics_api_get_indexes_count\", \"metrics_api_get_config_value_count\", \"metrics_api_set_ugi_count\", \"metrics_api_get_all_functions_count\", \"metrics_api_get_table_req_95thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_table_req_count\", \"metrics_api_get_table_req_max\", \"metrics_api_get_databases_count\", \"metrics_api_get_databases_95thpercentile\", \"metrics_api_get_databases_50thpercentile\", \"metrics_api_get_databases_max\", \"metrics_api_get_partitions_95thpercentile\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partitions_max\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_database_95thpercentile\", \"metrics_api_get_database_50thpercentile\", \"metrics_kafka_listener_failures_count\", \"metrics_kafka_listener_successes_count\", \"metrics_api_get_table_objects_by_name_req_max\" ], \"type_overrides\": { \"metrics_classloading_loaded_value\": \"gauge\", \"metrics_threads_count_value\": \"gauge\", \"metrics_memory_heap_max_value\": \"gauge\", \"metrics_init_total_count_tables_value\": \"gauge\", \"metrics_init_total_count_dbs_value\": \"gauge\", \"metrics_memory_heap_used_value\": \"gauge\", \"metrics_init_total_count_partitions_value\": \"gauge\", \"jvm_threads_current\": \"gauge\", \"jvm_threads_started_total\": \"gauge\", \"jvm_memory_bytes_used\": \"gauge\", \"jvm_memory_bytes_init\": \"gauge\", \"jvm_gc_collection_seconds_count\": \"gauge\", \"jvm_gc_collection_seconds\": \"gauge\", \"process_cpu_seconds_total\": \"gauge\", \"java_lang_operatingsystem_processcpuload\": \"gauge\", \"java_lang_operatingsystem_processcputime\": \"gauge\", \"metrics_threads_runnable_count_value\": \"gauge\", \"metrics_threads_waiting_count_value\": \"gauge\", \"java_lang_memory_heapmemoryusage_used\": \"gauge\", \"metrics_memory_heap_init_value\": \"gauge\", \"metrics_api_get_partition_by_name_count\": \"gauge\", \"metrics_api_get_partitions_by_names_count\": \"gauge\", \"metrics_api_get_partition_names_count\": \"gauge\", \"metrics_api_get_partitions_by_expr_count\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partition_count\": \"gauge\", \"metrics_api_get_partitions_by_filter_count\": \"gauge\", \"metrics_api_add_partitions_count\": \"gauge\", \"metrics_api_add_partitions_req_count\": \"gauge\", \"metrics_api_drop_partition_by_name_count\": \"gauge\", \"metrics_api_add_partition_count\": \"gauge\", \"metrics_api_alter_partitions_count\": \"gauge\", \"metrics_api_create_table_count\": \"gauge\", \"metrics_api_alter_table_with_cascade_count\": \"gauge\", \"metrics_api_get_table_meta_count\": \"gauge\", \"metrics_api_get_table_metas_count\": \"gauge\", \"metrics_api_get_table_count\": \"gauge\", \"metrics_api_alter_table_count\": \"gauge\", \"metrics_api_get_tables_count\": \"gauge\", \"metrics_api_get_all_tables_count\": \"gauge\", \"metrics_api_drop_table_count\": \"gauge\", \"metrics_api_get_multi_table_count\": \"gauge\", \"metrics_api_get_database_count\": \"gauge\", \"metrics_api_get_all_databases_count\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_create_function_count\": \"gauge\", \"metrics_api_getmetaconf_count\": \"gauge\", \"metrics_api_alter_table_with_environment_context_count\": \"gauge\", \"metrics_api_delete_column_statistics_by_table_count\": \"gauge\", \"metrics_api_get_functions_count\": \"gauge\", \"metrics_api_get_function_count\": \"gauge\", \"metrics_api_shutdown_count\": \"gauge\", \"metrics_api_flushcache_count\": \"gauge\", \"metrics_api_get_indexes_count\": \"gauge\", \"metrics_api_get_config_value_count\": \"gauge\", \"metrics_api_set_ugi_count\": \"gauge\", \"metrics_api_get_all_functions_count\": \"gauge\", \"metrics_api_get_table_req_95thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_count\": \"gauge\", \"metrics_api_get_table_req_max\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_get_databases_95thpercentile\": \"gauge\", \"metrics_api_get_databases_50thpercentile\": \"gauge\", \"metrics_api_get_databases_max\": \"gauge\", \"metrics_api_get_partitions_95thpercentile\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partitions_max\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\",\"metrics_api_get_database_95thpercentile\": \"gauge\",\"metrics_api_get_database_50thpercentile\": \"gauge\", \"metrics_kafka_listener_failures_count\": \"gauge\", \"metrics_kafka_listener_successes_count\": \"gauge\", \"metrics_api_get_table_objects_by_name_req_max\": \"gauge\"} }]", + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [\"metrics_classloading_loaded_value\", \"metrics_threads_count_value\", \"metrics_memory_heap_max_value\", \"metrics_init_total_count_tables_value\", \"metrics_init_total_count_dbs_value\", \"metrics_memory_heap_used_value\", \"metrics_init_total_count_partitions_value\", \"jvm_threads_current\", \"jvm_threads_started_total\", \"jvm_memory_bytes_used\", \"jvm_memory_bytes_init\", \"jvm_gc_collection_seconds_count\", \"jvm_gc_collection_seconds\", \"process_cpu_seconds_total\", \"java_lang_operatingsystem_processcpuload\", \"java_lang_operatingsystem_processcputime\", \"metrics_threads_runnable_count_value\", \"metrics_threads_waiting_count_value\", \"java_lang_memory_heapmemoryusage_used\", \"metrics_memory_heap_init_value\", \"metrics_api_get_partition_by_name_count\", \"metrics_api_get_partitions_by_names_count\", \"metrics_api_get_partition_names_count\", \"metrics_api_get_partitions_by_expr_count\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partition_count\", \"metrics_api_get_partitions_by_filter_count\", \"metrics_api_add_partitions_count\", \"metrics_api_add_partitions_req_count\", \"metrics_api_drop_partition_by_name_count\", \"metrics_api_add_partition_count\", \"metrics_api_alter_partitions_count\", \"metrics_api_create_table_count\", \"metrics_api_alter_table_with_cascade_count\", \"metrics_api_get_table_meta_count\", \"metrics_api_get_table_metas_count\", \"metrics_api_get_table_count\", \"metrics_api_alter_table_count\", \"metrics_api_get_tables_count\", \"metrics_api_get_all_tables_count\", \"metrics_api_drop_table_count\", \"metrics_api_get_multi_table_count\", \"metrics_api_get_database_count\", \"metrics_api_get_all_databases_count\", \"metrics_api_get_databases_count\", \"metrics_api_create_function_count\", \"metrics_api_getmetaconf_count\", \"metrics_api_alter_table_with_environment_context_count\", \"metrics_api_delete_column_statistics_by_table_count\", \"metrics_api_get_functions_count\", \"metrics_api_get_function_count\", \"metrics_api_shutdown_count\", \"metrics_api_flushcache_count\", \"metrics_api_get_indexes_count\", \"metrics_api_get_config_value_count\", \"metrics_api_set_ugi_count\", \"metrics_api_get_all_functions_count\", \"metrics_api_get_table_req_95thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_table_req_count\", \"metrics_api_get_table_req_max\", \"metrics_api_get_databases_count\", \"metrics_api_get_databases_95thpercentile\", \"metrics_api_get_databases_50thpercentile\", \"metrics_api_get_databases_max\", \"metrics_api_get_partitions_95thpercentile\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partitions_max\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_database_95thpercentile\", \"metrics_api_get_database_50thpercentile\", \"metrics_kafka_listener_failures_count\", \"metrics_kafka_listener_successes_count\", \"metrics_api_get_table_objects_by_name_req_max\" ], \"type_overrides\": { \"metrics_classloading_loaded_value\": \"gauge\", \"metrics_threads_count_value\": \"gauge\", \"metrics_memory_heap_max_value\": \"gauge\", \"metrics_init_total_count_tables_value\": \"gauge\", \"metrics_init_total_count_dbs_value\": \"gauge\", \"metrics_memory_heap_used_value\": \"gauge\", \"metrics_init_total_count_partitions_value\": \"gauge\", \"jvm_threads_current\": \"gauge\", \"jvm_threads_started_total\": \"gauge\", \"jvm_memory_bytes_used\": \"gauge\", \"jvm_memory_bytes_init\": \"gauge\", \"jvm_gc_collection_seconds_count\": \"gauge\", \"jvm_gc_collection_seconds\": \"gauge\", \"process_cpu_seconds_total\": \"gauge\", \"java_lang_operatingsystem_processcpuload\": \"gauge\", \"java_lang_operatingsystem_processcputime\": \"gauge\", \"metrics_threads_runnable_count_value\": \"gauge\", \"metrics_threads_waiting_count_value\": \"gauge\", \"java_lang_memory_heapmemoryusage_used\": \"gauge\", \"metrics_memory_heap_init_value\": \"gauge\", \"metrics_api_get_partition_by_name_count\": \"gauge\", \"metrics_api_get_partitions_by_names_count\": \"gauge\", \"metrics_api_get_partition_names_count\": \"gauge\", \"metrics_api_get_partitions_by_expr_count\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partition_count\": \"gauge\", \"metrics_api_get_partitions_by_filter_count\": \"gauge\", \"metrics_api_add_partitions_count\": \"gauge\", \"metrics_api_add_partitions_req_count\": \"gauge\", \"metrics_api_drop_partition_by_name_count\": \"gauge\", \"metrics_api_add_partition_count\": \"gauge\", \"metrics_api_alter_partitions_count\": \"gauge\", \"metrics_api_create_table_count\": \"gauge\", \"metrics_api_alter_table_with_cascade_count\": \"gauge\", \"metrics_api_get_table_meta_count\": \"gauge\", \"metrics_api_get_table_metas_count\": \"gauge\", \"metrics_api_get_table_count\": \"gauge\", \"metrics_api_alter_table_count\": \"gauge\", \"metrics_api_get_tables_count\": \"gauge\", \"metrics_api_get_all_tables_count\": \"gauge\", \"metrics_api_drop_table_count\": \"gauge\", \"metrics_api_get_multi_table_count\": \"gauge\", \"metrics_api_get_database_count\": \"gauge\", \"metrics_api_get_all_databases_count\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_create_function_count\": \"gauge\", \"metrics_api_getmetaconf_count\": \"gauge\", \"metrics_api_alter_table_with_environment_context_count\": \"gauge\", \"metrics_api_delete_column_statistics_by_table_count\": \"gauge\", \"metrics_api_get_functions_count\": \"gauge\", \"metrics_api_get_function_count\": \"gauge\", \"metrics_api_shutdown_count\": \"gauge\", \"metrics_api_flushcache_count\": \"gauge\", \"metrics_api_get_indexes_count\": \"gauge\", \"metrics_api_get_config_value_count\": \"gauge\", \"metrics_api_set_ugi_count\": \"gauge\", \"metrics_api_get_all_functions_count\": \"gauge\", \"metrics_api_get_table_req_95thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_count\": \"gauge\", \"metrics_api_get_table_req_max\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_get_databases_95thpercentile\": \"gauge\", \"metrics_api_get_databases_50thpercentile\": \"gauge\", \"metrics_api_get_databases_max\": \"gauge\", \"metrics_api_get_partitions_95thpercentile\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partitions_max\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\",\"metrics_api_get_database_95thpercentile\": \"gauge\",\"metrics_api_get_database_50thpercentile\": \"gauge\", \"metrics_kafka_listener_failures_count\": \"gauge\", \"metrics_kafka_listener_successes_count\": \"gauge\", \"metrics_api_get_table_objects_by_name_req_max\": \"gauge\"} }]", "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index 029369b..1e6e13b 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"hms_readwrite_legacy\", \"metrics\": [\"metrics_classloading_loaded_value\", \"metrics_threads_count_value\", \"metrics_memory_heap_max_value\", \"metrics_init_total_count_tables_value\", \"metrics_init_total_count_dbs_value\", \"metrics_memory_heap_used_value\", \"metrics_init_total_count_partitions_value\", \"jvm_threads_current\", \"jvm_threads_started_total\", \"jvm_memory_bytes_used\", \"jvm_memory_bytes_init\", \"jvm_gc_collection_seconds_count\", \"jvm_gc_collection_seconds\", \"process_cpu_seconds_total\", \"java_lang_operatingsystem_processcpuload\", \"java_lang_operatingsystem_processcputime\", \"metrics_threads_runnable_count_value\", \"metrics_threads_waiting_count_value\", \"java_lang_memory_heapmemoryusage_used\", \"metrics_memory_heap_init_value\", \"metrics_api_get_partition_by_name_count\", \"metrics_api_get_partitions_by_names_count\", \"metrics_api_get_partition_names_count\", \"metrics_api_get_partitions_by_expr_count\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partition_count\", \"metrics_api_get_partitions_by_filter_count\", \"metrics_api_add_partitions_count\", \"metrics_api_add_partitions_req_count\", \"metrics_api_drop_partition_by_name_count\", \"metrics_api_add_partition_count\", \"metrics_api_alter_partitions_count\", \"metrics_api_create_table_count\", \"metrics_api_alter_table_with_cascade_count\", \"metrics_api_get_table_meta_count\", \"metrics_api_get_table_metas_count\", \"metrics_api_get_table_count\", \"metrics_api_alter_table_count\", \"metrics_api_get_tables_count\", \"metrics_api_get_all_tables_count\", \"metrics_api_drop_table_count\", \"metrics_api_get_multi_table_count\", \"metrics_api_get_database_count\", \"metrics_api_get_all_databases_count\", \"metrics_api_get_databases_count\", \"metrics_api_create_function_count\", \"metrics_api_getmetaconf_count\", \"metrics_api_alter_table_with_environment_context_count\", \"metrics_api_delete_column_statistics_by_table_count\", \"metrics_api_get_functions_count\", \"metrics_api_get_function_count\", \"metrics_api_shutdown_count\", \"metrics_api_flushcache_count\", \"metrics_api_get_indexes_count\", \"metrics_api_get_config_value_count\", \"metrics_api_set_ugi_count\", \"metrics_api_get_all_functions_count\", \"metrics_api_get_table_req_95thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_table_req_count\", \"metrics_api_get_table_req_max\", \"metrics_api_get_databases_count\", \"metrics_api_get_databases_95thpercentile\", \"metrics_api_get_databases_50thpercentile\", \"metrics_api_get_databases_max\", \"metrics_api_get_partitions_95thpercentile\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partitions_max\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_database_95thpercentile\", \"metrics_api_get_database_50thpercentile\", \"metrics_kafka_listener_failures_count\", \"metrics_kafka_listener_successes_count\", \"metrics_api_get_table_objects_by_name_req_max\" ], \"type_overrides\": { \"metrics_classloading_loaded_value\": \"gauge\", \"metrics_threads_count_value\": \"gauge\", \"metrics_memory_heap_max_value\": \"gauge\", \"metrics_init_total_count_tables_value\": \"gauge\", \"metrics_init_total_count_dbs_value\": \"gauge\", \"metrics_memory_heap_used_value\": \"gauge\", \"metrics_init_total_count_partitions_value\": \"gauge\", \"jvm_threads_current\": \"gauge\", \"jvm_threads_started_total\": \"gauge\", \"jvm_memory_bytes_used\": \"gauge\", \"jvm_memory_bytes_init\": \"gauge\", \"jvm_gc_collection_seconds_count\": \"gauge\", \"jvm_gc_collection_seconds\": \"gauge\", \"process_cpu_seconds_total\": \"gauge\", \"java_lang_operatingsystem_processcpuload\": \"gauge\", \"java_lang_operatingsystem_processcputime\": \"gauge\", \"metrics_threads_runnable_count_value\": \"gauge\", \"metrics_threads_waiting_count_value\": \"gauge\", \"java_lang_memory_heapmemoryusage_used\": \"gauge\", \"metrics_memory_heap_init_value\": \"gauge\", \"metrics_api_get_partition_by_name_count\": \"gauge\", \"metrics_api_get_partitions_by_names_count\": \"gauge\", \"metrics_api_get_partition_names_count\": \"gauge\", \"metrics_api_get_partitions_by_expr_count\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partition_count\": \"gauge\", \"metrics_api_get_partitions_by_filter_count\": \"gauge\", \"metrics_api_add_partitions_count\": \"gauge\", \"metrics_api_add_partitions_req_count\": \"gauge\", \"metrics_api_drop_partition_by_name_count\": \"gauge\", \"metrics_api_add_partition_count\": \"gauge\", \"metrics_api_alter_partitions_count\": \"gauge\", \"metrics_api_create_table_count\": \"gauge\", \"metrics_api_alter_table_with_cascade_count\": \"gauge\", \"metrics_api_get_table_meta_count\": \"gauge\", \"metrics_api_get_table_metas_count\": \"gauge\", \"metrics_api_get_table_count\": \"gauge\", \"metrics_api_alter_table_count\": \"gauge\", \"metrics_api_get_tables_count\": \"gauge\", \"metrics_api_get_all_tables_count\": \"gauge\", \"metrics_api_drop_table_count\": \"gauge\", \"metrics_api_get_multi_table_count\": \"gauge\", \"metrics_api_get_database_count\": \"gauge\", \"metrics_api_get_all_databases_count\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_create_function_count\": \"gauge\", \"metrics_api_getmetaconf_count\": \"gauge\", \"metrics_api_alter_table_with_environment_context_count\": \"gauge\", \"metrics_api_delete_column_statistics_by_table_count\": \"gauge\", \"metrics_api_get_functions_count\": \"gauge\", \"metrics_api_get_function_count\": \"gauge\", \"metrics_api_shutdown_count\": \"gauge\", \"metrics_api_flushcache_count\": \"gauge\", \"metrics_api_get_indexes_count\": \"gauge\", \"metrics_api_get_config_value_count\": \"gauge\", \"metrics_api_set_ugi_count\": \"gauge\", \"metrics_api_get_all_functions_count\": \"gauge\", \"metrics_api_get_table_req_95thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_count\": \"gauge\", \"metrics_api_get_table_req_max\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_get_databases_95thpercentile\": \"gauge\", \"metrics_api_get_databases_50thpercentile\": \"gauge\", \"metrics_api_get_databases_max\": \"gauge\", \"metrics_api_get_partitions_95thpercentile\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partitions_max\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\",\"metrics_api_get_database_95thpercentile\": \"gauge\",\"metrics_api_get_database_50thpercentile\": \"gauge\", \"metrics_kafka_listener_failures_count\": \"gauge\", \"metrics_kafka_listener_successes_count\": \"gauge\", \"metrics_api_get_table_objects_by_name_req_max\": \"gauge\"} }]", + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readwrite_namespace}\", \"metrics\": [\"metrics_classloading_loaded_value\", \"metrics_threads_count_value\", \"metrics_memory_heap_max_value\", \"metrics_init_total_count_tables_value\", \"metrics_init_total_count_dbs_value\", \"metrics_memory_heap_used_value\", \"metrics_init_total_count_partitions_value\", \"jvm_threads_current\", \"jvm_threads_started_total\", \"jvm_memory_bytes_used\", \"jvm_memory_bytes_init\", \"jvm_gc_collection_seconds_count\", \"jvm_gc_collection_seconds\", \"process_cpu_seconds_total\", \"java_lang_operatingsystem_processcpuload\", \"java_lang_operatingsystem_processcputime\", \"metrics_threads_runnable_count_value\", \"metrics_threads_waiting_count_value\", \"java_lang_memory_heapmemoryusage_used\", \"metrics_memory_heap_init_value\", \"metrics_api_get_partition_by_name_count\", \"metrics_api_get_partitions_by_names_count\", \"metrics_api_get_partition_names_count\", \"metrics_api_get_partitions_by_expr_count\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partition_count\", \"metrics_api_get_partitions_by_filter_count\", \"metrics_api_add_partitions_count\", \"metrics_api_add_partitions_req_count\", \"metrics_api_drop_partition_by_name_count\", \"metrics_api_add_partition_count\", \"metrics_api_alter_partitions_count\", \"metrics_api_create_table_count\", \"metrics_api_alter_table_with_cascade_count\", \"metrics_api_get_table_meta_count\", \"metrics_api_get_table_metas_count\", \"metrics_api_get_table_count\", \"metrics_api_alter_table_count\", \"metrics_api_get_tables_count\", \"metrics_api_get_all_tables_count\", \"metrics_api_drop_table_count\", \"metrics_api_get_multi_table_count\", \"metrics_api_get_database_count\", \"metrics_api_get_all_databases_count\", \"metrics_api_get_databases_count\", \"metrics_api_create_function_count\", \"metrics_api_getmetaconf_count\", \"metrics_api_alter_table_with_environment_context_count\", \"metrics_api_delete_column_statistics_by_table_count\", \"metrics_api_get_functions_count\", \"metrics_api_get_function_count\", \"metrics_api_shutdown_count\", \"metrics_api_flushcache_count\", \"metrics_api_get_indexes_count\", \"metrics_api_get_config_value_count\", \"metrics_api_set_ugi_count\", \"metrics_api_get_all_functions_count\", \"metrics_api_get_table_req_95thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_table_req_count\", \"metrics_api_get_table_req_max\", \"metrics_api_get_databases_count\", \"metrics_api_get_databases_95thpercentile\", \"metrics_api_get_databases_50thpercentile\", \"metrics_api_get_databases_max\", \"metrics_api_get_partitions_95thpercentile\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partitions_max\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_database_95thpercentile\", \"metrics_api_get_database_50thpercentile\", \"metrics_kafka_listener_failures_count\", \"metrics_kafka_listener_successes_count\", \"metrics_api_get_table_objects_by_name_req_max\" ], \"type_overrides\": { \"metrics_classloading_loaded_value\": \"gauge\", \"metrics_threads_count_value\": \"gauge\", \"metrics_memory_heap_max_value\": \"gauge\", \"metrics_init_total_count_tables_value\": \"gauge\", \"metrics_init_total_count_dbs_value\": \"gauge\", \"metrics_memory_heap_used_value\": \"gauge\", \"metrics_init_total_count_partitions_value\": \"gauge\", \"jvm_threads_current\": \"gauge\", \"jvm_threads_started_total\": \"gauge\", \"jvm_memory_bytes_used\": \"gauge\", \"jvm_memory_bytes_init\": \"gauge\", \"jvm_gc_collection_seconds_count\": \"gauge\", \"jvm_gc_collection_seconds\": \"gauge\", \"process_cpu_seconds_total\": \"gauge\", \"java_lang_operatingsystem_processcpuload\": \"gauge\", \"java_lang_operatingsystem_processcputime\": \"gauge\", \"metrics_threads_runnable_count_value\": \"gauge\", \"metrics_threads_waiting_count_value\": \"gauge\", \"java_lang_memory_heapmemoryusage_used\": \"gauge\", \"metrics_memory_heap_init_value\": \"gauge\", \"metrics_api_get_partition_by_name_count\": \"gauge\", \"metrics_api_get_partitions_by_names_count\": \"gauge\", \"metrics_api_get_partition_names_count\": \"gauge\", \"metrics_api_get_partitions_by_expr_count\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partition_count\": \"gauge\", \"metrics_api_get_partitions_by_filter_count\": \"gauge\", \"metrics_api_add_partitions_count\": \"gauge\", \"metrics_api_add_partitions_req_count\": \"gauge\", \"metrics_api_drop_partition_by_name_count\": \"gauge\", \"metrics_api_add_partition_count\": \"gauge\", \"metrics_api_alter_partitions_count\": \"gauge\", \"metrics_api_create_table_count\": \"gauge\", \"metrics_api_alter_table_with_cascade_count\": \"gauge\", \"metrics_api_get_table_meta_count\": \"gauge\", \"metrics_api_get_table_metas_count\": \"gauge\", \"metrics_api_get_table_count\": \"gauge\", \"metrics_api_alter_table_count\": \"gauge\", \"metrics_api_get_tables_count\": \"gauge\", \"metrics_api_get_all_tables_count\": \"gauge\", \"metrics_api_drop_table_count\": \"gauge\", \"metrics_api_get_multi_table_count\": \"gauge\", \"metrics_api_get_database_count\": \"gauge\", \"metrics_api_get_all_databases_count\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_create_function_count\": \"gauge\", \"metrics_api_getmetaconf_count\": \"gauge\", \"metrics_api_alter_table_with_environment_context_count\": \"gauge\", \"metrics_api_delete_column_statistics_by_table_count\": \"gauge\", \"metrics_api_get_functions_count\": \"gauge\", \"metrics_api_get_function_count\": \"gauge\", \"metrics_api_shutdown_count\": \"gauge\", \"metrics_api_flushcache_count\": \"gauge\", \"metrics_api_get_indexes_count\": \"gauge\", \"metrics_api_get_config_value_count\": \"gauge\", \"metrics_api_set_ugi_count\": \"gauge\", \"metrics_api_get_all_functions_count\": \"gauge\", \"metrics_api_get_table_req_95thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_count\": \"gauge\", \"metrics_api_get_table_req_max\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_get_databases_95thpercentile\": \"gauge\", \"metrics_api_get_databases_50thpercentile\": \"gauge\", \"metrics_api_get_databases_max\": \"gauge\", \"metrics_api_get_partitions_95thpercentile\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partitions_max\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\",\"metrics_api_get_database_95thpercentile\": \"gauge\",\"metrics_api_get_database_50thpercentile\": \"gauge\", \"metrics_kafka_listener_failures_count\": \"gauge\", \"metrics_kafka_listener_successes_count\": \"gauge\", \"metrics_api_get_table_objects_by_name_req_max\": \"gauge\"} }]", "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, diff --git a/variables.tf b/variables.tf index 0326e0c..252c6fc 100644 --- a/variables.tf +++ b/variables.tf @@ -1011,3 +1011,16 @@ variable "ecs_requires_compatibilities" { type = list(string) default = ["EC2", "FARGATE"] } + +variable "hms_readwrite_namespace" { + description = "ECS readwrite namespace" + type = string + default = "hms_readwrite" +} + +variable "hms_readonly_namespace" { + description = "ECS readonly namespace" + type = string + default = "hms_readonly" +} + From d4ff9fd60d71ee4621e8e79292a1643ed1a7c614 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Tue, 12 Nov 2024 18:29:07 +0530 Subject: [PATCH 02/28] feat: common namespace --- common.tf | 5 +++-- variables.tf | 24 +++++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/common.tf b/common.tf index 57df24d..40342cf 100644 --- a/common.tf +++ b/common.tf @@ -9,8 +9,9 @@ locals { apiary_bucket_prefix = "${local.instance_alias}-${data.aws_caller_identity.current.account_id}-${data.aws_region.current.name}" apiary_assume_role_bucket_prefix = [for assumerole in var.apiary_assume_roles : "${local.instance_alias}-${data.aws_caller_identity.current.account_id}-${lookup(assumerole, "allow_cross_region_access", false) ? "*" : data.aws_region.current.name}"] enable_route53_records = var.apiary_domain_name == "" ? false : true - - datadog_tags = join(" ", formatlist("%s:%s", keys(var.apiary_tags), values(var.apiary_tags))) + hms_readwrite_namespace = var.hms_readwrite_namespace + hms_readonly_namespace = var.hms_readonly_namespace + datadog_tags = join(" ", formatlist("%s:%s", keys(var.apiary_tags), values(var.apiary_tags))) # # Create a new list of maps with some extra attributes needed later # diff --git a/variables.tf b/variables.tf index 252c6fc..cc3d58b 100644 --- a/variables.tf +++ b/variables.tf @@ -452,6 +452,19 @@ variable "hms_rw_k8s_pdb_settings" { } } +variable "hms_readwrite_namespace" { + description = "ECS readwrite namespace" + type = string + default = "hms_readwrite" +} + +variable "hms_readonly_namespace" { + description = "ECS readonly namespace" + type = string + default = "hms_readonly" +} + + variable "hms_rw_node_affinity" { description = < Date: Tue, 12 Nov 2024 18:38:28 +0530 Subject: [PATCH 03/28] feat: common namespace --- templates.tf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates.tf b/templates.tf index 8ff1f7a..97b8922 100644 --- a/templates.tf +++ b/templates.tf @@ -27,7 +27,8 @@ locals{ table_param_filter = var.enable_metadata_events ? var.table_param_filter : "" enable_gluesync = var.enable_gluesync ? "1" : "" gluedb_prefix = "${local.gluedb_prefix}" - + hms_readwrite_namespace = "${var.hms_readwrite_namespace}" + hms_readonly_namespace = "${var.hms_readonly_namespace}" ranger_service_name = "${local.instance_alias}-metastore" ranger_policy_manager_url = "${var.ranger_policy_manager_url}" ranger_audit_solr_url = "${var.ranger_audit_solr_url}" From d20ace2dd4d63a91f55c875b973ab620a053de32 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Tue, 12 Nov 2024 18:53:41 +0530 Subject: [PATCH 04/28] feat: common namespace --- CHANGELOG.md | 4 ++++ VARIABLES.md | 32 +++++++++++++++++--------------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3eec28d..203e2c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [7.7.0] - 2024-11-12 +### Changed +- Updated the hms namespaces for metrics for both readwrite and readonly. + ## [7.6.1] - 2024-10-30 ### Changed - Changed Openmetric to Prometheus in DockerLabels in ECS. diff --git a/VARIABLES.md b/VARIABLES.md index 9c1adca..fd56a3e 100644 --- a/VARIABLES.md +++ b/VARIABLES.md @@ -13,7 +13,7 @@ | apiary\_deny\_iamrole\_actions | List of S3 actions that 'apiary\_deny\_iamroles' are not allowed to perform. | `list(string)` |
[
"s3:Abort*",
"s3:Bypass*",
"s3:Delete*",
"s3:GetObject",
"s3:GetObjectTorrent",
"s3:GetObjectVersion",
"s3:GetObjectVersionTorrent",
"s3:ObjectOwnerOverrideToBucketOwner",
"s3:Put*",
"s3:Replicate*",
"s3:Restore*"
]
| no | | apiary\_deny\_iamroles | AWS IAM roles denied access to Apiary managed S3 buckets. | `list(string)` | `[]` | no | | apiary\_domain\_name | Apiary domain name for Route 53. | `string` | `""` | no | -| apiary\_domain\_private\_zone | Apiary domain private zone 53. | `bool` | `true` | no | +| apiary\_domain\_private\_zone | Apiary domain private zone 53. | `bool` | `true` | no | | apiary\_governance\_iamroles | AWS IAM governance roles allowed read and tagging access to managed Apiary S3 buckets. | `list(string)` | `[]` | no | | apiary\_log\_bucket | Bucket for Apiary logs.If this is blank, module will create a bucket. | `string` | `""` | no | | apiary\_log\_prefix | Prefix for Apiary logs. | `string` | `""` | no | @@ -29,12 +29,12 @@ | apiary\_common\_producer\_iamroles | AWS IAM roles allowed general (not tied to schema) write access to managed Apiary S3 buckets. | `list(string)` | `[]` | no | | dashboard\_namespace | k8s namespace to deploy grafana dashboard. | `string` | `"monitoring"` | no | | db\_apply\_immediately | Specifies whether any cluster modifications are applied immediately, or during the next maintenance window. | `bool` | `false` | no | -| db\_backup\_retention | The number of days to retain backups for the RDS Metastore DB. | `string` | `"7"` | yes | +| db\_backup\_retention | The number of days to retain backups for the RDS Metastore DB. | `string` | `"7"` | yes | | db\_backup\_window | Preferred backup window for the RDS Metastore DB in UTC. | `string` | `"02:00-03:00"` | no | | db\_copy\_tags\_to\_snapshot | Copy all Cluster tags to snapshots. | `bool` | `true` | no | | db\_enable\_performance\_insights | Enable RDS Performance Insights | `bool` | `false` | no | | db\_enhanced\_monitoring\_interval | RDS monitoring interval (in seconds) for enhanced monitoring. Valid values are 0, 1, 5, 10, 15, 30, 60. Default is 0. | `number` | `0` | no | -| db\_instance\_class | Instance type for the RDS Metastore DB. | `string` | `"db.t4g.medium"` | yes | +| db\_instance\_class | Instance type for the RDS Metastore DB. | `string` | `"db.t4g.medium"` | yes | | db\_instance\_count | Desired count of database cluster instances. | `string` | `"2"` | no | | db\_maintenance\_window | Preferred maintenance window for the RDS Metastore DB in UTC. | `string` | `"wed:03:00-wed:04:00"` | no | | db\_master\_username | Aurora cluster MySQL master user name. | `string` | `"apiary"` | no | @@ -71,22 +71,22 @@ | hms\_ro\_heapsize | Heapsize for the read only Hive Metastore.
Valid values: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html | `string` | `"2048"` | no | | hms\_ro\_k8s\_replica\_count | Initial Number of read only Hive Metastore k8s pod replicas to create. | `number` | `"2048"` | no | | hms\_ro\_k8s\_max\_replica\_count | Max Number of read only Hive Metastore k8s pod replicas to create. | `number` | `"2048"` | no | -| hms\_rw\_k8s\_pdb\_settings | Add PodDisruptionBudget to the HMS rw pods. | `object` | `max_unavailable = 1` | no | -| hms\_rw\_k8s\_rolling\_update\_strategy | Configure HMS RW deployment rolling strategy. | `object` | `max_unavailable = 1` | no | +| hms\_rw\_k8s\_pdb\_settings | Add PodDisruptionBudget to the HMS rw pods. | `object` | `max_unavailable = 1` | no | +| hms\_rw\_k8s\_rolling\_update\_strategy | Configure HMS RW deployment rolling strategy. | `object` | `max_unavailable = 1` | no | | hms\_ro\_target\_cpu\_percentage | Read only Hive Metastore autoscaling threshold for CPU target usage. | `number` | `"2048"` | no | | hms\_ro\_request\_partition\_limit | Read only Hive Metastore limits of request partitions. | `string` | n/a | no | -| hms\_ro\_node\_affinity | Add node affinities to the Hive metastore pods. | `list(object)` | n/a | no | -| hms\_ro\_tolerations | Add tolerations to the Hive metastore pods. | `list(object)` | n/a | no | +| hms\_ro\_node\_affinity | Add node affinities to the Hive metastore pods. | `list(object)` | n/a | no | +| hms\_ro\_tolerations | Add tolerations to the Hive metastore pods. | `list(object)` | n/a | no | | hms\_rw\_cpu | CPU for the read/write Hive Metastore ECS task.
Valid values can be 256, 512, 1024, 2048 and 4096.
Reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html | `string` | `"512"` | no | | hms\_rw\_db\_connection\_pool\_size | Read-write Hive metastore setting for size of the MySQL connection pool. Default is 10. | `number` | `10` | no | | hms\_rw\_ecs\_task\_count | Desired ECS task count of the read/write Hive Metastore service. | `string` | `"3"` | no | | hms\_rw\_heapsize | Heapsize for the read/write Hive Metastore.
Valid values: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-cpu-memory-error.html | `string` | `"2048"` | no | | hms\_rw\_k8s\_replica\_count | Initial Number of read/write Hive Metastore k8s pod replicas to create. | `number` | `"2048"` | no | -| hms\_rw\_k8s\_pdb\_settings | Add PodDisruptionBudget to the HMS rw pods. | `object` | `max_unavailable = 1` | no | -| hms\_rw\_k8s\_rolling\_update\_strategy | Configure HMS RW deployment rolling strategy. | `object` | `max_unavailable = 1` | no | +| hms\_rw\_k8s\_pdb\_settings | Add PodDisruptionBudget to the HMS rw pods. | `object` | `max_unavailable = 1` | no | +| hms\_rw\_k8s\_rolling\_update\_strategy | Configure HMS RW deployment rolling strategy. | `object` | `max_unavailable = 1` | no | | hms\_rw\_request\_partition\_limit | Read Write Hive Metastore limits of request partitions. | `string` | n/a | no | -| hms\_rw\_node\_affinity | Add node affinities to the Hive metastore pods. | `list(object)` | n/a | no | -| hms\_rw\_tolerations | Add tolerations to the Hive metastore pods. | `list(object)` | n/a | no | +| hms\_rw\_node\_affinity | Add node affinities to the Hive metastore pods. | `list(object)` | n/a | no | +| hms\_rw\_tolerations | Add tolerations to the Hive metastore pods. | `list(object)` | n/a | no | | iam\_name\_root | Name to identify Hive Metastore IAM roles. | `string` | `"hms"` | no | | ingress\_cidr | Generally allowed ingress CIDR list. | `list(string)` | n/a | yes | | instance\_name | Apiary instance name to identify resources in multi-instance deployments. | `string` | `""` | no | @@ -132,12 +132,14 @@ | datadog\_key\_secret\_name | Name of the secret containing the DataDog API key. This needs to be created manually in AWS secrets manager. This is only applicable to ECS deployments. | string | null | no | | datadog\_agent\_version | Version of the Datadog Agent running in the ECS cluster. This is only applicable to ECS deployments. | string | 7.50.3-jmx | no | | datadog\_agent\_enabled | Whether to include the datadog-agent container. This is only applicable to ECS deployments. | string | false | no | -| enable\_tcp\_keepalive | tcp_keepalive settings on HMS pods. To use this you need to enable the ability to cahnge sysctl settings on your kubernetes cluster. For EKS you need to allow this on your cluster (https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ check EKS version for details). If your EKS version is below 1.24 you need to create a PodSecurityPolicy allowing the following sysctls "net.ipv4.tcp_keepalive_time", "net.ipv4.tcp_keepalive_intvl","net.ipv4.tcp_keepalive_probes" and a ClusterRole + Rolebinding for the service account running the HMS pods or all services accounts in the namespace where Apiary is running so that kubernetes can apply the tcp)keepalive configuration. For EKS 1.25 and above check this https://kubernetes.io/blog/2022/08/23/kubernetes-v1-25-release/#pod-security-changes. Also see tcp_keepalive_* variables. | bool | false | no | +| enable\_tcp\_keepalive | tcp_keepalive settings on HMS pods. To use this you need to enable the ability to cahnge sysctl settings on your kubernetes cluster. For EKS you need to allow this on your cluster (https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/ check EKS version for details). If your EKS version is below 1.24 you need to create a PodSecurityPolicy allowing the following sysctls "net.ipv4.tcp_keepalive_time", "net.ipv4.tcp_keepalive_intvl","net.ipv4.tcp_keepalive_probes" and a ClusterRole + Rolebinding for the service account running the HMS pods or all services accounts in the namespace where Apiary is running so that kubernetes can apply the tcp)keepalive configuration. For EKS 1.25 and above check this https://kubernetes.io/blog/2022/08/23/kubernetes-v1-25-release/#pod-security-changes. Also see tcp_keepalive_* variables. | bool | false | no | | tcp\_keepalive\_time | Sets net.ipv4.tcp_keepalive_time (seconds). | number | `200` | no | | tcp\_keepalive\_intvl | Sets net.ipv4.tcp_keepalive_intvl (seconds) | number | `30` | no | -| tcp\_keepalive\_probes | Sets net.ipv4.tcp_keepalive_probes (seconds) | number | `2` | no | -| ecs\_platform\_version | ECS Service Platform Version | `string` | `"LATEST"` -| ecs\_requires\_compatibilities | ECS task definition requires compatibilities. | `list(string)` | `["EC2", "FARGATE"]` | no | +| tcp\_keepalive\_probes | Sets net.ipv4.tcp_keepalive_probes (seconds) | number | `2` | no | +| ecs\_platform\_version | ECS Service Platform Version | `string` | `"LATEST"` +| ecs\_requires\_compatibilities | ECS task definition requires compatibilities. | `list(string)` | `["EC2", "FARGATE"]` | no | +| hms\_readonly\_namespace | ECS readwrite namespace | `string` | `hms_readonly` | no | +| hms\_readwrite\_namespace | ECS readonly namespace | `string` | `hms_readwrite` | no | ### apiary_assume_roles From 9e5c24b5970addd5b817ea493ad5519fabe5ac17 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Tue, 12 Nov 2024 19:20:44 +0530 Subject: [PATCH 05/28] feat: common namespace --- templates/apiary-hms-readonly.json | 2 +- variables.tf | 58 +++++++++++++----------------- 2 files changed, 25 insertions(+), 35 deletions(-) diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index f610664..2d02367 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [\"metrics_classloading_loaded_value\", \"metrics_threads_count_value\", \"metrics_memory_heap_max_value\", \"metrics_init_total_count_tables_value\", \"metrics_init_total_count_dbs_value\", \"metrics_memory_heap_used_value\", \"metrics_init_total_count_partitions_value\", \"jvm_threads_current\", \"jvm_threads_started_total\", \"jvm_memory_bytes_used\", \"jvm_memory_bytes_init\", \"jvm_gc_collection_seconds_count\", \"jvm_gc_collection_seconds\", \"process_cpu_seconds_total\", \"java_lang_operatingsystem_processcpuload\", \"java_lang_operatingsystem_processcputime\", \"metrics_threads_runnable_count_value\", \"metrics_threads_waiting_count_value\", \"java_lang_memory_heapmemoryusage_used\", \"metrics_memory_heap_init_value\", \"metrics_api_get_partition_by_name_count\", \"metrics_api_get_partitions_by_names_count\", \"metrics_api_get_partition_names_count\", \"metrics_api_get_partitions_by_expr_count\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partition_count\", \"metrics_api_get_partitions_by_filter_count\", \"metrics_api_add_partitions_count\", \"metrics_api_add_partitions_req_count\", \"metrics_api_drop_partition_by_name_count\", \"metrics_api_add_partition_count\", \"metrics_api_alter_partitions_count\", \"metrics_api_create_table_count\", \"metrics_api_alter_table_with_cascade_count\", \"metrics_api_get_table_meta_count\", \"metrics_api_get_table_metas_count\", \"metrics_api_get_table_count\", \"metrics_api_alter_table_count\", \"metrics_api_get_tables_count\", \"metrics_api_get_all_tables_count\", \"metrics_api_drop_table_count\", \"metrics_api_get_multi_table_count\", \"metrics_api_get_database_count\", \"metrics_api_get_all_databases_count\", \"metrics_api_get_databases_count\", \"metrics_api_create_function_count\", \"metrics_api_getmetaconf_count\", \"metrics_api_alter_table_with_environment_context_count\", \"metrics_api_delete_column_statistics_by_table_count\", \"metrics_api_get_functions_count\", \"metrics_api_get_function_count\", \"metrics_api_shutdown_count\", \"metrics_api_flushcache_count\", \"metrics_api_get_indexes_count\", \"metrics_api_get_config_value_count\", \"metrics_api_set_ugi_count\", \"metrics_api_get_all_functions_count\", \"metrics_api_get_table_req_95thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_table_req_count\", \"metrics_api_get_table_req_max\", \"metrics_api_get_databases_count\", \"metrics_api_get_databases_95thpercentile\", \"metrics_api_get_databases_50thpercentile\", \"metrics_api_get_databases_max\", \"metrics_api_get_partitions_95thpercentile\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partitions_max\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_database_95thpercentile\", \"metrics_api_get_database_50thpercentile\", \"metrics_kafka_listener_failures_count\", \"metrics_kafka_listener_successes_count\", \"metrics_api_get_table_objects_by_name_req_max\" ], \"type_overrides\": { \"metrics_classloading_loaded_value\": \"gauge\", \"metrics_threads_count_value\": \"gauge\", \"metrics_memory_heap_max_value\": \"gauge\", \"metrics_init_total_count_tables_value\": \"gauge\", \"metrics_init_total_count_dbs_value\": \"gauge\", \"metrics_memory_heap_used_value\": \"gauge\", \"metrics_init_total_count_partitions_value\": \"gauge\", \"jvm_threads_current\": \"gauge\", \"jvm_threads_started_total\": \"gauge\", \"jvm_memory_bytes_used\": \"gauge\", \"jvm_memory_bytes_init\": \"gauge\", \"jvm_gc_collection_seconds_count\": \"gauge\", \"jvm_gc_collection_seconds\": \"gauge\", \"process_cpu_seconds_total\": \"gauge\", \"java_lang_operatingsystem_processcpuload\": \"gauge\", \"java_lang_operatingsystem_processcputime\": \"gauge\", \"metrics_threads_runnable_count_value\": \"gauge\", \"metrics_threads_waiting_count_value\": \"gauge\", \"java_lang_memory_heapmemoryusage_used\": \"gauge\", \"metrics_memory_heap_init_value\": \"gauge\", \"metrics_api_get_partition_by_name_count\": \"gauge\", \"metrics_api_get_partitions_by_names_count\": \"gauge\", \"metrics_api_get_partition_names_count\": \"gauge\", \"metrics_api_get_partitions_by_expr_count\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partition_count\": \"gauge\", \"metrics_api_get_partitions_by_filter_count\": \"gauge\", \"metrics_api_add_partitions_count\": \"gauge\", \"metrics_api_add_partitions_req_count\": \"gauge\", \"metrics_api_drop_partition_by_name_count\": \"gauge\", \"metrics_api_add_partition_count\": \"gauge\", \"metrics_api_alter_partitions_count\": \"gauge\", \"metrics_api_create_table_count\": \"gauge\", \"metrics_api_alter_table_with_cascade_count\": \"gauge\", \"metrics_api_get_table_meta_count\": \"gauge\", \"metrics_api_get_table_metas_count\": \"gauge\", \"metrics_api_get_table_count\": \"gauge\", \"metrics_api_alter_table_count\": \"gauge\", \"metrics_api_get_tables_count\": \"gauge\", \"metrics_api_get_all_tables_count\": \"gauge\", \"metrics_api_drop_table_count\": \"gauge\", \"metrics_api_get_multi_table_count\": \"gauge\", \"metrics_api_get_database_count\": \"gauge\", \"metrics_api_get_all_databases_count\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_create_function_count\": \"gauge\", \"metrics_api_getmetaconf_count\": \"gauge\", \"metrics_api_alter_table_with_environment_context_count\": \"gauge\", \"metrics_api_delete_column_statistics_by_table_count\": \"gauge\", \"metrics_api_get_functions_count\": \"gauge\", \"metrics_api_get_function_count\": \"gauge\", \"metrics_api_shutdown_count\": \"gauge\", \"metrics_api_flushcache_count\": \"gauge\", \"metrics_api_get_indexes_count\": \"gauge\", \"metrics_api_get_config_value_count\": \"gauge\", \"metrics_api_set_ugi_count\": \"gauge\", \"metrics_api_get_all_functions_count\": \"gauge\", \"metrics_api_get_table_req_95thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_count\": \"gauge\", \"metrics_api_get_table_req_max\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_get_databases_95thpercentile\": \"gauge\", \"metrics_api_get_databases_50thpercentile\": \"gauge\", \"metrics_api_get_databases_max\": \"gauge\", \"metrics_api_get_partitions_95thpercentile\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partitions_max\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\",\"metrics_api_get_database_95thpercentile\": \"gauge\",\"metrics_api_get_database_50thpercentile\": \"gauge\", \"metrics_kafka_listener_failures_count\": \"gauge\", \"metrics_kafka_listener_successes_count\": \"gauge\", \"metrics_api_get_table_objects_by_name_req_max\": \"gauge\"} }]", + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [ \"${join("\",\"", "${var.datadog_metrics_hms_readwrite_readonly} )}\" ] }]", "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, diff --git a/variables.tf b/variables.tf index cc3d58b..06cbd08 100644 --- a/variables.tf +++ b/variables.tf @@ -545,30 +545,6 @@ EOF default = [] } -variable "hms_ro_tolerations" { - description = < Date: Tue, 12 Nov 2024 19:25:00 +0530 Subject: [PATCH 06/28] feat: common namespace --- templates/apiary-hms-readonly.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index 2d02367..efa9f51 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [ \"${join("\",\"", "${var.datadog_metrics_hms_readwrite_readonly} )}\" ] }]", + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [ \"${join("\",\"", "${var.datadog_metrics_hms_readwrite_readonly} }\" ] }]", "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, From 47acb9ab20c0877290ce7702551bb29b23a1372a Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Tue, 12 Nov 2024 19:27:49 +0530 Subject: [PATCH 07/28] feat: common namespace --- templates/apiary-hms-readonly.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index efa9f51..53cd1ea 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [ \"${join("\",\"", "${var.datadog_metrics_hms_readwrite_readonly} }\" ] }]", + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [${join(\",\", ${var.datadog_metrics_hms_readwrite_readonly} )}] }]" "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, From 8a32345670bf12e9bf31104c8635164582f099af Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Tue, 12 Nov 2024 19:30:50 +0530 Subject: [PATCH 08/28] feat: common namespace --- templates.tf | 2 ++ templates/apiary-hms-readonly.json | 2 +- templates/apiary-hms-readwrite.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates.tf b/templates.tf index 97b8922..e381a42 100644 --- a/templates.tf +++ b/templates.tf @@ -47,6 +47,7 @@ locals{ hms_autogather_stats = var.hms_autogather_stats hms_rw_db_connection_pool_size = var.hms_rw_db_connection_pool_size hms_rw_request_partition_limit = var.hms_rw_request_partition_limit == "" ? "" : var.hms_rw_request_partition_limit + datadog_metrics_hms_readwrite_readonly = var.datadog_metrics_hms_readwrite_readonly #to instruct docker to turn off upgrading hive db schema when using external database external_database = "${var.external_database_host == "" ? "" : "1"}" @@ -129,5 +130,6 @@ locals{ tcp_keepalive_probes = var.tcp_keepalive_probes hms_readwrite_namespace = var.hms_readwrite_namespace hms_readonly_namespace = var.hms_readonly_namespace + datadog_metrics_hms_readwrite_readonly = var.datadog_metrics_hms_readwrite_readonly }) } diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index 53cd1ea..f864fe1 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [${join(\",\", ${var.datadog_metrics_hms_readwrite_readonly} )}] }]" + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [${join(\",\", ${datadog_metrics_hms_readwrite_readonly} )}] }]" "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index 1e6e13b..1f64b9f 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readwrite_namespace}\", \"metrics\": [\"metrics_classloading_loaded_value\", \"metrics_threads_count_value\", \"metrics_memory_heap_max_value\", \"metrics_init_total_count_tables_value\", \"metrics_init_total_count_dbs_value\", \"metrics_memory_heap_used_value\", \"metrics_init_total_count_partitions_value\", \"jvm_threads_current\", \"jvm_threads_started_total\", \"jvm_memory_bytes_used\", \"jvm_memory_bytes_init\", \"jvm_gc_collection_seconds_count\", \"jvm_gc_collection_seconds\", \"process_cpu_seconds_total\", \"java_lang_operatingsystem_processcpuload\", \"java_lang_operatingsystem_processcputime\", \"metrics_threads_runnable_count_value\", \"metrics_threads_waiting_count_value\", \"java_lang_memory_heapmemoryusage_used\", \"metrics_memory_heap_init_value\", \"metrics_api_get_partition_by_name_count\", \"metrics_api_get_partitions_by_names_count\", \"metrics_api_get_partition_names_count\", \"metrics_api_get_partitions_by_expr_count\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partition_count\", \"metrics_api_get_partitions_by_filter_count\", \"metrics_api_add_partitions_count\", \"metrics_api_add_partitions_req_count\", \"metrics_api_drop_partition_by_name_count\", \"metrics_api_add_partition_count\", \"metrics_api_alter_partitions_count\", \"metrics_api_create_table_count\", \"metrics_api_alter_table_with_cascade_count\", \"metrics_api_get_table_meta_count\", \"metrics_api_get_table_metas_count\", \"metrics_api_get_table_count\", \"metrics_api_alter_table_count\", \"metrics_api_get_tables_count\", \"metrics_api_get_all_tables_count\", \"metrics_api_drop_table_count\", \"metrics_api_get_multi_table_count\", \"metrics_api_get_database_count\", \"metrics_api_get_all_databases_count\", \"metrics_api_get_databases_count\", \"metrics_api_create_function_count\", \"metrics_api_getmetaconf_count\", \"metrics_api_alter_table_with_environment_context_count\", \"metrics_api_delete_column_statistics_by_table_count\", \"metrics_api_get_functions_count\", \"metrics_api_get_function_count\", \"metrics_api_shutdown_count\", \"metrics_api_flushcache_count\", \"metrics_api_get_indexes_count\", \"metrics_api_get_config_value_count\", \"metrics_api_set_ugi_count\", \"metrics_api_get_all_functions_count\", \"metrics_api_get_table_req_95thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_table_req_count\", \"metrics_api_get_table_req_max\", \"metrics_api_get_databases_count\", \"metrics_api_get_databases_95thpercentile\", \"metrics_api_get_databases_50thpercentile\", \"metrics_api_get_databases_max\", \"metrics_api_get_partitions_95thpercentile\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_partitions_count\", \"metrics_api_get_partitions_max\", \"metrics_api_get_partitions_50thpercentile\", \"metrics_api_get_table_req_50thpercentile\", \"metrics_api_get_database_95thpercentile\", \"metrics_api_get_database_50thpercentile\", \"metrics_kafka_listener_failures_count\", \"metrics_kafka_listener_successes_count\", \"metrics_api_get_table_objects_by_name_req_max\" ], \"type_overrides\": { \"metrics_classloading_loaded_value\": \"gauge\", \"metrics_threads_count_value\": \"gauge\", \"metrics_memory_heap_max_value\": \"gauge\", \"metrics_init_total_count_tables_value\": \"gauge\", \"metrics_init_total_count_dbs_value\": \"gauge\", \"metrics_memory_heap_used_value\": \"gauge\", \"metrics_init_total_count_partitions_value\": \"gauge\", \"jvm_threads_current\": \"gauge\", \"jvm_threads_started_total\": \"gauge\", \"jvm_memory_bytes_used\": \"gauge\", \"jvm_memory_bytes_init\": \"gauge\", \"jvm_gc_collection_seconds_count\": \"gauge\", \"jvm_gc_collection_seconds\": \"gauge\", \"process_cpu_seconds_total\": \"gauge\", \"java_lang_operatingsystem_processcpuload\": \"gauge\", \"java_lang_operatingsystem_processcputime\": \"gauge\", \"metrics_threads_runnable_count_value\": \"gauge\", \"metrics_threads_waiting_count_value\": \"gauge\", \"java_lang_memory_heapmemoryusage_used\": \"gauge\", \"metrics_memory_heap_init_value\": \"gauge\", \"metrics_api_get_partition_by_name_count\": \"gauge\", \"metrics_api_get_partitions_by_names_count\": \"gauge\", \"metrics_api_get_partition_names_count\": \"gauge\", \"metrics_api_get_partitions_by_expr_count\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partition_count\": \"gauge\", \"metrics_api_get_partitions_by_filter_count\": \"gauge\", \"metrics_api_add_partitions_count\": \"gauge\", \"metrics_api_add_partitions_req_count\": \"gauge\", \"metrics_api_drop_partition_by_name_count\": \"gauge\", \"metrics_api_add_partition_count\": \"gauge\", \"metrics_api_alter_partitions_count\": \"gauge\", \"metrics_api_create_table_count\": \"gauge\", \"metrics_api_alter_table_with_cascade_count\": \"gauge\", \"metrics_api_get_table_meta_count\": \"gauge\", \"metrics_api_get_table_metas_count\": \"gauge\", \"metrics_api_get_table_count\": \"gauge\", \"metrics_api_alter_table_count\": \"gauge\", \"metrics_api_get_tables_count\": \"gauge\", \"metrics_api_get_all_tables_count\": \"gauge\", \"metrics_api_drop_table_count\": \"gauge\", \"metrics_api_get_multi_table_count\": \"gauge\", \"metrics_api_get_database_count\": \"gauge\", \"metrics_api_get_all_databases_count\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_create_function_count\": \"gauge\", \"metrics_api_getmetaconf_count\": \"gauge\", \"metrics_api_alter_table_with_environment_context_count\": \"gauge\", \"metrics_api_delete_column_statistics_by_table_count\": \"gauge\", \"metrics_api_get_functions_count\": \"gauge\", \"metrics_api_get_function_count\": \"gauge\", \"metrics_api_shutdown_count\": \"gauge\", \"metrics_api_flushcache_count\": \"gauge\", \"metrics_api_get_indexes_count\": \"gauge\", \"metrics_api_get_config_value_count\": \"gauge\", \"metrics_api_set_ugi_count\": \"gauge\", \"metrics_api_get_all_functions_count\": \"gauge\", \"metrics_api_get_table_req_95thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_count\": \"gauge\", \"metrics_api_get_table_req_max\": \"gauge\", \"metrics_api_get_databases_count\": \"gauge\", \"metrics_api_get_databases_95thpercentile\": \"gauge\", \"metrics_api_get_databases_50thpercentile\": \"gauge\", \"metrics_api_get_databases_max\": \"gauge\", \"metrics_api_get_partitions_95thpercentile\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_partitions_count\": \"gauge\", \"metrics_api_get_partitions_max\": \"gauge\", \"metrics_api_get_partitions_50thpercentile\": \"gauge\", \"metrics_api_get_table_req_50thpercentile\": \"gauge\",\"metrics_api_get_database_95thpercentile\": \"gauge\",\"metrics_api_get_database_50thpercentile\": \"gauge\", \"metrics_kafka_listener_failures_count\": \"gauge\", \"metrics_kafka_listener_successes_count\": \"gauge\", \"metrics_api_get_table_objects_by_name_req_max\": \"gauge\"} }]", + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readwrite_namespace}\", \"metrics\": [${join(\",\", ${datadog_metrics_hms_readwrite_readonly} )}] }]" "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, From a7b8b9496e8af534263500434ce488abcec74b31 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Tue, 12 Nov 2024 19:35:20 +0530 Subject: [PATCH 09/28] feat: common namespace --- templates/apiary-hms-readwrite.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index 1f64b9f..d0e6c19 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readwrite_namespace}\", \"metrics\": [${join(\",\", ${datadog_metrics_hms_readwrite_readonly} )}] }]" + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readwrite_namespace}\", \"metrics\": [${join(",", ${datadog_metrics_hms_readwrite_readonly} )}] }]" "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, From 69272e6ab02053911d9e556c4a3067da251435c7 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Tue, 12 Nov 2024 19:37:19 +0530 Subject: [PATCH 10/28] feat: common namespace --- templates/apiary-hms-readwrite.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index d0e6c19..ca0f5a1 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readwrite_namespace}\", \"metrics\": [${join(",", ${datadog_metrics_hms_readwrite_readonly} )}] }]" + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [${join(\",\", var.datadog_metrics_hms_readwrite_readonly)}] }]" "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, From 4e33ff5866261389fb79be770584c268025fc103 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Tue, 12 Nov 2024 19:37:38 +0530 Subject: [PATCH 11/28] feat: common namespace --- templates/apiary-hms-readwrite.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index ca0f5a1..87ec74a 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [${join(\",\", var.datadog_metrics_hms_readwrite_readonly)}] }]" + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readwrite_namespace}\", \"metrics\": [${join(\",\", var.datadog_metrics_hms_readwrite_readonly)}] }]" "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, From a2e70778893301e0331dc0c88d0024a03f7f2ed5 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 11:20:51 -0800 Subject: [PATCH 12/28] fix: fxing syntax --- common.tf | 2 ++ templates.tf | 10 +++++++--- templates/apiary-hms-readonly.json | 2 +- templates/apiary-hms-readwrite.json | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/common.tf b/common.tf index 40342cf..a12b717 100644 --- a/common.tf +++ b/common.tf @@ -64,6 +64,8 @@ locals { ro_ingress_cidr = var.ingress_cidr rw_ingress_cidr = length(var.rw_ingress_cidr) == 0 ? var.ingress_cidr : var.rw_ingress_cidr + hms_metrics = join("\",\"", var.datadog_metrics_hms_readwrite_readonly) + hms_metrics_type_overrides = join("\": \"gauge\",\"", var.datadog_metrics_hms_readwrite_readonly) } data "aws_iam_account_alias" "current" {} diff --git a/templates.tf b/templates.tf index e381a42..e677505 100644 --- a/templates.tf +++ b/templates.tf @@ -71,9 +71,11 @@ locals{ datadog_agent_version = var.datadog_agent_version datadog_agent_enabled = var.datadog_agent_enabled datadog_tags = local.datadog_tags - tcp_keepalive_time = var.tcp_keepalive_time - tcp_keepalive_intvl = var.tcp_keepalive_intvl - tcp_keepalive_probes = var.tcp_keepalive_probes + tcp_keepalive_time = var.tcp_keepalive_time + tcp_keepalive_intvl = var.tcp_keepalive_intvl + tcp_keepalive_probes = var.tcp_keepalive_probes + hms_metrics = local.hms_metrics + hms_metrics_type_overrides = local.hms_metrics_type_overrides }) hms_readonly_template = templatefile("${path.module}/templates/apiary-hms-readonly.json", { @@ -131,5 +133,7 @@ locals{ hms_readwrite_namespace = var.hms_readwrite_namespace hms_readonly_namespace = var.hms_readonly_namespace datadog_metrics_hms_readwrite_readonly = var.datadog_metrics_hms_readwrite_readonly + hms_metrics = local.hms_metrics + hms_metrics_type_overrides = local.hms_metrics_type_overrides }) } diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index f864fe1..d86c6b5 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [${join(\",\", ${datadog_metrics_hms_readwrite_readonly} )}] }]" + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index 87ec74a..ae04d48 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readwrite_namespace}\", \"metrics\": [${join(\",\", var.datadog_metrics_hms_readwrite_readonly)}] }]" + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readwrite_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, From 3b05c7c5f3ce7f6800c93f8234138e02c1d339fa Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 11:29:39 -0800 Subject: [PATCH 13/28] fix: format list --- variables.tf | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index 06cbd08..2c62b1d 100644 --- a/variables.tf +++ b/variables.tf @@ -870,7 +870,98 @@ variable "hms_housekeeper_additional_environment_variables" { variable "datadog_metrics_hms_readwrite_readonly" { description = "HMS metrics to be sent to Datadog for both Readonly and Readwrite" type = list(string) - default = ["metrics_classloading_loaded_value", "metrics_threads_count_value", "metrics_memory_heap_max_value", "metrics_init_total_count_tables_value", "metrics_init_total_count_dbs_value", "metrics_memory_heap_used_value", "metrics_init_total_count_partitions_value", "jvm_threads_current", "jvm_threads_started_total", "jvm_memory_bytes_used", "jvm_memory_bytes_init", "jvm_gc_collection_seconds_count", "jvm_gc_collection_seconds", "process_cpu_seconds_total", "java_lang_operatingsystem_processcpuload", "java_lang_operatingsystem_processcputime", "metrics_threads_runnable_count_value", "metrics_threads_waiting_count_value", "java_lang_memory_heapmemoryusage_used", "metrics_memory_heap_init_value", "metrics_api_get_partition_by_name_count", "metrics_api_get_partitions_by_names_count", "metrics_api_get_partition_names_count", "metrics_api_get_partitions_by_expr_count", "metrics_api_get_partitions_count", "metrics_api_get_partition_count", "metrics_api_get_partitions_by_filter_count", "metrics_api_get_partitions_by_filter_50thpercentile", "metrics_api_get_partitions_by_filter_95thpercentile", "metrics_api_get_partitions_by_filter_999thpercentile", "metrics_api_add_partitions_count", "metrics_api_add_partitions_req_count", "metrics_api_drop_partition_by_name_count", "metrics_api_add_partition_count", "metrics_api_alter_partitions_count", "metrics_api_create_table_count", "metrics_api_alter_table_with_cascade_count", "metrics_api_get_table_meta_count", "metrics_api_get_table_metas_count", "metrics_api_get_table_count", "metrics_api_alter_table_count", "metrics_api_get_tables_count", "metrics_api_get_all_tables_count", "metrics_api_drop_table_count", "metrics_api_get_multi_table_count", "metrics_api_get_database_count", "metrics_api_get_all_databases_count", "metrics_api_get_databases_count", "metrics_api_create_function_count", "metrics_api_getmetaconf_count", "metrics_api_alter_table_with_environment_context_count", "metrics_api_delete_column_statistics_by_table_count", "metrics_api_get_functions_count", "metrics_api_get_function_count", "metrics_api_shutdown_count", "metrics_api_flushcache_count", "metrics_api_get_indexes_count", "metrics_api_get_config_value_count", "metrics_api_set_ugi_count", "metrics_api_get_all_functions_count", "metrics_api_get_table_req_50thpercentile", "metrics_api_get_table_req_95thpercentile", "metrics_api_get_table_req_999thpercentile", "metrics_api_get_table_req_count", "metrics_api_get_table_req_max", "metrics_api_get_databases_count", "metrics_api_get_databases_50thpercentile", "metrics_api_get_databases_95thpercentile", "metrics_api_get_databases_999thpercentile", "metrics_api_get_databases_max", "metrics_api_get_partitions_50thpercentile", "metrics_api_get_partitions_95thpercentile", "metrics_api_get_partitions_999thpercentile", "metrics_api_get_partitions_count", "metrics_api_get_partitions_max", "metrics_api_get_partitions_50thpercentile", "metrics_api_get_partitions_95thpercentile", "metrics_api_get_partitions_999thpercentile", "metrics_api_get_database_50thpercentile", "metrics_api_get_database_95thpercentile", "metrics_api_get_database_999thpercentile", "metrics_kafka_listener_failures_count", "metrics_kafka_listener_successes_count", "metrics_api_get_table_objects_by_name_req_max", "metrics_open_connections_count", "java_lang_memory_heapmemoryusage_max", "metrics_memory_non_heap_used_value", "metrics_memory_non_heap_max_value", "java_lang_garbagecollector_lastgcinfo_duration", "metrics_jvm_pause_warn_threshold_count", "metrics_jvm_pause_extrasleeptime_count", "metrics_threads_deadlock_count_value"] + default = [ + "metrics_classloading_loaded_value", + "metrics_threads_count_value", + "metrics_memory_heap_max_value", + "metrics_init_total_count_tables_value", + "metrics_init_total_count_dbs_value", + "metrics_memory_heap_used_value", + "metrics_init_total_count_partitions_value", + "jvm_threads_current", "jvm_threads_started_total", + "jvm_memory_bytes_used", "jvm_memory_bytes_init", + "jvm_gc_collection_seconds_count", + "jvm_gc_collection_seconds", + "process_cpu_seconds_total", + "java_lang_operatingsystem_processcpuload", + "java_lang_operatingsystem_processcputime", + "metrics_threads_runnable_count_value", + "metrics_threads_waiting_count_value", + "java_lang_memory_heapmemoryusage_used", + "metrics_memory_heap_init_value", + "metrics_api_get_partition_by_name_count", + "metrics_api_get_partitions_by_names_count", + "metrics_api_get_partition_names_count", + "metrics_api_get_partitions_by_expr_count", + "metrics_api_get_partitions_count", + "metrics_api_get_partition_count", + "metrics_api_get_partitions_by_filter_count", + "metrics_api_get_partitions_by_filter_50thpercentile", + "metrics_api_get_partitions_by_filter_95thpercentile", + "metrics_api_get_partitions_by_filter_999thpercentile", + "metrics_api_add_partitions_count", + "metrics_api_add_partitions_req_count", + "metrics_api_drop_partition_by_name_count", + "metrics_api_add_partition_count", + "metrics_api_alter_partitions_count", + "metrics_api_create_table_count", + "metrics_api_alter_table_with_cascade_count", + "metrics_api_get_table_meta_count", + "metrics_api_get_table_metas_count", + "metrics_api_get_table_count", + "metrics_api_alter_table_count", + "metrics_api_get_tables_count", + "metrics_api_get_all_tables_count", + "metrics_api_drop_table_count", + "metrics_api_get_multi_table_count", + "metrics_api_get_database_count", + "metrics_api_get_all_databases_count", + "metrics_api_get_databases_count", + "metrics_api_create_function_count", + "metrics_api_getmetaconf_count", + "metrics_api_alter_table_with_environment_context_count", + "metrics_api_delete_column_statistics_by_table_count", + "metrics_api_get_functions_count", + "metrics_api_get_function_count", + "metrics_api_shutdown_count", + "metrics_api_flushcache_count", + "metrics_api_get_indexes_count", + "metrics_api_get_config_value_count", + "metrics_api_set_ugi_count", + "metrics_api_get_all_functions_count", + "metrics_api_get_table_req_50thpercentile", + "metrics_api_get_table_req_95thpercentile", + "metrics_api_get_table_req_999thpercentile", + "metrics_api_get_table_req_count", + "metrics_api_get_table_req_max", + "metrics_api_get_databases_count", + "metrics_api_get_databases_50thpercentile", + "metrics_api_get_databases_95thpercentile", + "metrics_api_get_databases_999thpercentile", + "metrics_api_get_databases_max", + "metrics_api_get_partitions_50thpercentile", + "metrics_api_get_partitions_95thpercentile", + "metrics_api_get_partitions_999thpercentile", + "metrics_api_get_partitions_count", + "metrics_api_get_partitions_max", + "metrics_api_get_partitions_50thpercentile", + "metrics_api_get_partitions_95thpercentile", + "metrics_api_get_partitions_999thpercentile", + "metrics_api_get_database_50thpercentile", + "metrics_api_get_database_95thpercentile", + "metrics_api_get_database_999thpercentile", + "metrics_kafka_listener_failures_count", + "metrics_kafka_listener_successes_count", + "metrics_api_get_table_objects_by_name_req_max", + "metrics_open_connections_count", + "java_lang_memory_heapmemoryusage_max", + "metrics_memory_non_heap_used_value", + "metrics_memory_non_heap_max_value", + "java_lang_garbagecollector_lastgcinfo_duration", + "metrics_jvm_pause_warn_threshold_count", + "metrics_jvm_pause_extrasleeptime_count", + "metrics_threads_deadlock_count_value" + ] } variable "datadog_metrics_enabled" { From eea9763237f0bc36e41394ee2e64d4fcfe76d5b5 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 11:32:10 -0800 Subject: [PATCH 14/28] fix: change default value --- variables.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/variables.tf b/variables.tf index 2c62b1d..94c4efc 100644 --- a/variables.tf +++ b/variables.tf @@ -455,13 +455,13 @@ variable "hms_rw_k8s_pdb_settings" { variable "hms_readwrite_namespace" { description = "ECS readwrite namespace" type = string - default = "hms_readwrite" + default = "hms_readwrite_legacy" } variable "hms_readonly_namespace" { description = "ECS readonly namespace" type = string - default = "hms_readonly" + default = "hms_readonly_legacy" } From bf83b2df657558597d4ba147f80e00ac8a955125 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 11:51:03 -0800 Subject: [PATCH 15/28] feat: update change log --- CHANGELOG.md | 7 +++++++ VARIABLES.md | 6 ++++-- k8s-readonly.tf | 2 +- k8s-readwrite.tf | 2 +- templates.tf | 6 ++---- templates/apiary-hms-readonly.json | 2 +- templates/apiary-hms-readwrite.json | 2 +- variables.tf | 19 +++++++++++++++---- 8 files changed, 32 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 203e2c7..e681624 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a ## [7.7.0] - 2024-11-12 ### Changed - Updated the hms namespaces for metrics for both readwrite and readonly. +### Added +- Added following variables: + - `hms_ecs_metrics_readwrite_namespace` + - `hms_ecs_metrics_readonly_namespace` + - `hms_k8s_metrics_readwrite_namespace` + - `hms_k8s_metrics_readonly_namespace` + - `hms_ro_tolerations` ## [7.6.1] - 2024-10-30 ### Changed diff --git a/VARIABLES.md b/VARIABLES.md index fd56a3e..e977836 100644 --- a/VARIABLES.md +++ b/VARIABLES.md @@ -138,8 +138,10 @@ | tcp\_keepalive\_probes | Sets net.ipv4.tcp_keepalive_probes (seconds) | number | `2` | no | | ecs\_platform\_version | ECS Service Platform Version | `string` | `"LATEST"` | ecs\_requires\_compatibilities | ECS task definition requires compatibilities. | `list(string)` | `["EC2", "FARGATE"]` | no | -| hms\_readonly\_namespace | ECS readwrite namespace | `string` | `hms_readonly` | no | -| hms\_readwrite\_namespace | ECS readonly namespace | `string` | `hms_readwrite` | no | +| hms\_ecs\_metrics\_readonly\_namespace | ECS readwrite metrics namespace | `string` | `hmsreadonlylegacy` | no | +| hms\_ecs\_metrics\_readwrite\_namespace | ECS readonly metrics namespace | `string` | `hmsreadwritelegacy` | no | +| hms\_k8s\_metrics\_readonly\_namespace | K8s readwrite metrics namespace | `string` | `hms_readonly` | no | +| hms\_k8s\_metrics\_readwrite\_namespace | K8s readonly metrics namespace | `string` | `hms_readwrite` | no | ### apiary_assume_roles diff --git a/k8s-readonly.tf b/k8s-readonly.tf index c659db1..54ad743 100644 --- a/k8s-readonly.tf +++ b/k8s-readonly.tf @@ -38,7 +38,7 @@ resource "kubernetes_deployment_v1" "apiary_hms_readonly" { annotations = { "ad.datadoghq.com/${local.hms_alias}-readonly.check_names" = var.datadog_metrics_enabled ? "[\"prometheus\"]" : null "ad.datadoghq.com/${local.hms_alias}-readonly.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null - "ad.datadoghq.com/${local.hms_alias}-readonly.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.datadog_metrics_port}/actuator/prometheus\", \"namespace\": \"hms_readonly\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_hms_readwrite_readonly)}\" ] , \"type_overrides\": { \"${join("\": \"gauge\",\"", var.datadog_metrics_hms_readwrite_readonly)}\": \"gauge\"} }]" : null + "ad.datadoghq.com/${local.hms_alias}-readonly.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.datadog_metrics_port}/actuator/prometheus\", \"namespace\": \"${var.hms_k8s_metrics_readonly_namespace}\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_hms_readwrite_readonly)}\" ] , \"type_overrides\": { \"${join("\": \"gauge\",\"", var.datadog_metrics_hms_readwrite_readonly)}\": \"gauge\"} }]" : null "iam.amazonaws.com/role" = var.oidc_provider == "" ? aws_iam_role.apiary_hms_readonly.name : null "prometheus.io/path" = "/metrics" "prometheus.io/port" = "8080" diff --git a/k8s-readwrite.tf b/k8s-readwrite.tf index 02fcf03..0692c42 100644 --- a/k8s-readwrite.tf +++ b/k8s-readwrite.tf @@ -38,7 +38,7 @@ resource "kubernetes_deployment_v1" "apiary_hms_readwrite" { annotations = { "ad.datadoghq.com/${local.hms_alias}-readwrite.check_names" = var.datadog_metrics_enabled ? "[\"prometheus\"]" : null "ad.datadoghq.com/${local.hms_alias}-readwrite.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null - "ad.datadoghq.com/${local.hms_alias}-readwrite.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.datadog_metrics_port}/actuator/prometheus\", \"namespace\": \"hms_readwrite\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_hms_readwrite_readonly)}\" ] , \"type_overrides\": { \"${join("\": \"gauge\",\"", var.datadog_metrics_hms_readwrite_readonly)}\": \"gauge\"} }]" : null + "ad.datadoghq.com/${local.hms_alias}-readwrite.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.datadog_metrics_port}/actuator/prometheus\", \"namespace\": \"${var.hms_k8s_metrics_readwrite_namespace}\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_hms_readwrite_readonly)}\" ] , \"type_overrides\": { \"${join("\": \"gauge\",\"", var.datadog_metrics_hms_readwrite_readonly)}\": \"gauge\"} }]" : null "iam.amazonaws.com/role" = var.oidc_provider == "" ? aws_iam_role.apiary_hms_readwrite.name : null "prometheus.io/path" = "/metrics" "prometheus.io/port" = "8080" diff --git a/templates.tf b/templates.tf index e677505..b276082 100644 --- a/templates.tf +++ b/templates.tf @@ -27,8 +27,7 @@ locals{ table_param_filter = var.enable_metadata_events ? var.table_param_filter : "" enable_gluesync = var.enable_gluesync ? "1" : "" gluedb_prefix = "${local.gluedb_prefix}" - hms_readwrite_namespace = "${var.hms_readwrite_namespace}" - hms_readonly_namespace = "${var.hms_readonly_namespace}" + hms_metrics_namespace = "${var.hms_ecs_metrics_readwrite_namespace}" ranger_service_name = "${local.instance_alias}-metastore" ranger_policy_manager_url = "${var.ranger_policy_manager_url}" ranger_audit_solr_url = "${var.ranger_audit_solr_url}" @@ -130,8 +129,7 @@ locals{ tcp_keepalive_time = var.tcp_keepalive_time tcp_keepalive_intvl = var.tcp_keepalive_intvl tcp_keepalive_probes = var.tcp_keepalive_probes - hms_readwrite_namespace = var.hms_readwrite_namespace - hms_readonly_namespace = var.hms_readonly_namespace + hms_metrics_namespace = "${var.hms_ecs_metrics_readonly_namespace}" datadog_metrics_hms_readwrite_readonly = var.datadog_metrics_hms_readwrite_readonly hms_metrics = local.hms_metrics hms_metrics_type_overrides = local.hms_metrics_type_overrides diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index d86c6b5..ea7a36b 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readonly_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index ae04d48..64220d2 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_readwrite_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", "com.datadoghq.ad.check_names": "[\"prometheus\"]", "com.datadoghq.ad.init_configs": "[{}]" }, diff --git a/variables.tf b/variables.tf index 94c4efc..eba3444 100644 --- a/variables.tf +++ b/variables.tf @@ -452,18 +452,29 @@ variable "hms_rw_k8s_pdb_settings" { } } -variable "hms_readwrite_namespace" { +variable "hms_ecs_metrics_readwrite_namespace" { description = "ECS readwrite namespace" type = string - default = "hms_readwrite_legacy" + default = "hmsreadwritelegacy" } -variable "hms_readonly_namespace" { +variable "hms_ecs_metrics_readonly_namespace" { description = "ECS readonly namespace" type = string - default = "hms_readonly_legacy" + default = "hmsreadonlylegacy" } +variable "hms_k8s_metrics_readwrite_namespace" { + description = "ECS readwrite namespace" + type = string + default = "hms_readwrite" +} + +variable "hms_k8s_metrics_readonly_namespace" { + description = "ECS readonly namespace" + type = string + default = "hms_readonly" +} variable "hms_rw_node_affinity" { description = < Date: Tue, 19 Nov 2024 11:53:06 -0800 Subject: [PATCH 16/28] fix: removed unused local variables --- common.tf | 2 -- 1 file changed, 2 deletions(-) diff --git a/common.tf b/common.tf index a12b717..34c398c 100644 --- a/common.tf +++ b/common.tf @@ -9,8 +9,6 @@ locals { apiary_bucket_prefix = "${local.instance_alias}-${data.aws_caller_identity.current.account_id}-${data.aws_region.current.name}" apiary_assume_role_bucket_prefix = [for assumerole in var.apiary_assume_roles : "${local.instance_alias}-${data.aws_caller_identity.current.account_id}-${lookup(assumerole, "allow_cross_region_access", false) ? "*" : data.aws_region.current.name}"] enable_route53_records = var.apiary_domain_name == "" ? false : true - hms_readwrite_namespace = var.hms_readwrite_namespace - hms_readonly_namespace = var.hms_readonly_namespace datadog_tags = join(" ", formatlist("%s:%s", keys(var.apiary_tags), values(var.apiary_tags))) # # Create a new list of maps with some extra attributes needed later From e59cfea48c9532149a98a2201df251d349191081 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 11:55:21 -0800 Subject: [PATCH 17/28] fix: remove unused input parameters in templete --- templates.tf | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates.tf b/templates.tf index b276082..c8d5aa7 100644 --- a/templates.tf +++ b/templates.tf @@ -46,7 +46,6 @@ locals{ hms_autogather_stats = var.hms_autogather_stats hms_rw_db_connection_pool_size = var.hms_rw_db_connection_pool_size hms_rw_request_partition_limit = var.hms_rw_request_partition_limit == "" ? "" : var.hms_rw_request_partition_limit - datadog_metrics_hms_readwrite_readonly = var.datadog_metrics_hms_readwrite_readonly #to instruct docker to turn off upgrading hive db schema when using external database external_database = "${var.external_database_host == "" ? "" : "1"}" @@ -130,7 +129,6 @@ locals{ tcp_keepalive_intvl = var.tcp_keepalive_intvl tcp_keepalive_probes = var.tcp_keepalive_probes hms_metrics_namespace = "${var.hms_ecs_metrics_readonly_namespace}" - datadog_metrics_hms_readwrite_readonly = var.datadog_metrics_hms_readwrite_readonly hms_metrics = local.hms_metrics hms_metrics_type_overrides = local.hms_metrics_type_overrides }) From 88d6f5a9972ed58d90156fe2c01c1a52b46527e7 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 11:58:01 -0800 Subject: [PATCH 18/28] fix: change variable descriptions --- variables.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/variables.tf b/variables.tf index eba3444..0389686 100644 --- a/variables.tf +++ b/variables.tf @@ -453,25 +453,25 @@ variable "hms_rw_k8s_pdb_settings" { } variable "hms_ecs_metrics_readwrite_namespace" { - description = "ECS readwrite namespace" + description = "ECS readwrite metrics namespace" type = string default = "hmsreadwritelegacy" } variable "hms_ecs_metrics_readonly_namespace" { - description = "ECS readonly namespace" + description = "ECS readonly metrics namespace" type = string default = "hmsreadonlylegacy" } variable "hms_k8s_metrics_readwrite_namespace" { - description = "ECS readwrite namespace" + description = "K8s readwrite metrics namespace" type = string default = "hms_readwrite" } variable "hms_k8s_metrics_readonly_namespace" { - description = "ECS readonly namespace" + description = "K8s readonly metrics namespace" type = string default = "hms_readonly" } From d916fffa255f03c8ac00db0b1530888e0569d268 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 11:58:22 -0800 Subject: [PATCH 19/28] fix: update change log date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e681624..8a31c23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [7.7.0] - 2024-11-12 +## [7.7.0] - 2024-11-19 ### Changed - Updated the hms namespaces for metrics for both readwrite and readonly. ### Added From 6a364133964f8009954a287dec4a65b6c0b4e2c0 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 12:36:57 -0800 Subject: [PATCH 20/28] fix: test json --- templates/apiary-hms-readonly.json | 2 +- templates/apiary-hms-readwrite.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index ea7a36b..b704122 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -76,7 +76,7 @@ }, "dockerLabels": { "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", - "com.datadoghq.ad.check_names": "[\"prometheus\"]", + "com.datadoghq.ad.check_names": [\"prometheus\"], "com.datadoghq.ad.init_configs": "[{}]" }, "portMappings": [ diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index 64220d2..0f670fc 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -76,7 +76,7 @@ }, "dockerLabels": { "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", - "com.datadoghq.ad.check_names": "[\"prometheus\"]", + "com.datadoghq.ad.check_names": [\"prometheus\"], "com.datadoghq.ad.init_configs": "[{}]" }, "portMappings": [ From 5c5523e7006dc0e170a56a1016ddcbfdd29d1e6e Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 12:44:32 -0800 Subject: [PATCH 21/28] fix: fix json format --- templates/apiary-hms-readonly.json | 2 +- templates/apiary-hms-readwrite.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index b704122..f60dd36 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", + "com.datadoghq.ad.instances": [{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }], "com.datadoghq.ad.check_names": [\"prometheus\"], "com.datadoghq.ad.init_configs": "[{}]" }, diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index 0f670fc..dfb0b2b 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -75,7 +75,7 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", + "com.datadoghq.ad.instances": [{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }], "com.datadoghq.ad.check_names": [\"prometheus\"], "com.datadoghq.ad.init_configs": "[{}]" }, From 6f53e0d8a2a2b54bc6c8734daf8ee78841416175 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 12:54:20 -0800 Subject: [PATCH 22/28] fix: json template format --- templates/apiary-hms-readonly.json | 6 +++--- templates/apiary-hms-readwrite.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index f60dd36..9e5b321 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -75,9 +75,9 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": [{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }], - "com.datadoghq.ad.check_names": [\"prometheus\"], - "com.datadoghq.ad.init_configs": "[{}]" + "com.datadoghq.ad.instances": [{ "prometheus_url": "http://%%host%%:8080/actuator/prometheus", "namespace": "${hms_metrics_namespace}", "metrics": ["${hms_metrics}"],"type_overrides":{"${hms_metrics_type_overrides}": "gauge"} }], + "com.datadoghq.ad.check_names": ["prometheus"], + "com.datadoghq.ad.init_configs": [{}] }, "portMappings": [ { diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index dfb0b2b..8198fad 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -75,9 +75,9 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": [{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }], - "com.datadoghq.ad.check_names": [\"prometheus\"], - "com.datadoghq.ad.init_configs": "[{}]" + "com.datadoghq.ad.instances": [{ "prometheus_url": "http://%%host%%:8080/actuator/prometheus", "namespace": "${hms_metrics_namespace}", "metrics": ["${hms_metrics}"],"type_overrides":{"${hms_metrics_type_overrides}": "gauge"} }], + "com.datadoghq.ad.check_names": ["prometheus"], + "com.datadoghq.ad.init_configs": [{}] }, "portMappings": [ { From a015e2ea5ad8332b45714fcd82feeae3934b1257 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 13:04:38 -0800 Subject: [PATCH 23/28] fix: test ecs defination --- ecs.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecs.tf b/ecs.tf index 8db8c4f..a64546a 100644 --- a/ecs.tf +++ b/ecs.tf @@ -25,7 +25,7 @@ resource "aws_ecs_task_definition" "apiary_hms_readwrite" { memory = var.hms_rw_heapsize cpu = var.hms_rw_cpu requires_compatibilities = var.ecs_requires_compatibilities - container_definitions = local.hms_readwrite_template + container_definitions = jsonencode(local.hms_readwrite_template) tags = var.apiary_tags } @@ -38,7 +38,7 @@ resource "aws_ecs_task_definition" "apiary_hms_readonly" { memory = var.hms_ro_heapsize cpu = var.hms_ro_cpu requires_compatibilities = var.ecs_requires_compatibilities - container_definitions = local.hms_readonly_template + container_definitions = jsonencode(local.hms_readonly_template) tags = var.apiary_tags } From 86ed5ffd49df2db45eb9165d704ef23d2ad2a610 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 13:37:14 -0800 Subject: [PATCH 24/28] fix: revert --- ecs.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecs.tf b/ecs.tf index a64546a..8db8c4f 100644 --- a/ecs.tf +++ b/ecs.tf @@ -25,7 +25,7 @@ resource "aws_ecs_task_definition" "apiary_hms_readwrite" { memory = var.hms_rw_heapsize cpu = var.hms_rw_cpu requires_compatibilities = var.ecs_requires_compatibilities - container_definitions = jsonencode(local.hms_readwrite_template) + container_definitions = local.hms_readwrite_template tags = var.apiary_tags } @@ -38,7 +38,7 @@ resource "aws_ecs_task_definition" "apiary_hms_readonly" { memory = var.hms_ro_heapsize cpu = var.hms_ro_cpu requires_compatibilities = var.ecs_requires_compatibilities - container_definitions = jsonencode(local.hms_readonly_template) + container_definitions = local.hms_readonly_template tags = var.apiary_tags } From cf606d2328343a897e03454fff45c6a3ddfcf3a1 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 13:43:47 -0800 Subject: [PATCH 25/28] fix: replace with single quote --- templates/apiary-hms-readonly.json | 6 +++--- templates/apiary-hms-readwrite.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index 9e5b321..1fc27cf 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -75,9 +75,9 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": [{ "prometheus_url": "http://%%host%%:8080/actuator/prometheus", "namespace": "${hms_metrics_namespace}", "metrics": ["${hms_metrics}"],"type_overrides":{"${hms_metrics_type_overrides}": "gauge"} }], - "com.datadoghq.ad.check_names": ["prometheus"], - "com.datadoghq.ad.init_configs": [{}] + "com.datadoghq.ad.instances": '[{ "prometheus_url": "http://%%host%%:8080/actuator/prometheus", "namespace": "${hms_metrics_namespace}", "metrics": ["${hms_metrics}"],"type_overrides":{"${hms_metrics_type_overrides}": "gauge"} }]', + "com.datadoghq.ad.check_names": '["prometheus"]', + "com.datadoghq.ad.init_configs": '[{}]' }, "portMappings": [ { diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index 8198fad..b215367 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -75,9 +75,9 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": [{ "prometheus_url": "http://%%host%%:8080/actuator/prometheus", "namespace": "${hms_metrics_namespace}", "metrics": ["${hms_metrics}"],"type_overrides":{"${hms_metrics_type_overrides}": "gauge"} }], - "com.datadoghq.ad.check_names": ["prometheus"], - "com.datadoghq.ad.init_configs": [{}] + "com.datadoghq.ad.instances": '[{ "prometheus_url": "http://%%host%%:8080/actuator/prometheus", "namespace": "${hms_metrics_namespace}", "metrics": ["${hms_metrics}"],"type_overrides":{"${hms_metrics_type_overrides}": "gauge"} }]', + "com.datadoghq.ad.check_names": '["prometheus"]', + "com.datadoghq.ad.init_configs": '[{}]' }, "portMappings": [ { From e25ba404949a0d69f52e20401a06b097d91d60b5 Mon Sep 17 00:00:00 2001 From: janli Date: Tue, 19 Nov 2024 16:52:20 -0800 Subject: [PATCH 26/28] fix: fix escape --- common.tf | 4 ++-- templates/apiary-hms-readonly.json | 6 +++--- templates/apiary-hms-readwrite.json | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common.tf b/common.tf index 34c398c..3b058cc 100644 --- a/common.tf +++ b/common.tf @@ -62,8 +62,8 @@ locals { ro_ingress_cidr = var.ingress_cidr rw_ingress_cidr = length(var.rw_ingress_cidr) == 0 ? var.ingress_cidr : var.rw_ingress_cidr - hms_metrics = join("\",\"", var.datadog_metrics_hms_readwrite_readonly) - hms_metrics_type_overrides = join("\": \"gauge\",\"", var.datadog_metrics_hms_readwrite_readonly) + hms_metrics = join("\\\",\\\"", var.datadog_metrics_hms_readwrite_readonly) + hms_metrics_type_overrides = join("\\\": \\\"gauge\\\",\\\"", var.datadog_metrics_hms_readwrite_readonly) } data "aws_iam_account_alias" "current" {} diff --git a/templates/apiary-hms-readonly.json b/templates/apiary-hms-readonly.json index 1fc27cf..ea7a36b 100644 --- a/templates/apiary-hms-readonly.json +++ b/templates/apiary-hms-readonly.json @@ -75,9 +75,9 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": '[{ "prometheus_url": "http://%%host%%:8080/actuator/prometheus", "namespace": "${hms_metrics_namespace}", "metrics": ["${hms_metrics}"],"type_overrides":{"${hms_metrics_type_overrides}": "gauge"} }]', - "com.datadoghq.ad.check_names": '["prometheus"]', - "com.datadoghq.ad.init_configs": '[{}]' + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", + "com.datadoghq.ad.check_names": "[\"prometheus\"]", + "com.datadoghq.ad.init_configs": "[{}]" }, "portMappings": [ { diff --git a/templates/apiary-hms-readwrite.json b/templates/apiary-hms-readwrite.json index b215367..64220d2 100644 --- a/templates/apiary-hms-readwrite.json +++ b/templates/apiary-hms-readwrite.json @@ -75,9 +75,9 @@ } }, "dockerLabels": { - "com.datadoghq.ad.instances": '[{ "prometheus_url": "http://%%host%%:8080/actuator/prometheus", "namespace": "${hms_metrics_namespace}", "metrics": ["${hms_metrics}"],"type_overrides":{"${hms_metrics_type_overrides}": "gauge"} }]', - "com.datadoghq.ad.check_names": '["prometheus"]', - "com.datadoghq.ad.init_configs": '[{}]' + "com.datadoghq.ad.instances": "[{ \"prometheus_url\": \"http://%%host%%:8080/actuator/prometheus\", \"namespace\": \"${hms_metrics_namespace}\", \"metrics\": [\"${hms_metrics}\"],\"type_overrides\":{\"${hms_metrics_type_overrides}\": \"gauge\"} }]", + "com.datadoghq.ad.check_names": "[\"prometheus\"]", + "com.datadoghq.ad.init_configs": "[{}]" }, "portMappings": [ { From 9f592b181f7b15cb119a5fa75280ec7b412f0e4c Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Wed, 20 Nov 2024 17:13:31 +0530 Subject: [PATCH 27/28] Update variables.tf --- variables.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/variables.tf b/variables.tf index 0389686..9151244 100644 --- a/variables.tf +++ b/variables.tf @@ -455,13 +455,13 @@ variable "hms_rw_k8s_pdb_settings" { variable "hms_ecs_metrics_readwrite_namespace" { description = "ECS readwrite metrics namespace" type = string - default = "hmsreadwritelegacy" + default = "hms_readwrite_legacy" } variable "hms_ecs_metrics_readonly_namespace" { description = "ECS readonly metrics namespace" type = string - default = "hmsreadonlylegacy" + default = "hms_readonly_legacy" } variable "hms_k8s_metrics_readwrite_namespace" { From a925d29e4270c0a4b4e7892c87a8d8606b2c8d95 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Wed, 20 Nov 2024 17:20:03 +0530 Subject: [PATCH 28/28] Update CHANGELOG.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a31c23..5b5bac6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a - `hms_ecs_metrics_readonly_namespace` - `hms_k8s_metrics_readwrite_namespace` - `hms_k8s_metrics_readonly_namespace` - - `hms_ro_tolerations` ## [7.6.1] - 2024-10-30 ### Changed