Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ No modules.
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
Expand All @@ -135,6 +134,7 @@ No modules.
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
| <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 |
Expand Down
2 changes: 1 addition & 1 deletion examples/logs-agent-ocp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,5 @@ module "logs_agent" {
}
}
# example of how to add additional log source path
logs_agent_additional_log_source_paths = ["/logs/*.log"]
logs_agent_system_logs = ["/logs/*.log"]
}
2 changes: 1 addition & 1 deletion ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"key": "logs_agent_resources"
},
{
"key": "logs_agent_additional_log_source_paths",
"key": "logs_agent_system_logs",
"custom_config": {
"grouping": "deployment",
"original_grouping": "deployment",
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ resource "helm_release" "logs_agent" {
value = var.logs_agent_iam_environment
}
set {
name = "additionalLogSourcePaths"
name = "systemLogs"
type = "string"
value = join("\\,", var.logs_agent_additional_log_source_paths)
value = join("\\,", var.logs_agent_system_logs)
}
set {
name = "excludeLogSourcePaths"
Expand Down
48 changes: 24 additions & 24 deletions solutions/fully-configurable/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@ module "logs_agent" {
cluster_resource_group_id = var.cluster_resource_group_id
cluster_config_endpoint_type = local.cluster_config_endpoint_type
# Logs Agent
logs_agent_chart = var.logs_agent_chart
logs_agent_chart_location = var.logs_agent_chart_location
logs_agent_chart_version = var.logs_agent_chart_version
logs_agent_image_version = var.logs_agent_image_version
logs_agent_name = var.logs_agent_name
logs_agent_namespace = var.logs_agent_namespace
logs_agent_trusted_profile_id = var.logs_agent_trusted_profile_id
logs_agent_iam_api_key = var.logs_agent_iam_api_key
logs_agent_tolerations = var.logs_agent_tolerations
logs_agent_additional_log_source_paths = var.logs_agent_additional_log_source_paths
logs_agent_exclude_log_source_paths = var.logs_agent_exclude_log_source_paths
logs_agent_selected_log_source_paths = var.logs_agent_selected_log_source_paths
logs_agent_log_source_namespaces = var.logs_agent_log_source_namespaces
logs_agent_iam_mode = var.logs_agent_iam_mode
logs_agent_iam_environment = var.logs_agent_iam_environment
logs_agent_additional_metadata = var.logs_agent_additional_metadata
logs_agent_enable_scc = var.is_ocp_cluster
logs_agent_resources = var.logs_agent_resources
cloud_logs_ingress_endpoint = var.cloud_logs_ingress_endpoint
cloud_logs_ingress_port = var.cloud_logs_ingress_port
is_vpc_cluster = var.is_vpc_cluster
wait_till = var.wait_till
wait_till_timeout = var.wait_till_timeout
enable_multiline = var.enable_multiline
logs_agent_chart = var.logs_agent_chart
logs_agent_chart_location = var.logs_agent_chart_location
logs_agent_chart_version = var.logs_agent_chart_version
logs_agent_image_version = var.logs_agent_image_version
logs_agent_name = var.logs_agent_name
logs_agent_namespace = var.logs_agent_namespace
logs_agent_trusted_profile_id = var.logs_agent_trusted_profile_id
logs_agent_iam_api_key = var.logs_agent_iam_api_key
logs_agent_tolerations = var.logs_agent_tolerations
logs_agent_system_logs = var.logs_agent_system_logs
logs_agent_exclude_log_source_paths = var.logs_agent_exclude_log_source_paths
logs_agent_selected_log_source_paths = var.logs_agent_selected_log_source_paths
logs_agent_log_source_namespaces = var.logs_agent_log_source_namespaces
logs_agent_iam_mode = var.logs_agent_iam_mode
logs_agent_iam_environment = var.logs_agent_iam_environment
logs_agent_additional_metadata = var.logs_agent_additional_metadata
logs_agent_enable_scc = var.is_ocp_cluster
logs_agent_resources = var.logs_agent_resources
cloud_logs_ingress_endpoint = var.cloud_logs_ingress_endpoint
cloud_logs_ingress_port = var.cloud_logs_ingress_port
is_vpc_cluster = var.is_vpc_cluster
wait_till = var.wait_till
wait_till_timeout = var.wait_till_timeout
enable_multiline = var.enable_multiline
}
2 changes: 1 addition & 1 deletion solutions/fully-configurable/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ variable "logs_agent_resources" {
}
}

variable "logs_agent_additional_log_source_paths" {
variable "logs_agent_system_logs" {
type = list(string)
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`."
default = []
Expand Down
7 changes: 4 additions & 3 deletions tests/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ var sharedInfoSvc *cloudinfo.CloudInfoService

var validRegions = []string{
"au-syd",
"eu-gb",
"eu-de",
"eu-es",
// Temporarily disabling europe regions due to IKS error
//"eu-gb",
//"eu-de",
//"eu-es",
"us-south",
}

Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ variable "logs_agent_resources" {
}
}

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