Skip to content

Commit

Permalink
Merge branch 'main' into PAGOPA-2494-print-notice-alert-threshold-review
Browse files Browse the repository at this point in the history
  • Loading branch information
jacopocarlini authored Jan 8, 2025
2 parents 2b82782 + 9c9c8af commit 535a8fd
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
22 changes: 21 additions & 1 deletion src/aks-platform/05_monitoring.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,27 @@ resource "helm_release" "monitoring_reloader" {
}
}

# Kubernetes Event Exporter
module "kubernetes_event_exporter" {
count = var.env_short != "p" ? 0 : 1
source = "git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_event_exporter?ref=v8.70.0"
namespace = "monitoring"

# Slack integration
enable_slack = false
slack_channel = "#pagopa_status"
slack_token = ""

# OpsGenie integrations
enable_opsgenie = true
opsgenie_api_key = data.azurerm_key_vault_secret.opsgenie_kubexporter_api_key.0.value
}

data "azurerm_key_vault_secret" "opsgenie_kubexporter_api_key" {
count = var.env_short != "p" ? 0 : 1
key_vault_id = data.azurerm_key_vault.kv.id
name = "opsgenie-infra-kubexporter-webhook-token"
}

module "opencosts" {
enable_opencost = var.env_short == "d" ? true : false
Expand Down Expand Up @@ -113,4 +134,3 @@ resource "kubernetes_manifest" "service_monitor" {
}
}
}

2 changes: 2 additions & 0 deletions src/aks-platform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
| <a name="module_aks"></a> [aks](#module\_aks) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_cluster | v8.69.0 |
| <a name="module_aks_snet"></a> [aks\_snet](#module\_aks\_snet) | git::https://github.com/pagopa/terraform-azurerm-v3.git//subnet | v8.53.0 |
| <a name="module_keda_pod_identity"></a> [keda\_pod\_identity](#module\_keda\_pod\_identity) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_pod_identity | v8.53.0 |
| <a name="module_kubernetes_event_exporter"></a> [kubernetes\_event\_exporter](#module\_kubernetes\_event\_exporter) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_event_exporter | v8.70.0 |
| <a name="module_monitoring_pod_identity"></a> [monitoring\_pod\_identity](#module\_monitoring\_pod\_identity) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_pod_identity | v8.53.0 |
| <a name="module_nginx_ingress"></a> [nginx\_ingress](#module\_nginx\_ingress) | terraform-module/release/helm | 2.8.0 |
| <a name="module_opencosts"></a> [opencosts](#module\_opencosts) | git::https://github.com/pagopa/terraform-azurerm-v3.git//kubernetes_opencosts | v8.69.0 |
Expand Down Expand Up @@ -60,6 +61,7 @@
| [azurerm_client_config.current](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/client_config) | data source |
| [azurerm_container_registry.acr](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/container_registry) | data source |
| [azurerm_key_vault.kv](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault) | data source |
| [azurerm_key_vault_secret.opsgenie_kubexporter_api_key](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/key_vault_secret) | data source |
| [azurerm_log_analytics_workspace.log_analytics](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/log_analytics_workspace) | data source |
| [azurerm_monitor_action_group.email](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/monitor_action_group) | data source |
| [azurerm_monitor_action_group.opsgenie](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/monitor_action_group) | data source |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,12 @@
4,
7,
8,
14
14,
15,
25,
116,
117,
121
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/next-core/06_node_forwarder.tf
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ resource "azurerm_monitor_scheduled_query_rules_alert" "opex_pagopa-node-forward
location = var.location

action {
action_group = [azurerm_monitor_action_group.email.id, azurerm_monitor_action_group.slack.id, azurerm_monitor_action_group.mo_email.id, azurerm_monitor_action_group.new_conn_srv_opsgenie[0].id, azurerm_monitor_action_group.infra_opsgenie.0.id]
action_group = [azurerm_monitor_action_group.email.id, azurerm_monitor_action_group.slack.id, azurerm_monitor_action_group.mo_email.id, azurerm_monitor_action_group.new_conn_srv_opsgenie[0].id]
email_subject = "Email Header"
custom_webhook_payload = "{}"
}
Expand Down

0 comments on commit 535a8fd

Please sign in to comment.