Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
711a8b6
feat: initial module + DA
Mar 24, 2025
cb9494f
Merge branch 'main' into agent-da
jor2 Apr 2, 2025
2ecdbb7
feat: update code
Apr 2, 2025
b29584c
feat: update code
Apr 2, 2025
c808266
feat: update code
Apr 2, 2025
13c8f99
fix: catalog.json SKIP UPGRADE TESTS
Apr 2, 2025
df3c030
fix: update outputs
Apr 2, 2025
1b9cb91
fix: add dir
Apr 2, 2025
5f908cd
fix: outbound traffic
Apr 2, 2025
8198c0b
fix: outbound traffic
Apr 2, 2025
a969063
fix: outbound traffic
Apr 2, 2025
9e939dc
fix: address feedback
Apr 4, 2025
eaae3d2
Merge branch 'main' into agent-da
jor2 Apr 4, 2025
fc9ce23
fix: address feedback
Apr 4, 2025
c9b83a2
fix: address feedback
Apr 4, 2025
5b9d124
fix: address feedback
Apr 4, 2025
4aa3fbc
Merge branch 'main' into agent-da
jor2 Apr 7, 2025
e3ada1e
fix: address feedback
Apr 7, 2025
e2f7c9c
fix: address feedback
Apr 7, 2025
2c211b2
Merge branch 'main' into agent-da
jor2 Apr 7, 2025
fe841bd
fix: address feedback
Apr 7, 2025
d80d603
fix: address feedback
Apr 7, 2025
ce0f7e1
Merge branch 'main' into agent-da
jor2 Apr 9, 2025
acb982e
fix: address feedback
Apr 9, 2025
b7b304b
fix: address feedback
Apr 9, 2025
c341bb0
fix: address feedback
Apr 10, 2025
137a2ec
fix: address feedback
Apr 10, 2025
67c941a
Merge branch 'main' into agent-da
jor2 Apr 14, 2025
b22a686
fix: address feedback
Apr 14, 2025
86e52a1
fix: address feedback
Apr 14, 2025
b8725c5
fix: address feedback
Apr 14, 2025
2fbe1fd
fix: address feedback
Apr 14, 2025
dfbaaee
fix: address feedback
Apr 14, 2025
4924c43
Merge branch 'main' into agent-da
jor2 Apr 21, 2025
17ec977
fix: address feedback
Apr 24, 2025
ede2e70
fix: address feedback
Apr 24, 2025
01ebab4
tests: add plan tests
Apr 24, 2025
4dd7a9f
fix: address feedback
Apr 24, 2025
78eb2cb
fix: address feedback
Apr 25, 2025
cb8b621
fix: address feedback
Apr 25, 2025
715df11
fix: address feedback
Apr 25, 2025
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: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ No modules.
| <a name="input_cloud_monitoring_access_key"></a> [cloud\_monitoring\_access\_key](#input\_cloud\_monitoring\_access\_key) | Access key used by the IBM Cloud Monitoring agent to communicate with the instance | `string` | n/a | yes |
| <a name="input_cloud_monitoring_agent_name"></a> [cloud\_monitoring\_agent\_name](#input\_cloud\_monitoring\_agent\_name) | Cloud Monitoring agent name. Used for naming all kubernetes and helm resources on the cluster. | `string` | `"sysdig-agent"` | no |
| <a name="input_cloud_monitoring_agent_namespace"></a> [cloud\_monitoring\_agent\_namespace](#input\_cloud\_monitoring\_agent\_namespace) | Namespace where to deploy the Cloud Monitoring agent. Default value is 'ibm-observe' | `string` | `"ibm-observe"` | no |
| <a name="input_cloud_monitoring_agent_registry"></a> [cloud\_monitoring\_agent\_registry](#input\_cloud\_monitoring\_agent\_registry) | The image registry to use for the Cloud Monitoring agent. | `string` | `"icr.io/ext/sysdig/agent"` | no |
| <a name="input_cloud_monitoring_agent_tolerations"></a> [cloud\_monitoring\_agent\_tolerations](#input\_cloud\_monitoring\_agent\_tolerations) | List of tolerations to apply to Cloud Monitoring agent. | <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/> {<br/> "effect": "NoSchedule",<br/> "key": "node-role.kubernetes.io/master",<br/> "operator": "Exists"<br/> }<br/>]</pre> | no |
| <a name="input_cloud_monitoring_container_filter"></a> [cloud\_monitoring\_container\_filter](#input\_cloud\_monitoring\_container\_filter) | To filter custom containers, specify which containers to include or exclude from metrics collection for the cloud monitoring agent. See https://cloud.ibm.com/docs/monitoring?topic=monitoring-change_kube_agent#change_kube_agent_filter_data. | <pre>list(object({<br/> type = string<br/> parameter = string<br/> name = string<br/> }))</pre> | `[]` | no |
| <a name="input_cloud_monitoring_endpoint_type"></a> [cloud\_monitoring\_endpoint\_type](#input\_cloud\_monitoring\_endpoint\_type) | Specify the IBM Cloud Monitoring instance endpoint type (public or private) to use. Used to construct the ingestion endpoint. | `string` | `"private"` | no |
| <a name="input_cloud_monitoring_image_tag_digest"></a> [cloud\_monitoring\_image\_tag\_digest](#input\_cloud\_monitoring\_image\_tag\_digest) | The image tag digest to use for the Cloud Monitoring agent. | `string` | `"13.8.1@sha256:e5d1c63edf07c9f861249432c00873e32141381c15fbcff80b90a12b272dc0b9"` | no |
| <a name="input_cloud_monitoring_instance_region"></a> [cloud\_monitoring\_instance\_region](#input\_cloud\_monitoring\_instance\_region) | The IBM Cloud Monitoring instance region. Used to construct the ingestion endpoint. | `string` | n/a | yes |
| <a name="input_cloud_monitoring_metrics_filter"></a> [cloud\_monitoring\_metrics\_filter](#input\_cloud\_monitoring\_metrics\_filter) | To filter custom metrics, specify the Cloud Monitoring metrics to include or to exclude. See https://cloud.ibm.com/docs/monitoring?topic=monitoring-change_kube_agent#change_kube_agent_inc_exc_metrics. | <pre>list(object({<br/> type = string<br/> name = string<br/> }))</pre> | `[]` | no |
| <a name="input_cluster_config_endpoint_type"></a> [cluster\_config\_endpoint\_type](#input\_cluster\_config\_endpoint\_type) | Specify which type of endpoint to use for for cluster config access: 'default', 'private', 'vpe', 'link'. 'default' value will use the default endpoint of the cluster. | `string` | `"default"` | no |
Expand Down
8 changes: 8 additions & 0 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@
"key": "cloud_monitoring_access_key",
"required": true
},
{
"key": "cloud_monitoring_agent_registry",
"required": true
},
{
"key": "cloud_monitoring_image_tag_digest",
"required": true
},
{
"key": "cloud_monitoring_instance_region",
"required": true,
Expand Down
10 changes: 10 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ resource "helm_release" "cloud_monitoring_agent" {
type = "string"
value = local.cluster_name
}
set {
name = "image.version"
type = "string"
value = var.cloud_monitoring_image_tag_digest
}
set {
name = "image.registry"
type = "string"
value = var.cloud_monitoring_agent_registry
}

values = [yamlencode({
metrics_filter = var.cloud_monitoring_metrics_filter
Expand Down
2 changes: 2 additions & 0 deletions solutions/fully-configurable/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ module "monitoring_agent" {
chart = var.chart
chart_location = var.chart_location
chart_version = var.chart_version
cloud_monitoring_agent_registry = var.cloud_monitoring_agent_registry
cloud_monitoring_image_tag_digest = var.cloud_monitoring_image_tag_digest
}
14 changes: 14 additions & 0 deletions solutions/fully-configurable/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,17 @@ variable "chart_version" {
default = "1.79.0" # Replace with the desired version
nullable = false
}

variable "cloud_monitoring_agent_registry" {
description = "The image registry to use for the Cloud Monitoring agent."
type = string
default = "icr.io/ext/sysdig/agent"
nullable = false
}

variable "cloud_monitoring_image_tag_digest" {
description = "The image tag digest to use for the Cloud Monitoring agent."
type = string
default = "13.8.1@sha256:e5d1c63edf07c9f861249432c00873e32141381c15fbcff80b90a12b272dc0b9" # datasource: icr.io/ext/sysdig/agent
nullable = false
}
14 changes: 14 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,17 @@ variable "chart_version" {
default = "1.79.0" # Replace with the desired version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For renovate to manage this, please change to:

Suggested change
default = "1.79.0" # Replace with the desired version
default = "1.79.0" # registryUrl: charts.sysdig.com

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to update the renovate.json file with the following contents:

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": ["github>terraform-ibm-modules/common-dev-assets:commonRenovateConfig"],
  "customManagers": [
    {
      "customType": "regex",
      "description": "Update docker image digest to latest in variables.tf",
      "fileMatch": ["variables.tf$"],
      "datasourceTemplate": "docker",
      "matchStrings": [
        "default\\s*=\\s*\"(?<currentValue>[\\w.-]+)@(?<currentDigest>sha256:[a-f0-9]+)\"\\s*# datasource: (?<depName>[^\\s]+)"
      ]
    },
    {
      "customType": "regex",
      "description": "Update sysdig-deploy helm chart version to latest in variables.tf",
      "fileMatch": ["variables.tf$"],
      "matchStrings": ["default\\s*=\\s*\"(?<currentValue>.*?)\"\\s*# registryUrl: charts.sysdig.com\\n"],
      "depNameTemplate": "sysdig-deploy",
      "datasourceTemplate": "helm",
      "registryUrlTemplate": "https://charts.sysdig.com"
    }
  ],
  "packageRules": [
    {
      "description": "Bundle image + helm chart updates into the same PR",
      "matchPackageNames": ["icr.io/ext/sysdig/agent", "sysdig-deploy"],
      "groupName": "Charts and Images",
      "commitMessageExtra": "to latest",
      "group": true
    }
  ]
}

nullable = false
}

variable "cloud_monitoring_agent_registry" {
description = "The image registry to use for the Cloud Monitoring agent."
type = string
default = "icr.io/ext/sysdig/agent"
nullable = false
}

variable "cloud_monitoring_image_tag_digest" {
description = "The image tag digest to use for the Cloud Monitoring agent."
type = string
default = "13.8.1@sha256:e5d1c63edf07c9f861249432c00873e32141381c15fbcff80b90a12b272dc0b9" # datasource: icr.io/ext/sysdig/agent
nullable = false
}