Skip to content

Commit b4582d3

Browse files
authored
feat: logs_agent_additional_log_source_paths has been replaced by logs_agent_system_logs which is now using the systemLogs functionality (instead of additionalLogSourcePaths) (#101)
1 parent 7e3e5e7 commit b4582d3

File tree

8 files changed

+35
-34
lines changed

8 files changed

+35
-34
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ No modules.
119119
| <a name="input_cluster_resource_group_id"></a> [cluster\_resource\_group\_id](#input\_cluster\_resource\_group\_id) | The resource group ID of the cluster. | `string` | n/a | yes |
120120
| <a name="input_enable_multiline"></a> [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 |
121121
| <a name="input_is_vpc_cluster"></a> [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 |
122-
| <a name="input_logs_agent_additional_log_source_paths"></a> [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 |
123122
| <a name="input_logs_agent_additional_metadata"></a> [logs\_agent\_additional\_metadata](#input\_logs\_agent\_additional\_metadata) | The list of additional metadata fields to add to the routed logs. | <pre>list(object({<br/> key = optional(string)<br/> value = optional(string)<br/> }))</pre> | `[]` | no |
124123
| <a name="input_logs_agent_chart"></a> [logs\_agent\_chart](#input\_logs\_agent\_chart) | The name of the Helm chart to deploy. | `string` | `"logs-agent-helm"` | no |
125124
| <a name="input_logs_agent_chart_location"></a> [logs\_agent\_chart\_location](#input\_logs\_agent\_chart\_location) | The location of the Logs agent helm chart. | `string` | `"oci://icr.io/ibm/observe"` | no |
@@ -135,6 +134,7 @@ No modules.
135134
| <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 |
136135
| <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/> })<br/> requests = object({<br/> cpu = string<br/> memory = string<br/> })<br/> })</pre> | <pre>{<br/> "limits": {<br/> "cpu": "500m",<br/> "memory": "3Gi"<br/> },<br/> "requests": {<br/> "cpu": "100m",<br/> "memory": "1Gi"<br/> }<br/>}</pre> | no |
137136
| <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 |
137+
| <a name="input_logs_agent_system_logs"></a> [logs\_agent\_system\_logs](#input\_logs\_agent\_system\_logs) | 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 |
138138
| <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 |
139139
| <a name="input_logs_agent_trusted_profile_id"></a> [logs\_agent\_trusted\_profile\_id](#input\_logs\_agent\_trusted\_profile\_id) | 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 |
140140
| <a name="input_wait_till"></a> [wait\_till](#input\_wait\_till) | To avoid long wait times when you run your Terraform code, you can specify the stage when you want Terraform to mark the cluster resource creation as completed. Depending on what stage you choose, the cluster creation might not be fully completed and continues to run in the background. However, your Terraform code can continue to run without waiting for the cluster to be fully created. Supported args are `MasterNodeReady`, `OneWorkerNodeReady`, `IngressReady` and `Normal` | `string` | `"Normal"` | no |

examples/logs-agent-ocp/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,5 +199,5 @@ module "logs_agent" {
199199
}
200200
}
201201
# example of how to add additional log source path
202-
logs_agent_additional_log_source_paths = ["/logs/*.log"]
202+
logs_agent_system_logs = ["/logs/*.log"]
203203
}

ibm_catalog.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
"key": "logs_agent_resources"
125125
},
126126
{
127-
"key": "logs_agent_additional_log_source_paths",
127+
"key": "logs_agent_system_logs",
128128
"custom_config": {
129129
"grouping": "deployment",
130130
"original_grouping": "deployment",

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ resource "helm_release" "logs_agent" {
8787
value = var.logs_agent_iam_environment
8888
}
8989
set {
90-
name = "additionalLogSourcePaths"
90+
name = "systemLogs"
9191
type = "string"
92-
value = join("\\,", var.logs_agent_additional_log_source_paths)
92+
value = join("\\,", var.logs_agent_system_logs)
9393
}
9494
set {
9595
name = "excludeLogSourcePaths"

solutions/fully-configurable/main.tf

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,28 @@ module "logs_agent" {
2020
cluster_resource_group_id = var.cluster_resource_group_id
2121
cluster_config_endpoint_type = local.cluster_config_endpoint_type
2222
# Logs Agent
23-
logs_agent_chart = var.logs_agent_chart
24-
logs_agent_chart_location = var.logs_agent_chart_location
25-
logs_agent_chart_version = var.logs_agent_chart_version
26-
logs_agent_image_version = var.logs_agent_image_version
27-
logs_agent_name = var.logs_agent_name
28-
logs_agent_namespace = var.logs_agent_namespace
29-
logs_agent_trusted_profile_id = var.logs_agent_trusted_profile_id
30-
logs_agent_iam_api_key = var.logs_agent_iam_api_key
31-
logs_agent_tolerations = var.logs_agent_tolerations
32-
logs_agent_additional_log_source_paths = var.logs_agent_additional_log_source_paths
33-
logs_agent_exclude_log_source_paths = var.logs_agent_exclude_log_source_paths
34-
logs_agent_selected_log_source_paths = var.logs_agent_selected_log_source_paths
35-
logs_agent_log_source_namespaces = var.logs_agent_log_source_namespaces
36-
logs_agent_iam_mode = var.logs_agent_iam_mode
37-
logs_agent_iam_environment = var.logs_agent_iam_environment
38-
logs_agent_additional_metadata = var.logs_agent_additional_metadata
39-
logs_agent_enable_scc = var.is_ocp_cluster
40-
logs_agent_resources = var.logs_agent_resources
41-
cloud_logs_ingress_endpoint = var.cloud_logs_ingress_endpoint
42-
cloud_logs_ingress_port = var.cloud_logs_ingress_port
43-
is_vpc_cluster = var.is_vpc_cluster
44-
wait_till = var.wait_till
45-
wait_till_timeout = var.wait_till_timeout
46-
enable_multiline = var.enable_multiline
23+
logs_agent_chart = var.logs_agent_chart
24+
logs_agent_chart_location = var.logs_agent_chart_location
25+
logs_agent_chart_version = var.logs_agent_chart_version
26+
logs_agent_image_version = var.logs_agent_image_version
27+
logs_agent_name = var.logs_agent_name
28+
logs_agent_namespace = var.logs_agent_namespace
29+
logs_agent_trusted_profile_id = var.logs_agent_trusted_profile_id
30+
logs_agent_iam_api_key = var.logs_agent_iam_api_key
31+
logs_agent_tolerations = var.logs_agent_tolerations
32+
logs_agent_system_logs = var.logs_agent_system_logs
33+
logs_agent_exclude_log_source_paths = var.logs_agent_exclude_log_source_paths
34+
logs_agent_selected_log_source_paths = var.logs_agent_selected_log_source_paths
35+
logs_agent_log_source_namespaces = var.logs_agent_log_source_namespaces
36+
logs_agent_iam_mode = var.logs_agent_iam_mode
37+
logs_agent_iam_environment = var.logs_agent_iam_environment
38+
logs_agent_additional_metadata = var.logs_agent_additional_metadata
39+
logs_agent_enable_scc = var.is_ocp_cluster
40+
logs_agent_resources = var.logs_agent_resources
41+
cloud_logs_ingress_endpoint = var.cloud_logs_ingress_endpoint
42+
cloud_logs_ingress_port = var.cloud_logs_ingress_port
43+
is_vpc_cluster = var.is_vpc_cluster
44+
wait_till = var.wait_till
45+
wait_till_timeout = var.wait_till_timeout
46+
enable_multiline = var.enable_multiline
4747
}

solutions/fully-configurable/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ variable "logs_agent_resources" {
137137
}
138138
}
139139

140-
variable "logs_agent_additional_log_source_paths" {
140+
variable "logs_agent_system_logs" {
141141
type = list(string)
142142
description = "The list of additional log sources. By default, the Logs agent collects logs from a single source at `/var/log/containers/logger-agent-ds-*.log`."
143143
default = []

tests/pr_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ var sharedInfoSvc *cloudinfo.CloudInfoService
3333

3434
var validRegions = []string{
3535
"au-syd",
36-
"eu-gb",
37-
"eu-de",
38-
"eu-es",
36+
// Temporarily disabling europe regions due to IKS error
37+
//"eu-gb",
38+
//"eu-de",
39+
//"eu-es",
3940
"us-south",
4041
}
4142

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ variable "logs_agent_resources" {
156156
}
157157
}
158158

159-
variable "logs_agent_additional_log_source_paths" {
159+
variable "logs_agent_system_logs" {
160160
type = list(string)
161161
description = "The list of additional log sources. By default, the Logs agent collects logs from a single source at `/var/log/containers/*.log`."
162162
default = []

0 commit comments

Comments
 (0)