From d0dd30a76a3b9f22514d7b474a0c7b3cadfcf323 Mon Sep 17 00:00:00 2001 From: viktoryathegreat Date: Tue, 9 Jan 2024 16:18:03 +0400 Subject: [PATCH] fix(DMVP-3291): Deleted thresholds for network in and out alerts --- README.md | 2 +- alarms.tf | 2 -- variables.tf | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0c43d7b..523a375 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ No requirements. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [alarms](#input\_alarms) | Alarms are enabled by default. You need to set SNS topic name to send alarms. Use custom\_values to customize alarms. |
object({
enabled = optional(bool, true)
sns_topic = string
custom_values = optional(any, {})
restarts = optional(object({
enabled = bool
}), {
enabled = true
})
replicas = optional(object({
enabled = bool
}), {
enabled = true
})
network_in = optional(object({
enabled = bool
}), {
enabled = true
})
network_out = optional(object({
enabled = bool
}), {
enabled = true
})
maximum_replicas_usage = optional(object({
enabled = bool
maximum_replicas = number
}), {
enabled = true
maximum_replicas = 3 //The count of HPA maximum for a service. It will be used as a threshold for HPA maximum alarm.
})

})
| n/a | yes | +| [alarms](#input\_alarms) | Alarms are enabled by default. You need to set SNS topic name to send alarms. Use custom\_values to customize alarms. |
object({
enabled = optional(bool, true)
sns_topic = string
custom_values = optional(any, {})
restarts = optional(object({
enabled = bool
}), {
enabled = true
})
replicas = optional(object({
enabled = bool
}), {
enabled = true
})
network_in = optional(object({
enabled = bool
}), {
enabled = true
})
network_out = optional(object({
enabled = bool
}), {
enabled = true
})
maximum_replicas_usage = optional(object({
enabled = optional(bool, true)
maximum_replicas = number
}), {
enabled = true
maximum_replicas = 3 //The count of HPA maximum for a service. It will be used as a threshold for HPA maximum alarm.
})

})
| n/a | yes | | [cluster\_name](#input\_cluster\_name) | Cluster name | `string` | n/a | yes | | [deploy\_service](#input\_deploy\_service) | Wether to deploy the service via helm or not. | `bool` | `true` | no | | [helm\_values](#input\_helm\_values) | Values which overwrite chart defaults | `any` | `null` | no | diff --git a/alarms.tf b/alarms.tf index a6b3a31..55cb378 100644 --- a/alarms.tf +++ b/alarms.tf @@ -51,7 +51,6 @@ module "cw_alerts" { }, period = try(var.alarms.custom_values.network_in.period, 300), statistic = try(var.alarms.custom_values.network_in.statistic, "avg"), - threshold = try(var.alarms.custom_values.network_in.threshold, 350000) equation = try(var.alarms.custom_values.network_in.equation, "ltlgtu") anomaly_detection = true }, @@ -68,7 +67,6 @@ module "cw_alerts" { }, period = try(var.alarms.custom_values.network_out.period, 300), statistic = try(var.alarms.custom_values.network_out.statistic, "avg"), - threshold = try(var.alarms.custom_values.network_out.threshold, 90) equation = try(var.alarms.custom_values.network_out.equation, "ltlgtu") anomaly_detection = true }, diff --git a/variables.tf b/variables.tf index 6a4b5d7..dbe7962 100644 --- a/variables.tf +++ b/variables.tf @@ -46,7 +46,7 @@ variable "alarms" { enabled = true }) maximum_replicas_usage = optional(object({ - enabled = bool + enabled = optional(bool, true) maximum_replicas = number }), { enabled = true