Skip to content

Commit d5eddd8

Browse files
committed
Merge branch 'fidel-ruiz/feat-add-support-logs-agent-resources' of github.com:fidel-ibm/terraform-ibm-observability-agents into fidel-ruiz/feat-add-support-logs-agent-resources
2 parents 762aafb + d0a5130 commit d5eddd8

File tree

6 files changed

+21
-15
lines changed

6 files changed

+21
-15
lines changed

.secrets.baseline

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2024-10-16T12:26:02Z",
6+
"generated_at": "2025-03-10T14:14:38Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"

README.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Terraform IBM Observability agents module
22

3-
[![Graduated (Supported)](https://img.shields.io/badge/Status-Graduated%20(Supported)-brightgreen)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
3+
[![Graduated (Supported)](<https://img.shields.io/badge/Status-Graduated%20(Supported)-brightgreen>)](https://terraform-ibm-modules.github.io/documentation/#/badge-status)
44
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
55
[![latest release](https://img.shields.io/github/v/release/terraform-ibm-modules/terraform-ibm-observability-agents?logo=GitHub&sort=semver)](https://github.com/terraform-ibm-modules/terraform-ibm-observability-agents/releases/latest)
66
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)
77
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
88

99
This module deploys the following observability agents to an IBM Cloud Red Hat OpenShift Container Platform or Kubernetes cluster:
1010

11-
- [Logs agent](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-about)
12-
- [Monitoring agent](https://cloud.ibm.com/docs/monitoring?topic=monitoring-about-collect-metrics)
11+
- [Logs agent](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-about)
12+
- [Monitoring agent](https://cloud.ibm.com/docs/monitoring?topic=monitoring-about-collect-metrics)
1313

1414
<!-- Below content is automatically populated via pre-commit hook -->
1515
<!-- BEGIN OVERVIEW HOOK -->
@@ -80,14 +80,15 @@ module "observability_agents" {
8080
```
8181

8282
### Required IAM access policies
83+
8384
You need the following permissions to run this module.
8485

85-
- Service
86-
- **Resource group only**
87-
- `Viewer` access on the specific resource group
88-
- **Kubernetes** service
89-
- `Viewer` platform access
90-
- `Manager` service access
86+
- Service
87+
- **Resource group only**
88+
- `Viewer` access on the specific resource group
89+
- **Kubernetes** service
90+
- `Viewer` platform access
91+
- `Manager` service access
9192

9293
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
9394
### Requirements
@@ -146,7 +147,7 @@ You need the following permissions to run this module.
146147
| <a name="input_logs_agent_log_source_namespaces"></a> [logs\_agent\_log\_source\_namespaces](#input\_logs\_agent\_log\_source\_namespaces) | The list of namespaces from which logs should be forwarded by agent. If namespaces are not listed, logs from all namespaces will be sent. | `list(string)` | `[]` | no |
147148
| <a name="input_logs_agent_name"></a> [logs\_agent\_name](#input\_logs\_agent\_name) | The name of the Logs agent. The name is used in all Kubernetes and Helm resources in the cluster. | `string` | `"logs-agent"` | no |
148149
| <a name="input_logs_agent_namespace"></a> [logs\_agent\_namespace](#input\_logs\_agent\_namespace) | The namespace where the Logs agent is deployed. The default value is `ibm-observe`. | `string` | `"ibm-observe"` | no |
149-
| <a name="input_logs_agent_resources"></a> [logs\_agent\_resources](#input\_logs\_agent\_resources) | The resources configuration for cpu/memory/storage | <pre>object({<br> limits = object({<br> cpu = string<br> memory = string<br> ephemeral_storage = string<br> })<br> requests = object({<br> cpu = string<br> memory = string<br> ephemeral_storage = string<br> })<br> })</pre> | <pre>{<br> "limits": {<br> "cpu": "500m",<br> "ephemeral_storage": "10Gi",<br> "memory": "3Gi"<br> },<br> "requests": {<br> "cpu": "100m",<br> "ephemeral_storage": "2Gi",<br> "memory": "1Gi"<br> }<br>}</pre> | no |
150+
| <a name="input_logs_agent_resources"></a> [logs\_agent\_resources](#input\_logs\_agent\_resources) | The resources configuration for cpu/memory/storage. [Learn more](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-helm-template-clusters#agent-helm-template-clusters-chart-options-resources) | <pre>object({<br> limits = object({<br> cpu = string<br> memory = string<br> ephemeral_storage = string<br> })<br> requests = object({<br> cpu = string<br> memory = string<br> ephemeral_storage = string<br> })<br> })</pre> | <pre>{<br> "limits": {<br> "cpu": "500m",<br> "ephemeral_storage": "10Gi",<br> "memory": "3Gi"<br> },<br> "requests": {<br> "cpu": "100m",<br> "ephemeral_storage": "2Gi",<br> "memory": "1Gi"<br> }<br>}</pre> | no |
150151
| <a name="input_logs_agent_selected_log_source_paths"></a> [logs\_agent\_selected\_log\_source\_paths](#input\_logs\_agent\_selected\_log\_source\_paths) | The list of specific log sources paths. Logs will only be collected from the specified log source paths. If no paths are specified, it will send logs from `/var/log/containers`. | `list(string)` | `[]` | no |
151152
| <a name="input_logs_agent_tolerations"></a> [logs\_agent\_tolerations](#input\_logs\_agent\_tolerations) | List of tolerations to apply to Logs agent. The default value means a pod will run on every node. | <pre>list(object({<br> key = optional(string)<br> operator = optional(string)<br> value = optional(string)<br> effect = optional(string)<br> tolerationSeconds = optional(number)<br> }))</pre> | <pre>[<br> {<br> "operator": "Exists"<br> }<br>]</pre> | no |
152153
| <a name="input_logs_agent_trusted_profile"></a> [logs\_agent\_trusted\_profile](#input\_logs\_agent\_trusted\_profile) | The IBM Cloud trusted profile ID. Used only when `logs_agent_iam_mode` is set to `TrustedProfile`. The trusted profile must have an IBM Cloud Logs `Sender` role. | `string` | `null` | no |
@@ -158,8 +159,8 @@ You need the following permissions to run this module.
158159
No outputs.
159160
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
160161

161-
162162
<!-- Leave this section as is so that your module has a link to local development environment set up steps for contributors to follow -->
163+
163164
## Contributing
164165

165166
You can report issues and request features for this module in GitHub issues in the module repo. See [Report an issue or request a feature](https://github.com/terraform-ibm-modules/.github/blob/main/.github/SUPPORT.md).

modules/logs-agent/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ No modules.
9696
| <a name="input_logs_agent_log_source_namespaces"></a> [logs\_agent\_log\_source\_namespaces](#input\_logs\_agent\_log\_source\_namespaces) | The list of namespaces from which logs should be forwarded by agent. If namespaces are not listed, logs from all namespaces will be sent. | `list(string)` | `[]` | no |
9797
| <a name="input_logs_agent_name"></a> [logs\_agent\_name](#input\_logs\_agent\_name) | The name of the Logs agent. The name is used in all Kubernetes and Helm resources in the cluster. | `string` | `"logs-agent"` | no |
9898
| <a name="input_logs_agent_namespace"></a> [logs\_agent\_namespace](#input\_logs\_agent\_namespace) | The namespace where the Logs agent is deployed. The default value is `ibm-observe`. | `string` | `"ibm-observe"` | no |
99-
| <a name="input_logs_agent_resources"></a> [logs\_agent\_resources](#input\_logs\_agent\_resources) | The resources configuration for cpu/memory/storage | <pre>object({<br> limits = object({<br> cpu = string<br> memory = string<br> ephemeral_storage = string<br> })<br> requests = object({<br> cpu = string<br> memory = string<br> ephemeral_storage = string<br> })<br> })</pre> | <pre>{<br> "limits": {<br> "cpu": "500m",<br> "ephemeral_storage": "10Gi",<br> "memory": "3Gi"<br> },<br> "requests": {<br> "cpu": "100m",<br> "ephemeral_storage": "2Gi",<br> "memory": "1Gi"<br> }<br>}</pre> | no |
99+
| <a name="input_logs_agent_resources"></a> [logs\_agent\_resources](#input\_logs\_agent\_resources) | The resources configuration for cpu/memory/storage. [Learn more](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-helm-template-clusters#agent-helm-template-clusters-chart-options-resources) | <pre>object({<br> limits = object({<br> cpu = string<br> memory = string<br> ephemeral_storage = string<br> })<br> requests = object({<br> cpu = string<br> memory = string<br> ephemeral_storage = string<br> })<br> })</pre> | <pre>{<br> "limits": {<br> "cpu": "500m",<br> "ephemeral_storage": "10Gi",<br> "memory": "3Gi"<br> },<br> "requests": {<br> "cpu": "100m",<br> "ephemeral_storage": "2Gi",<br> "memory": "1Gi"<br> }<br>}</pre> | no |
100100
| <a name="input_logs_agent_selected_log_source_paths"></a> [logs\_agent\_selected\_log\_source\_paths](#input\_logs\_agent\_selected\_log\_source\_paths) | The list of specific log sources paths. Logs will only be collected from the specified log source paths. If no paths are specified, it will send logs from `/var/log/containers`. | `list(string)` | `[]` | no |
101101
| <a name="input_logs_agent_tolerations"></a> [logs\_agent\_tolerations](#input\_logs\_agent\_tolerations) | List of tolerations to apply to Logs agent. The default value means a pod will run on every node. | <pre>list(object({<br> key = optional(string)<br> operator = optional(string)<br> value = optional(string)<br> effect = optional(string)<br> tolerationSeconds = optional(number)<br> }))</pre> | <pre>[<br> {<br> "operator": "Exists"<br> }<br>]</pre> | no |
102102
| <a name="input_logs_agent_trusted_profile"></a> [logs\_agent\_trusted\_profile](#input\_logs\_agent\_trusted\_profile) | The IBM Cloud trusted profile ID. Used only when `logs_agent_iam_mode` is set to `TrustedProfile`. The trusted profile must have an IBM Cloud Logs `Sender` role. | `string` | `null` | no |

modules/logs-agent/main.tf

+5
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ resource "helm_release" "logs_agent" {
112112
value = var.logs_agent_enable_scc
113113
}
114114

115+
set {
116+
name = "resources"
117+
value = jsonencode(var.logs_agent_resources)
118+
}
119+
115120
# dummy value hack to force update https://github.com/hashicorp/terraform-provider-helm/issues/515#issuecomment-813088122
116121
values = [
117122
yamlencode({

modules/logs-agent/variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ variable "logs_agent_additional_metadata" {
155155
}
156156

157157
variable "logs_agent_resources" {
158-
description = "The resources configuration for cpu/memory/storage"
158+
description = "The resources configuration for cpu/memory/storage. [Learn more](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-helm-template-clusters#agent-helm-template-clusters-chart-options-resources)"
159159
type = object({
160160
limits = object({
161161
cpu = string

variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ variable "logs_agent_additional_metadata" {
269269
}
270270

271271
variable "logs_agent_resources" {
272-
description = "The resources configuration for cpu/memory/storage"
272+
description = "The resources configuration for cpu/memory/storage. [Learn more](https://cloud.ibm.com/docs/cloud-logs?topic=cloud-logs-agent-helm-template-clusters#agent-helm-template-clusters-chart-options-resources)"
273273
type = object({
274274
limits = object({
275275
cpu = string

0 commit comments

Comments
 (0)