Skip to content

Commit

Permalink
feat: removed support to provision Log Analysis from the instances
Browse files Browse the repository at this point in the history
…variation, and removed support to create an Atracker route to a Log Analysis. This service is deprecated and is replaced by IBM Cloud Logs. Support has also been removed to provision Log Analysis agents from the `agents` variation. (#187)

BREAKING CHANGE: Log Analysis instance and agent support has been fully removed
  • Loading branch information
terraform-ibm-modules-ops authored Oct 16, 2024
1 parent df75251 commit 0eed240
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 352 deletions.
2 changes: 1 addition & 1 deletion .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "go.sum|^.secrets.baseline$",
"lines": null
},
"generated_at": "2023-12-10T06:39:44Z",
"generated_at": "2023-12-11T06:39:44Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down
16 changes: 1 addition & 15 deletions solutions/agents/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,7 @@ module "observability_agents" {
cluster_resource_group_id = var.cluster_resource_group_id
cluster_config_endpoint_type = var.cluster_config_endpoint_type
# Log Analysis Agent
log_analysis_enabled = var.log_analysis_enabled
log_analysis_agent_name = var.prefix != null ? "${var.prefix}-${var.log_analysis_agent_name}" : var.log_analysis_agent_name
log_analysis_agent_namespace = var.log_analysis_agent_namespace
log_analysis_instance_region = var.log_analysis_instance_region
log_analysis_ingestion_key = var.log_analysis_ingestion_key
log_analysis_secret_name = var.prefix != null ? "${var.prefix}-${var.log_analysis_secret_name}" : var.log_analysis_secret_name
log_analysis_agent_tolerations = var.log_analysis_agent_tolerations
log_analysis_agent_tags = var.log_analysis_agent_tags
log_analysis_endpoint_type = var.log_analysis_endpoint_type
log_analysis_add_cluster_name = var.log_analysis_add_cluster_name
# Log Analysis agent custom settings to setup Kubernetes metadata logs filtering by setting
# LOGDNA_K8S_METADATA_LINE_INCLUSION and LOGDNA_K8S_METADATA_LINE_EXCLUSION in the agent daemonset definition
# Ref https://github.com/logdna/logdna-agent-v2/blob/3.8/docs/KUBERNETES.md#configuration-for-kubernetes-metadata-filtering
log_analysis_agent_custom_line_exclusion = var.log_analysis_agent_custom_line_inclusion
log_analysis_agent_custom_line_inclusion = var.log_analysis_agent_custom_line_exclusion
log_analysis_enabled = false
# Cloud Monitoring (Sysdig) Agent
cloud_monitoring_enabled = var.cloud_monitoring_enabled
cloud_monitoring_agent_name = var.prefix != null ? "${var.prefix}-${var.cloud_monitoring_agent_name}" : var.cloud_monitoring_agent_name
Expand Down
94 changes: 0 additions & 94 deletions solutions/agents/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,100 +63,6 @@ variable "wait_till_timeout" {
default = 90
}

##############################################################################
# Log Analysis variables
##############################################################################

variable "log_analysis_enabled" {
type = bool
description = "DEPRECATED: Whether to deploy the IBM Cloud logging agent."
default = false
}


variable "log_analysis_agent_tags" {
type = list(string)
description = "DEPRECATED: The list of tags to associate with all log records collected by the agent so that you can quickly identify the agent’s data in the logging UI. To add the cluster name as a tag, use the `log_analysis_add_cluster_name` variable."
default = []
nullable = false
}

variable "log_analysis_add_cluster_name" {
type = bool
description = "DEPRECATED: Whether to attach the cluster name to log messages. Set to `true` to configure the IBM Log Analysis agent to tag all log messages with the name."
default = true
}

variable "log_analysis_ingestion_key" {
type = string
description = "DEPRECATED: The ingestion key that is used by the IBM Cloud logging agent to communicate with the instance."
sensitive = true
default = null
}

variable "log_analysis_secret_name" {
type = string
description = "DEPRECATED: The name of the secret that stores the ingestion key. If a prefix input variable is specified, the secret name is prefixed to the value in the `<prefix>-<name>` format."
default = "logdna-agent"
nullable = false
}

variable "log_analysis_instance_region" {
type = string
description = "DEPRECATED: The name of the region where the IBM Log Analysis instance is created. The value is used in the ingestion endpoint in the format `api.<var-value>.logging.cloud.ibm.com`."
default = null
}

variable "log_analysis_endpoint_type" {
type = string
description = "DEPRECATED: Specify the IBM Log Analysis instance endpoint type to use to construct the ingestion endpoint. Possible values: `public` or `private`."
default = "private"
validation {
error_message = "The specified `endpoint_type` can be `private` or `public` only."
condition = contains(["private", "public"], var.log_analysis_endpoint_type)
}
}

variable "log_analysis_agent_custom_line_inclusion" {
description = "DEPRECATED: The custom configuration of the IBM Log Analysis agent for the `LOGDNA_K8S_METADATA_LINE_INCLUSION` line inclusion setting. [Learn more](https://github.com/logdna/logdna-agent-v2/blob/master/docs/KUBERNETES.md#configuration-for-kubernetes-metadata-filtering)"
type = string
default = null # "namespace:default"
}

variable "log_analysis_agent_custom_line_exclusion" {
description = "DEPRECATED: The custom configuration of the IBM Log Analysis agent for the `LOGDNA_K8S_METADATA_LINE_INCLUSION` line exclusion setting. [Learn more](https://github.com/logdna/logdna-agent-v2/blob/master/docs/KUBERNETES.md#configuration-for-kubernetes-metadata-filtering)"
type = string
default = null # "label.app.kubernetes.io/name:sample-app\\, annotation.user:sample-user"
}

variable "log_analysis_agent_name" {
description = "DEPRECATED: The name of the IBM Log Analysis agent that is used to name the Kubernetes and Helm resources on the cluster. If a prefix input variable is passed, the name of the IBM Log Analysis agent is prefixed to the value in the `<prefix>-<name>` format."
type = string
default = "logdna-agent"
nullable = false
}

variable "log_analysis_agent_namespace" {
type = string
description = "DEPRECATED: The namespace to deploy the IBM Log Analysis agent in. The default value of the namespace is `ibm-observe`."
default = "ibm-observe"
nullable = false
}

variable "log_analysis_agent_tolerations" {
description = "DEPRECATED: The list of tolerations to apply to the IBM Log Analysis agent. Because the default value is the `Exists` operator, this variable will match any taint on any node. [Learn more](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)"
type = list(object({
key = optional(string)
operator = optional(string)
value = optional(string)
effect = optional(string)
tolerationSeconds = optional(number)
}))
default = [{
operator = "Exists"
}]
}

##############################################################################
# Cloud Monitoring variables
##############################################################################
Expand Down
1 change: 0 additions & 1 deletion solutions/instances/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
This deployable architecture creates observability instances in IBM Cloud and supports provisioning the following resources:

* A resource group, if one is not passed in.
* An IBM Cloud Log Analysis instance (Disabled by default as service is deprecated)
* An IBM Cloud Monitoring instance.
* An IBM Cloud Logs instance.
* An IBM Cloud Object Storage instance, if one does not exist.
Expand Down
Loading

0 comments on commit 0eed240

Please sign in to comment.