diff --git a/.secrets.baseline b/.secrets.baseline index 1496b7e9..1755472d 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "go.sum|^.secrets.baseline$", "lines": null }, - "generated_at": "2024-10-02T13:57:09Z", + "generated_at": "2024-10-16T12:26:02Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -82,7 +82,7 @@ "hashed_secret": "3f0155e75563ab3adc0505000a86da5baa207d1f", "is_secret": false, "is_verified": false, - "line_number": 64, + "line_number": 59, "type": "Secret Keyword", "verified_result": null } diff --git a/README.md b/README.md index c1d2de0f..a80e0daa 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,6 @@ This module deploys the following observability agents to an IBM Cloud Red Hat O - [Logs agent](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-about) - [Monitoring agent](https://cloud.ibm.com/docs/monitoring?topic=monitoring-about-collect-metrics) -- [DEPRECATED: Log Analysis agent](https://cloud.ibm.com/docs/log-analysis?topic=log-analysis-log_analysis_agent) - -> [!IMPORTANT] -> The IBM Log Analysis service is deprecated. [IBM Cloud Logs](https://www.ibm.com/products/cloud-logs) is the replacement service and is now the default agent created with this module. - @@ -84,28 +79,6 @@ module "observability_agents" { } ``` -### (DEPRECATED) Log Analysis agent configuration for Kubernetes metadata filtering - -You can configure the logging agent to filter log lines according to the Kubernetes resources metadata by setting the exclusion and inclusion parameters. - -For example, to set the agent to return all log lines coming from the `default` Kubernetes namespace and exclude anything with a label `app.kubernetes.io/name` with value `sample-app` or an annotation `annotation.user` with value `sample-user`, include these parameters: - -```text -custom_log_analysis_at_agent_line_exclusion = "label.app.kubernetes.io/name:sample-app\\, annotation.user:sample-user" -custom_log_analysis_at_agent_line_inclusion = "namespace:default" -``` - -The following is the corresponding DaemonSet configuration: - -```text -- name: LOGDNA_K8S_METADATA_LINE_INCLUSION - value: "label.app.kubernetes.io/name:sample-app, annotation.user:sample-user" -- name: LOGDNA_K8S_METADATA_LINE_EXCLUSION - value: "namespace:default" -``` - -For more information, see [Configuration for Kubernetes Metadata Filtering](https://github.com/logdna/logdna-agent-v2/blob/3.8/docs/KUBERNETES.md#configuration-for-kubernetes-metadata-filtering). - ### Required IAM access policies You need the following permissions to run this module. @@ -136,7 +109,6 @@ You need the following permissions to run this module. | Name | Type | |------|------| | [helm_release.cloud_monitoring_agent](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | -| [helm_release.log_analysis_agent](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | | [ibm_container_cluster.cluster](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/data-sources/container_cluster) | data source | | [ibm_container_cluster_config.cluster_config](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/data-sources/container_cluster_config) | data source | | [ibm_container_vpc_cluster.cluster](https://registry.terraform.io/providers/ibm-cloud/ibm/latest/docs/data-sources/container_vpc_cluster) | data source | @@ -162,18 +134,6 @@ You need the following permissions to run this module. | [cluster\_id](#input\_cluster\_id) | The ID of the cluster you wish to deploy the agents in | `string` | n/a | yes | | [cluster\_resource\_group\_id](#input\_cluster\_resource\_group\_id) | The Resource Group ID of the cluster | `string` | n/a | yes | | [is\_vpc\_cluster](#input\_is\_vpc\_cluster) | Specify true if the target cluster for the observability agents is a VPC cluster, false if it is a classic cluster. | `bool` | `true` | no | -| [log\_analysis\_add\_cluster\_name](#input\_log\_analysis\_add\_cluster\_name) | DEPRECATED: If true, configure the Log Analysis agent to attach a tag containing the cluster name to all log messages. | `bool` | `true` | no | -| [log\_analysis\_agent\_custom\_line\_exclusion](#input\_log\_analysis\_agent\_custom\_line\_exclusion) | DEPRECATED: Log Analysis agent custom configuration for line exclusion setting LOGDNA\_K8S\_METADATA\_LINE\_EXCLUSION. See https://github.com/logdna/logdna-agent-v2/blob/master/docs/KUBERNETES.md#configuration-for-kubernetes-metadata-filtering for more info. | `string` | `null` | no | -| [log\_analysis\_agent\_custom\_line\_inclusion](#input\_log\_analysis\_agent\_custom\_line\_inclusion) | DEPRECATED: Log Analysis agent custom configuration for line inclusion setting LOGDNA\_K8S\_METADATA\_LINE\_INCLUSION. See https://github.com/logdna/logdna-agent-v2/blob/master/docs/KUBERNETES.md#configuration-for-kubernetes-metadata-filtering for more info. | `string` | `null` | no | -| [log\_analysis\_agent\_name](#input\_log\_analysis\_agent\_name) | DEPRECATED: Log Analysis agent name. Used for naming all kubernetes and helm resources on the cluster. | `string` | `"logdna-agent"` | no | -| [log\_analysis\_agent\_namespace](#input\_log\_analysis\_agent\_namespace) | DEPRECATED: Namespace where to deploy the Log Analysis agent. Default value is 'ibm-observe' | `string` | `"ibm-observe"` | no | -| [log\_analysis\_agent\_tags](#input\_log\_analysis\_agent\_tags) | DEPRECATED: List of tags to associate to all log records that the agent collects so that you can identify the agent's data quicker in the logging UI. NOTE: Use the 'log\_analysis\_add\_cluster\_name' variable to add the cluster name as a tag. | `list(string)` | `[]` | no | -| [log\_analysis\_agent\_tolerations](#input\_log\_analysis\_agent\_tolerations) | DEPRECATED: List of tolerations to apply to Log Analysis agent. |
list(object({
key = optional(string)
operator = optional(string)
value = optional(string)
effect = optional(string)
tolerationSeconds = optional(number)
})) | [| no | -| [log\_analysis\_enabled](#input\_log\_analysis\_enabled) | DEPRECATED: Deploy IBM Cloud Log Analysis agent | `bool` | `false` | no | -| [log\_analysis\_endpoint\_type](#input\_log\_analysis\_endpoint\_type) | DEPRECATED: Specify the IBM Log Analysis instance endpoint type (public or private) to use. Used to construct the ingestion endpoint. | `string` | `"private"` | no | -| [log\_analysis\_ingestion\_key](#input\_log\_analysis\_ingestion\_key) | DEPRECATED: Ingestion key for the Log Analysis agent to communicate with the instance | `string` | `null` | no | -| [log\_analysis\_instance\_region](#input\_log\_analysis\_instance\_region) | DEPRECATED: The IBM Log Analysis instance region. Used to construct the ingestion endpoint. | `string` | `null` | no | -| [log\_analysis\_secret\_name](#input\_log\_analysis\_secret\_name) | DEPRECATED: The name of the secret which will store the Log Analysis ingestion key. | `string` | `"logdna-agent"` | no | | [logs\_agent\_additional\_log\_source\_paths](#input\_logs\_agent\_additional\_log\_source\_paths) | The list of additional log sources. By default, the Logs agent collects logs from a single source at `/var/log/containers/*.log`. | `list(string)` | `[]` | no | | [logs\_agent\_additional\_metadata](#input\_logs\_agent\_additional\_metadata) | The list of additional metadata fields to add to the routed logs. |
{
"operator": "Exists"
}
]
list(object({
key = optional(string)
value = optional(string)
})) | `[]` | no |
| [logs\_agent\_enable\_scc](#input\_logs\_agent\_enable\_scc) | Whether to enable creation of Security Context Constraints in Openshift. When installing on an OpenShift cluster, this setting is mandatory to configure permissions for pods within your cluster. | `bool` | `true` | no |
diff --git a/examples/obs-agent-iks/main.tf b/examples/obs-agent-iks/main.tf
index df63ec39..c73cbe08 100644
--- a/examples/obs-agent-iks/main.tf
+++ b/examples/obs-agent-iks/main.tf
@@ -128,12 +128,8 @@ resource "time_sleep" "wait_operators" {
##############################################################################
module "observability_instances" {
- source = "terraform-ibm-modules/observability-instances/ibm"
- version = "2.19.1"
- providers = {
- logdna.at = logdna.at
- logdna.ld = logdna.ld
- }
+ source = "terraform-ibm-modules/observability-instances/ibm"
+ version = "3.0.2"
resource_group_id = module.resource_group.resource_group_id
region = var.region
cloud_logs_plan = "standard"
diff --git a/examples/obs-agent-iks/provider.tf b/examples/obs-agent-iks/provider.tf
index 5c11f46f..76346099 100644
--- a/examples/obs-agent-iks/provider.tf
+++ b/examples/obs-agent-iks/provider.tf
@@ -22,19 +22,3 @@ provider "kubernetes" {
token = data.ibm_container_cluster_config.cluster_config.token
cluster_ca_certificate = data.ibm_container_cluster_config.cluster_config.ca_certificate
}
-
-locals {
- at_endpoint = "https://api.${var.region}.logging.cloud.ibm.com"
-}
-
-provider "logdna" {
- alias = "at"
- servicekey = module.observability_instances.activity_tracker_resource_key != null ? module.observability_instances.activity_tracker_resource_key : ""
- url = local.at_endpoint
-}
-
-provider "logdna" {
- alias = "ld"
- servicekey = module.observability_instances.log_analysis_resource_key != null ? module.observability_instances.log_analysis_resource_key : ""
- url = local.at_endpoint
-}
diff --git a/examples/obs-agent-iks/version.tf b/examples/obs-agent-iks/version.tf
index c32ea61b..4cd6e426 100644
--- a/examples/obs-agent-iks/version.tf
+++ b/examples/obs-agent-iks/version.tf
@@ -22,10 +22,5 @@ terraform {
source = "hashicorp/time"
version = ">= 0.9.1"
}
- # The logdna provider is not actually required by the module itself, just this example, so OK to use ">=" here instead of locking into a version
- logdna = {
- source = "logdna/logdna"
- version = ">= 1.14.2"
- }
}
}
diff --git a/examples/obs-agent-ocp/main.tf b/examples/obs-agent-ocp/main.tf
index 9069c34e..04719351 100644
--- a/examples/obs-agent-ocp/main.tf
+++ b/examples/obs-agent-ocp/main.tf
@@ -128,12 +128,8 @@ data "ibm_container_cluster_config" "cluster_config" {
##############################################################################
module "observability_instances" {
- source = "terraform-ibm-modules/observability-instances/ibm"
- version = "2.19.1"
- providers = {
- logdna.at = logdna.at
- logdna.ld = logdna.ld
- }
+ source = "terraform-ibm-modules/observability-instances/ibm"
+ version = "3.0.2"
resource_group_id = module.resource_group.resource_group_id
region = var.region
cloud_logs_plan = "standard"
diff --git a/examples/obs-agent-ocp/provider.tf b/examples/obs-agent-ocp/provider.tf
index 5c11f46f..76346099 100644
--- a/examples/obs-agent-ocp/provider.tf
+++ b/examples/obs-agent-ocp/provider.tf
@@ -22,19 +22,3 @@ provider "kubernetes" {
token = data.ibm_container_cluster_config.cluster_config.token
cluster_ca_certificate = data.ibm_container_cluster_config.cluster_config.ca_certificate
}
-
-locals {
- at_endpoint = "https://api.${var.region}.logging.cloud.ibm.com"
-}
-
-provider "logdna" {
- alias = "at"
- servicekey = module.observability_instances.activity_tracker_resource_key != null ? module.observability_instances.activity_tracker_resource_key : ""
- url = local.at_endpoint
-}
-
-provider "logdna" {
- alias = "ld"
- servicekey = module.observability_instances.log_analysis_resource_key != null ? module.observability_instances.log_analysis_resource_key : ""
- url = local.at_endpoint
-}
diff --git a/examples/obs-agent-ocp/version.tf b/examples/obs-agent-ocp/version.tf
index 3b3c31b0..e131816d 100644
--- a/examples/obs-agent-ocp/version.tf
+++ b/examples/obs-agent-ocp/version.tf
@@ -16,9 +16,5 @@ terraform {
source = "hashicorp/kubernetes"
version = ">= 2.16.1"
}
- logdna = {
- source = "logdna/logdna"
- version = ">= 1.14.2"
- }
}
}
diff --git a/main.tf b/main.tf
index 9c756319..df0f7eea 100644
--- a/main.tf
+++ b/main.tf
@@ -25,15 +25,7 @@ data "ibm_container_cluster_config" "cluster_config" {
locals {
# LOCALS
- cluster_name = var.is_vpc_cluster ? data.ibm_container_vpc_cluster.cluster[0].resource_name : data.ibm_container_cluster.cluster[0].resource_name # Not publically documented in provider. See https://github.com/IBM-Cloud/terraform-provider-ibm/issues/4485
- log_analysis_chart_location = "${path.module}/chart/logdna-agent"
- log_analysis_image_tag_digest = "3.10.1-20240827.12afa351b661bc07@sha256:3a7ebc7fb58de67db2af15f35ba827c96a92c06e933abb4c67431854a24bd156" # datasource: icr.io/ext/logdna-agent versioning=regex:^(?