diff --git a/modules/eks-monitoring/README.md b/modules/eks-monitoring/README.md index 1c984667..f71a583f 100644 --- a/modules/eks-monitoring/README.md +++ b/modules/eks-monitoring/README.md @@ -96,6 +96,7 @@ See examples using this Terraform modules in the **Amazon EKS** section of [this | [enable\_nginx](#input\_enable\_nginx) | Enable NGINX workloads monitoring, alerting and default dashboards | `bool` | `false` | no | | [enable\_node\_exporter](#input\_enable\_node\_exporter) | Enables or disables Node exporter. Disabling this might affect some data in the dashboards | `bool` | `true` | no | | [enable\_nvidia\_monitoring](#input\_enable\_nvidia\_monitoring) | Enables monitoring of nvidia metrics | `bool` | `true` | no | +| [enable\_polyglot](#input\_enable\_polyglot) | Enable monitoring for .Net,Rust and other languages | `bool` | `false` | no | | [enable\_recording\_rules](#input\_enable\_recording\_rules) | Enables or disables Managed Prometheus recording rules | `bool` | `true` | no | | [enable\_tracing](#input\_enable\_tracing) | Enables tracing with OTLP traces receiver to X-Ray | `bool` | `true` | no | | [flux\_config](#input\_flux\_config) | FluxCD configuration |
object({
create_namespace = optional(bool, true)
k8s_namespace = optional(string, "flux-system")
helm_chart_name = optional(string, "flux2")
helm_chart_version = optional(string, "2.12.2")
helm_release_name = optional(string, "observability-fluxcd-addon")
helm_repo_url = optional(string, "https://fluxcd-community.github.io/helm-charts")
helm_settings = optional(map(string), {})
helm_values = optional(map(any), {})
})
| `{}` | no | diff --git a/modules/eks-monitoring/main.tf b/modules/eks-monitoring/main.tf index 5b788b4a..a69de350 100644 --- a/modules/eks-monitoring/main.tf +++ b/modules/eks-monitoring/main.tf @@ -188,6 +188,10 @@ module "helm_addon" { name = "enableIstio" value = var.enable_istio }, + { + name = "enablePolyglot" + value = var.enable_polyglot + }, { name = "istioScrapeSampleLimit" value = try(var.istio_config.scrape_sample_limit, local.istio_pattern_config.scrape_sample_limit) @@ -237,6 +241,8 @@ module "java_monitoring" { count = var.enable_java ? 1 : 0 pattern_config = coalesce(var.java_config, local.java_pattern_config) + + depends_on = [resource.helm_release.fluxcd] } module "nginx_monitoring" { @@ -244,6 +250,8 @@ module "nginx_monitoring" { count = var.enable_nginx ? 1 : 0 pattern_config = local.nginx_pattern_config + + depends_on = [resource.helm_release.fluxcd] } module "istio_monitoring" { @@ -251,6 +259,8 @@ module "istio_monitoring" { count = var.enable_istio ? 1 : 0 pattern_config = coalesce(var.istio_config, local.istio_pattern_config) + + depends_on = [resource.helm_release.fluxcd] } module "fluentbit_logs" { diff --git a/modules/eks-monitoring/otel-config/templates/opentelemetrycollector.yaml b/modules/eks-monitoring/otel-config/templates/opentelemetrycollector.yaml index ab022456..6ccfac7b 100644 --- a/modules/eks-monitoring/otel-config/templates/opentelemetrycollector.yaml +++ b/modules/eks-monitoring/otel-config/templates/opentelemetrycollector.yaml @@ -1386,6 +1386,12 @@ spec: action: drop {{ end }} + {{ if .Values.enablePolyglot }} + - job_name: 'kubernetes-polyglot' + kubernetes_sd_configs: + - role: pod + {{ end }} + {{ if .Values.enableNginx }} - job_name: 'kubernetes-nginx' sample_limit: {{ .Values.nginxScrapeSampleLimit }} diff --git a/modules/eks-monitoring/otel-config/values.yaml b/modules/eks-monitoring/otel-config/values.yaml index 2cf1c984..83c6144b 100644 --- a/modules/eks-monitoring/otel-config/values.yaml +++ b/modules/eks-monitoring/otel-config/values.yaml @@ -36,5 +36,7 @@ adotServiceTelemetryLoglevel: ${adot_service_telemetry_loglevel} enableAdotcollectorMetrics: ${enable_adotcollector_metrics} +enablePolyglot: ${enable_polyglot} + serviceAccount: ${service_account} namespace: ${namespace} diff --git a/modules/eks-monitoring/variables.tf b/modules/eks-monitoring/variables.tf index e1e58da1..c1929248 100644 --- a/modules/eks-monitoring/variables.tf +++ b/modules/eks-monitoring/variables.tf @@ -565,3 +565,9 @@ variable "kubeproxy_monitoring_config" { # defaults are pre-computed in locals.tf, provide a full definition to override default = null } + +variable "enable_polyglot" { + description = "Enable monitoring for .Net,Rust and other languages" + type = bool + default = false +}