From 7603a8dec13bcb6218bc73a6c724878647f8748b Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Wed, 21 Feb 2024 14:51:51 +0000 Subject: [PATCH 1/9] Updated eks to use instance name instead of hard coding. --- CHANGELOG.md | 4 ++++ k8s.tf | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0008378..c9f75bd 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). +## [4.3.1] - 2024-02-21 +### Updated +- Updated eks to use instance name instead of hard coding. + ## [4.3.0] - 2024-02-08 ### Added - Variable to add a readonly primary optional host/port. Waggle Dance will redirect get calls automatically to those. diff --git a/k8s.tf b/k8s.tf index 2f844d9..a01541d 100644 --- a/k8s.tf +++ b/k8s.tf @@ -49,9 +49,9 @@ resource "kubernetes_deployment_v1" "waggle_dance" { name = local.instance_alias } annotations = { - "ad.datadoghq.com/waggledance.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null - "ad.datadoghq.com/waggledance.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null - "ad.datadoghq.com/waggledance.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"waggledance\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null + "ad.datadoghq.com/${local.instance_alias}.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null + "ad.datadoghq.com/${local.instance_alias}.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null + "ad.datadoghq.com/${local.instance_alias}.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"waggledance\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : local.actuator_port "prometheus.io/path" : "/actuator/prometheus" From 1aa1cc8bbe92ad40428ab359494289458c04bf46 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Wed, 21 Feb 2024 14:59:53 +0000 Subject: [PATCH 2/9] updated the version --- k8s.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8s.tf b/k8s.tf index a01541d..e078743 100644 --- a/k8s.tf +++ b/k8s.tf @@ -51,7 +51,7 @@ resource "kubernetes_deployment_v1" "waggle_dance" { annotations = { "ad.datadoghq.com/${local.instance_alias}.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null "ad.datadoghq.com/${local.instance_alias}.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null - "ad.datadoghq.com/${local.instance_alias}.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"waggledance\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null + "ad.datadoghq.com/${local.instance_alias}.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : local.actuator_port "prometheus.io/path" : "/actuator/prometheus" From 824eb0265e0f62a3c6006fdae71c08bbfc49dbb9 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Wed, 21 Feb 2024 16:25:03 +0000 Subject: [PATCH 3/9] updated the version --- k8s.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/k8s.tf b/k8s.tf index e078743..54527cb 100644 --- a/k8s.tf +++ b/k8s.tf @@ -11,6 +11,7 @@ locals { wd_port = 48869 k8s_cpu = var.cpu / 1024 k8s_cpu_limit = (var.cpu / 1024) * 1.25 + instance_alias = var.instance_name == "" ? "waggledance" : format("waggledance-%s", var.instance_name) } resource "kubernetes_service_account" "waggle_dance" { From 10b34720f8d3e243287d8fc08216d164ecd2f9b4 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Wed, 21 Feb 2024 16:27:57 +0000 Subject: [PATCH 4/9] updated the version --- k8s.tf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/k8s.tf b/k8s.tf index 54527cb..a01541d 100644 --- a/k8s.tf +++ b/k8s.tf @@ -11,7 +11,6 @@ locals { wd_port = 48869 k8s_cpu = var.cpu / 1024 k8s_cpu_limit = (var.cpu / 1024) * 1.25 - instance_alias = var.instance_name == "" ? "waggledance" : format("waggledance-%s", var.instance_name) } resource "kubernetes_service_account" "waggle_dance" { @@ -52,7 +51,7 @@ resource "kubernetes_deployment_v1" "waggle_dance" { annotations = { "ad.datadoghq.com/${local.instance_alias}.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null "ad.datadoghq.com/${local.instance_alias}.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null - "ad.datadoghq.com/${local.instance_alias}.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null + "ad.datadoghq.com/${local.instance_alias}.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"waggledance\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : local.actuator_port "prometheus.io/path" : "/actuator/prometheus" From 940c27b99547b34a628b44480a50bdb8bbcb8bd4 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Wed, 21 Feb 2024 16:37:45 +0000 Subject: [PATCH 5/9] updated the version --- k8s.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s.tf b/k8s.tf index a01541d..fab6faf 100644 --- a/k8s.tf +++ b/k8s.tf @@ -49,9 +49,9 @@ resource "kubernetes_deployment_v1" "waggle_dance" { name = local.instance_alias } annotations = { - "ad.datadoghq.com/${local.instance_alias}.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null - "ad.datadoghq.com/${local.instance_alias}.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null - "ad.datadoghq.com/${local.instance_alias}.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"waggledance\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null + "ad.datadoghq.com/abc.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null + "ad.datadoghq.com/abc.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null + "ad.datadoghq.com/abc.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"waggledance\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : local.actuator_port "prometheus.io/path" : "/actuator/prometheus" From 3ea2bc9ef52cd0554099d7b0e00e24dc805c8bed Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Wed, 21 Feb 2024 16:38:29 +0000 Subject: [PATCH 6/9] updated the version --- k8s.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/k8s.tf b/k8s.tf index fab6faf..e078743 100644 --- a/k8s.tf +++ b/k8s.tf @@ -49,9 +49,9 @@ resource "kubernetes_deployment_v1" "waggle_dance" { name = local.instance_alias } annotations = { - "ad.datadoghq.com/abc.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null - "ad.datadoghq.com/abc.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null - "ad.datadoghq.com/abc.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"waggledance\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null + "ad.datadoghq.com/${local.instance_alias}.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null + "ad.datadoghq.com/${local.instance_alias}.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null + "ad.datadoghq.com/${local.instance_alias}.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : local.actuator_port "prometheus.io/path" : "/actuator/prometheus" From 020e68e70b6cbda8d09b49ece74695ee6d152531 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Thu, 22 Feb 2024 10:33:15 +0000 Subject: [PATCH 7/9] updated the version --- k8s.tf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/k8s.tf b/k8s.tf index e078743..0b4686f 100644 --- a/k8s.tf +++ b/k8s.tf @@ -11,6 +11,7 @@ locals { wd_port = 48869 k8s_cpu = var.cpu / 1024 k8s_cpu_limit = (var.cpu / 1024) * 1.25 + abc = local.instance_alias } resource "kubernetes_service_account" "waggle_dance" { @@ -49,9 +50,9 @@ resource "kubernetes_deployment_v1" "waggle_dance" { name = local.instance_alias } annotations = { - "ad.datadoghq.com/${local.instance_alias}.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null - "ad.datadoghq.com/${local.instance_alias}.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null - "ad.datadoghq.com/${local.instance_alias}.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"${local.instance_alias}\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null + "ad.datadoghq.com/${local.abc}.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null + "ad.datadoghq.com/${local.abc}.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null + "ad.datadoghq.com/${local.abc}.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"waggledance\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : local.actuator_port "prometheus.io/path" : "/actuator/prometheus" From 687f712c9df539578777538efe6971e358f3c545 Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Thu, 22 Feb 2024 10:54:47 +0000 Subject: [PATCH 8/9] updated the version --- k8s.tf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/k8s.tf b/k8s.tf index 0b4686f..a01541d 100644 --- a/k8s.tf +++ b/k8s.tf @@ -11,7 +11,6 @@ locals { wd_port = 48869 k8s_cpu = var.cpu / 1024 k8s_cpu_limit = (var.cpu / 1024) * 1.25 - abc = local.instance_alias } resource "kubernetes_service_account" "waggle_dance" { @@ -50,9 +49,9 @@ resource "kubernetes_deployment_v1" "waggle_dance" { name = local.instance_alias } annotations = { - "ad.datadoghq.com/${local.abc}.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null - "ad.datadoghq.com/${local.abc}.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null - "ad.datadoghq.com/${local.abc}.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"waggledance\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null + "ad.datadoghq.com/${local.instance_alias}.check_names" = var.datadog_metrics_enabled ? "[\"openmetrics\"]" : null + "ad.datadoghq.com/${local.instance_alias}.init_configs" = var.datadog_metrics_enabled ? "[{}]" : null + "ad.datadoghq.com/${local.instance_alias}.instances" = var.datadog_metrics_enabled ? "[{ \"prometheus_url\": \"http://%%host%%:${var.metrics_port}/actuator/prometheus\", \"namespace\": \"waggledance\", \"metrics\": [ \"${join("\",\"", var.datadog_metrics_waggledance)}\" ] }]" : null "prometheus.io/scrape" : var.prometheus_enabled "prometheus.io/port" : local.actuator_port "prometheus.io/path" : "/actuator/prometheus" From b0d1a3645f28aef40368dca44e5f383d03be95fb Mon Sep 17 00:00:00 2001 From: Dhrubajyoti Sadhu Date: Thu, 22 Feb 2024 11:20:58 +0000 Subject: [PATCH 9/9] updated the version --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9f75bd..1b4d5a5 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). -## [4.3.1] - 2024-02-21 +## [4.3.1] - 2024-02-22 ### Updated - Updated eks to use instance name instead of hard coding.