From 28ba99ea2ec8df94334655db73dbeafa93b61399 Mon Sep 17 00:00:00 2001 From: Aram Karapetyan Date: Thu, 12 Oct 2023 16:18:55 +0400 Subject: [PATCH] fix(DMVP-eks-update): Change default values --- README.md | 2 +- fluent-bit.tf | 17 ++++++++++++++++- variables.tf | 16 +++++++++++++++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f74b81f..82ec703 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,7 @@ worker_groups = { | [enable\_olm](#input\_enable\_olm) | To install OLM controller (experimental). | `bool` | `false` | no | | [enable\_sso\_rbac](#input\_enable\_sso\_rbac) | Enable SSO RBAC integration or not | `bool` | `false` | no | | [external\_secrets\_namespace](#input\_external\_secrets\_namespace) | The namespace of external-secret operator | `string` | `"kube-system"` | no | -| [fluent\_bit\_configs](#input\_fluent\_bit\_configs) | Fluent Bit configs |
object({
fluent_bit_name = optional(string, "")
log_group_name = optional(string, "")
system_log_group_name = optional(string, "")
log_retention_days = optional(number, 90)
values_yaml = optional(string, "")
configs = optional(object({
inputs = optional(string, "")
filters = optional(string, "")
outputs = optional(string, "")
}), {})
drop_namespaces = optional(list(string), [])
log_filters = optional(list(string), [])
additional_log_filters = optional(list(string), [])
})
|
{
"additional_log_filters": [
"ELB-HealthChecker",
"Amazon-Route53-Health-Check-Service"
],
"configs": {
"filters": "",
"inputs": "",
"outputs": ""
},
"drop_namespaces": [
"kube-system",
"opentelemetry-operator-system",
"adot",
"cert-manager"
],
"fluent_bit_name": "",
"log_filters": [
"kube-probe",
"health",
"prometheus",
"liveness"
],
"log_group_name": "",
"log_retention_days": 90,
"system_log_group_name": "",
"values_yaml": ""
}
| no | +| [fluent\_bit\_configs](#input\_fluent\_bit\_configs) | Fluent Bit configs |
object({
fluent_bit_name = optional(string, "")
log_group_name = optional(string, "")
system_log_group_name = optional(string, "")
log_retention_days = optional(number, 90)
values_yaml = optional(string, "")
configs = optional(object({
inputs = optional(string, "")
filters = optional(string, "")
outputs = optional(string, "")
}), {})
drop_namespaces = optional(list(string), [])
log_filters = optional(list(string), [])
additional_log_filters = optional(list(string), [])
kube_namespaces = optional(list(string), [])
})
|
{
"additional_log_filters": [
"ELB-HealthChecker",
"Amazon-Route53-Health-Check-Service"
],
"configs": {
"filters": "",
"inputs": "",
"outputs": ""
},
"drop_namespaces": [
"kube-system",
"opentelemetry-operator-system",
"adot",
"cert-manager",
"opentelemetry.*",
"meta.*"
],
"fluent_bit_name": "",
"kube_namespaces": [
"kube.*",
"meta.*",
"adot.*",
"devops.*",
"cert-manager.*",
"git.*",
"opentelemetry.*",
"stakater.*",
"renovate.*"
],
"log_filters": [
"kube-probe",
"health",
"prometheus",
"liveness"
],
"log_group_name": "",
"log_retention_days": 90,
"system_log_group_name": "",
"values_yaml": ""
}
| no | | [manage\_aws\_auth](#input\_manage\_aws\_auth) | n/a | `bool` | `true` | no | | [map\_roles](#input\_map\_roles) | Additional IAM roles to add to the aws-auth configmap. |
list(object({
rolearn = string
username = string
groups = list(string)
}))
| `[]` | no | | [metrics\_exporter](#input\_metrics\_exporter) | Metrics Exporter, can use cloudwatch or adot | `string` | `"cloudwatch"` | no | diff --git a/fluent-bit.tf b/fluent-bit.tf index 247054f..6645218 100644 --- a/fluent-bit.tf +++ b/fluent-bit.tf @@ -21,8 +21,11 @@ module "fluent-bit" { "kube-system", "opentelemetry-operator-system", "adot", - "cert-manager" + "cert-manager", + "opentelemetry.*", + "meta.*", ]) + log_filters = try(var.fluent_bit_configs.log_filters, [ "kube-probe", "health", @@ -30,6 +33,18 @@ module "fluent-bit" { "liveness" ]) + kube_namespaces = try(var.fluent_bit_configs.kube_namespaces, [ + "kube.*", + "meta.*", + "adot.*", + "devops.*", + "cert-manager.*", + "git.*", + "opentelemetry.*", + "stakater.*", + "renovate.*" + ]) + additional_log_filters = try(var.fluent_bit_configs.additional_log_filters, [ "ELB-HealthChecker", "Amazon-Route53-Health-Check-Service", diff --git a/variables.tf b/variables.tf index 9108ca8..681e512 100644 --- a/variables.tf +++ b/variables.tf @@ -119,6 +119,7 @@ variable "fluent_bit_configs" { drop_namespaces = optional(list(string), []) log_filters = optional(list(string), []) additional_log_filters = optional(list(string), []) + kube_namespaces = optional(list(string), []) }) default = { fluent_bit_name = "" @@ -135,7 +136,9 @@ variable "fluent_bit_configs" { "kube-system", "opentelemetry-operator-system", "adot", - "cert-manager" + "cert-manager", + "opentelemetry.*", + "meta.*", ] log_filters = [ "kube-probe", @@ -147,6 +150,17 @@ variable "fluent_bit_configs" { "ELB-HealthChecker", "Amazon-Route53-Health-Check-Service", ] + kube_namespaces = [ + "kube.*", + "meta.*", + "adot.*", + "devops.*", + "cert-manager.*", + "git.*", + "opentelemetry.*", + "stakater.*", + "renovate.*" + ] } description = "Fluent Bit configs" }