Skip to content
Closed
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ No modules.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_access_key"></a> [access\_key](#input\_access\_key) | Access key used by the IBM Cloud Monitoring agent to communicate with the instance | `string` | n/a | yes |
| <a name="input_blacklisted_ports"></a> [blacklisted\_ports](#input\_blacklisted\_ports) | To blacklist ports, include the ports you wish to block network traffic and metrics from network ports. See https://cloud.ibm.com/docs/monitoring?topic=monitoring-change_kube_agent#change_kube_agent_block_ports. | `list(number)` | `[]` | no |
| <a name="input_chart"></a> [chart](#input\_chart) | The name of the Helm chart to deploy. | `string` | `"sysdig-deploy"` | no |
| <a name="input_chart_location"></a> [chart\_location](#input\_chart\_location) | The location of the Cloud Monitoring agent helm chart. | `string` | `"https://charts.sysdig.com"` | no |
| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | The version of the Cloud Monitoring agent helm chart to deploy. | `string` | `"1.80.3"` | no |
Expand Down
5 changes: 5 additions & 0 deletions examples/obs-agent-iks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,9 @@ module "monitoring_agents" {
# # Monitoring agent
access_key = module.cloud_monitoring.access_key
cloud_monitoring_instance_region = var.region
# blacklisted_ports = [
# {
# port = 8080
# }
# ]
}
3 changes: 3 additions & 0 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@
{
"key": "metrics_filter"
},
{
"key": "blacklisted_ports"
},
{
"key": "cluster_config_endpoint_type",
"options": [
Expand Down
29 changes: 22 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,28 @@ resource "helm_release" "cloud_monitoring_agent" {
value = false
}

values = [yamlencode({
metrics_filter = var.metrics_filter
}), yamlencode({
tolerations = var.tolerations
}), yamlencode({
container_filter = var.container_filter
})]
values = [
yamlencode(
{
metrics_filter = var.metrics_filter
}
),
yamlencode(
{
tolerations = var.tolerations
}
),
yamlencode(
{
container_filter = var.container_filter
}
),
yamlencode(
{
blacklisted_ports = var.blacklisted_ports
}
)
]

provisioner "local-exec" {
command = "${path.module}/scripts/confirm-rollout-status.sh ${var.name} ${var.namespace}"
Expand Down
1 change: 1 addition & 0 deletions solutions/fully-configurable/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module "monitoring_agent" {
cloud_monitoring_instance_endpoint_type = var.cloud_monitoring_instance_endpoint_type
access_key = var.access_key
metrics_filter = var.metrics_filter
blacklisted_ports = var.blacklisted_ports
cloud_monitoring_instance_region = var.cloud_monitoring_instance_region
tolerations = var.tolerations
chart = var.chart
Expand Down
6 changes: 6 additions & 0 deletions solutions/fully-configurable/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ variable "metrics_filter" {
default = [] # [{ type = "exclude", name = "metricA.*" }, { type = "include", name = "metricB.*" }]
}

variable "blacklisted_ports" {
type = list(number)
description = "To blacklist ports, include the ports you wish to block network traffic and metrics from network ports. See https://cloud.ibm.com/docs/monitoring?topic=monitoring-change_kube_agent#change_kube_agent_block_ports."
default = []
}

variable "name" {
description = "The name of the IBM Cloud Monitoring agent that is used to name the Kubernetes and Helm resources on the cluster."
type = string
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ variable "metrics_filter" {
}
}

variable "blacklisted_ports" {
type = list(number)
description = "To blacklist ports, include the ports you wish to block network traffic and metrics from network ports. See https://cloud.ibm.com/docs/monitoring?topic=monitoring-change_kube_agent#change_kube_agent_block_ports."
default = []
}

variable "container_filter" {
type = list(object({
type = string
Expand Down