Skip to content

Commit 4e9ec24

Browse files
Jordan-Williams2Jordan-Williams2
authored andcommitted
feat: add features to new DA helm chart
1 parent 2b03460 commit 4e9ec24

File tree

3 files changed

+14
-22
lines changed

3 files changed

+14
-22
lines changed

examples/obs-agent-ocp/main.tf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ module "cloud_monitoring" {
107107
# Monitoring Agents
108108
##############################################################################
109109

110-
# module "monitoring_agents" {
111-
# source = "../.."
112-
# cluster_id = module.ocp_base.cluster_id
113-
# cluster_resource_group_id = module.resource_group.resource_group_id
114-
# # Monitoring agent
115-
# access_key = module.cloud_monitoring.access_key
116-
# # example of how to include / exclude metrics - more info https://cloud.ibm.com/docs/monitoring?topic=monitoring-change_kube_agent#change_kube_agent_log_metrics
117-
# metrics_filter = [{ type = "exclude", name = "metricA.*" }, { type = "include", name = "metricB.*" }]
118-
# container_filter = [{ type = "exclude", parameter = "kubernetes.namespace.name", name = "kube-system" }]
119-
# cloud_monitoring_instance_region = var.region
120-
# }
110+
module "monitoring_agents" {
111+
source = "../.."
112+
cluster_id = module.ocp_base.cluster_id
113+
cluster_resource_group_id = module.resource_group.resource_group_id
114+
# Monitoring agent
115+
access_key = module.cloud_monitoring.access_key
116+
# example of how to include / exclude metrics - more info https://cloud.ibm.com/docs/monitoring?topic=monitoring-change_kube_agent#change_kube_agent_log_metrics
117+
metrics_filter = [{ exclude = "metricA.*", include = "metricB.*" }]
118+
container_filter = [{ type = "exclude", parameter = "kubernetes.namespace.name", name = "kube-system" }]
119+
cloud_monitoring_instance_region = var.region
120+
}

solutions/fully-configurable/variables.tf

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ variable "cluster_resource_group_id" {
2323
variable "cluster_config_endpoint_type" {
2424
description = "Specify the type of endpoint to use to access the cluster configuration. Possible values: `default`, `private`, `vpe`, `link`. The `default` value uses the default endpoint of the cluster."
2525
type = string
26-
default = "private" # Use 'private' for VPC clusters, 'default' for classic clusters
27-
nullable = false # use default if null is passed in
26+
default = "private"
27+
nullable = false # use default if null is passed in
2828
}
2929

3030
variable "is_vpc_cluster" {
@@ -87,11 +87,7 @@ variable "metrics_filter" {
8787
exclude = optional(string)
8888
}))
8989
description = "To filter on custom metrics, specify the IBM Cloud Monitoring metrics to include or exclude. [Learn more](https://cloud.ibm.com/docs/monitoring?topic=monitoring-change_kube_agent#change_kube_agent_inc_exc_metrics) and [here](https://github.com/terraform-ibm-modules/terraform-ibm-monitoring-agent/tree/main/solutions/fully-configurable/DA-types.md)."
90-
default = [] # [{ type = "exclude", name = "metricA.*" }, { type = "include", name = "metricB.*" }]
91-
validation {
92-
condition = length(var.metrics_filter) == 0 || can(regex("^(include|exclude)$", var.metrics_filter[0].include)) || can(regex("^(include|exclude)$", var.metrics_filter[0].exclude))
93-
error_message = "Invalid input for `metrics_filter`. Valid options for 'include' and 'exclude' are: `include` and `exclude`. If empty, no metrics are included or excluded."
94-
}
90+
default = [] # [{ exclude = "metricA.*", include = "metricB.*" }]
9591
}
9692

9793
variable "agent_tags" {

variables.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ variable "metrics_filter" {
100100
}))
101101
description = "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."
102102
default = []
103-
validation {
104-
condition = length(var.metrics_filter) == 0 || can(regex("^(include|exclude)$", var.metrics_filter[0].include)) || can(regex("^(include|exclude)$", var.metrics_filter[0].exclude))
105-
error_message = "Invalid input for `metrics_filter`. Valid options for 'include' and 'exclude' are: `include` and `exclude`. If empty, no metrics are included or excluded."
106-
}
107103
}
108104

109105
variable "container_filter" {

0 commit comments

Comments
 (0)