From eb644ba756ee2d529c9022657d7186aae478d023 Mon Sep 17 00:00:00 2001 From: Arya Girish K Date: Thu, 22 May 2025 09:30:50 +0530 Subject: [PATCH 1/5] feat: Add Support to enable multiline --- README.md | 1 + ibm_catalog.json | 3 +++ main.tf | 5 +++++ solutions/fully-configurable/main.tf | 1 + solutions/fully-configurable/variables.tf | 5 +++++ variables.tf | 5 +++++ 6 files changed, 20 insertions(+) diff --git a/README.md b/README.md index 42624e68..f2d23004 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ No modules. | [cluster\_config\_endpoint\_type](#input\_cluster\_config\_endpoint\_type) | The type of endpoint to use for the cluster config access: `default`, `private`, `vpe`, or `link`. The `default` value uses the default endpoint of the cluster. | `string` | `"default"` | no | | [cluster\_id](#input\_cluster\_id) | The ID of the cluster to deploy the agent. | `string` | n/a | yes | | [cluster\_resource\_group\_id](#input\_cluster\_resource\_group\_id) | The resource group ID of the cluster. | `string` | n/a | yes | +| [enable\_multiline](#input\_enable\_multiline) | Enable or disable multiline log support | `bool` | `false` | no | | [is\_vpc\_cluster](#input\_is\_vpc\_cluster) | Specify true if the target cluster for the agent is a VPC cluster, false if it is a classic cluster. | `bool` | `true` | 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. |
list(object({
key = optional(string)
value = optional(string)
}))
| `[]` | no | diff --git a/ibm_catalog.json b/ibm_catalog.json index f301f9c5..50273d01 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -248,6 +248,9 @@ }, { "key": "wait_till_timeout" + }, + { + "key": "enable_multiline" } ], "install_type": "fullstack" diff --git a/main.tf b/main.tf index e18753ed..26873285 100644 --- a/main.tf +++ b/main.tf @@ -110,6 +110,11 @@ resource "helm_release" "logs_agent" { name = "scc.create" value = var.logs_agent_enable_scc } + set { + name = "enableMultiline" + type = "auto" + value = var.enable_multiline + } # dummy value hack to force update https://github.com/hashicorp/terraform-provider-helm/issues/515#issuecomment-813088122 values = [ diff --git a/solutions/fully-configurable/main.tf b/solutions/fully-configurable/main.tf index ea0740bd..ee8ee019 100644 --- a/solutions/fully-configurable/main.tf +++ b/solutions/fully-configurable/main.tf @@ -43,4 +43,5 @@ module "logs_agent" { is_vpc_cluster = var.is_vpc_cluster wait_till = var.wait_till wait_till_timeout = var.wait_till_timeout + enable_multiline = var.enable_multiline } diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index d0db7eea..6ddaaaa5 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -225,3 +225,8 @@ variable "cloud_logs_ingress_port" { condition = contains([3443, 443], var.cloud_logs_ingress_port) } } +variable "enable_multiline" { + description = "Enable or disable multiline log support" + type = bool + default = false +} diff --git a/variables.tf b/variables.tf index d76c8c70..f4c54611 100644 --- a/variables.tf +++ b/variables.tf @@ -233,3 +233,8 @@ variable "cloud_logs_ingress_port" { condition = contains([3443, 443], var.cloud_logs_ingress_port) } } +variable "enable_multiline" { + description = "Enable or disable multiline log support" + type = bool + default = false +} From 608dd1a4b717a9ab04c25180fe97f2dca1c89513 Mon Sep 17 00:00:00 2001 From: Arya Girish K Date: Thu, 22 May 2025 16:41:25 +0530 Subject: [PATCH 2/5] Resolved comments --- main.tf | 1 - 1 file changed, 1 deletion(-) diff --git a/main.tf b/main.tf index 26873285..ecc16aad 100644 --- a/main.tf +++ b/main.tf @@ -112,7 +112,6 @@ resource "helm_release" "logs_agent" { } set { name = "enableMultiline" - type = "auto" value = var.enable_multiline } From 761205098ca72c93804e49fee670c0b9b7292101 Mon Sep 17 00:00:00 2001 From: Arya Girish K Date: Fri, 23 May 2025 18:47:52 +0530 Subject: [PATCH 3/5] Update solutions/fully-configurable/variables.tf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Conall Ó Cofaigh --- solutions/fully-configurable/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index 6ddaaaa5..a533217c 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -226,7 +226,7 @@ variable "cloud_logs_ingress_port" { } } variable "enable_multiline" { - description = "Enable or disable multiline log support" + description = "Enable or disable multiline log support. [Learn more](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-multiline)" type = bool default = false } From 9b2b48cae10338c6428facb31940506bb08e5c57 Mon Sep 17 00:00:00 2001 From: Arya Girish K Date: Fri, 23 May 2025 18:48:21 +0530 Subject: [PATCH 4/5] Update variables.tf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Conall Ó Cofaigh --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index f4c54611..62725c14 100644 --- a/variables.tf +++ b/variables.tf @@ -234,7 +234,7 @@ variable "cloud_logs_ingress_port" { } } variable "enable_multiline" { - description = "Enable or disable multiline log support" + description = "Enable or disable multiline log support. [Learn more](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-multiline)" type = bool default = false } From efd9b2141b6eeaba353bc62dd962dfa92a90257e Mon Sep 17 00:00:00 2001 From: Arya Girish K Date: Fri, 23 May 2025 20:41:20 +0530 Subject: [PATCH 5/5] fix: Resolved Pre-commit error --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f2d23004..a8648aa9 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ No modules. | [cluster\_config\_endpoint\_type](#input\_cluster\_config\_endpoint\_type) | The type of endpoint to use for the cluster config access: `default`, `private`, `vpe`, or `link`. The `default` value uses the default endpoint of the cluster. | `string` | `"default"` | no | | [cluster\_id](#input\_cluster\_id) | The ID of the cluster to deploy the agent. | `string` | n/a | yes | | [cluster\_resource\_group\_id](#input\_cluster\_resource\_group\_id) | The resource group ID of the cluster. | `string` | n/a | yes | -| [enable\_multiline](#input\_enable\_multiline) | Enable or disable multiline log support | `bool` | `false` | no | +| [enable\_multiline](#input\_enable\_multiline) | Enable or disable multiline log support. [Learn more](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-multiline) | `bool` | `false` | no | | [is\_vpc\_cluster](#input\_is\_vpc\_cluster) | Specify true if the target cluster for the agent is a VPC cluster, false if it is a classic cluster. | `bool` | `true` | 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. |
list(object({
key = optional(string)
value = optional(string)
}))
| `[]` | no |