Skip to content

Commit

Permalink
fix: fluent bit configuration for GCP (#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemaitre-aneo authored Feb 7, 2024
2 parents 9a3514d + 3640064 commit 061976d
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 48 deletions.
26 changes: 13 additions & 13 deletions infrastructure/quick-deploy/gcp/all-in-one/monitoring.tf
Original file line number Diff line number Diff line change
Expand Up @@ -217,19 +217,19 @@ module "fluent_bit" {
namespace = local.namespace
node_selector = var.fluent_bit.node_selector
fluent_bit = {
container_name = "fluent-bit"
image = local.docker_images["${var.fluent_bit.image_name}:${try(coalesce(var.fluent_bit.image_tag), "")}"].image
tag = local.docker_images["${var.fluent_bit.image_name}:${try(coalesce(var.fluent_bit.image_tag), "")}"].tag
parser = var.fluent_bit.parser
image_pull_secrets = var.fluent_bit.pull_secrets
is_daemonset = var.fluent_bit.is_daemonset
http_server = (var.fluent_bit.http_port == 0 ? "Off" : "On")
http_port = (var.fluent_bit.http_port == 0 ? "" : tostring(var.fluent_bit.http_port))
read_from_head = (var.fluent_bit.read_from_head ? "On" : "Off")
read_from_tail = (var.fluent_bit.read_from_head ? "Off" : "On")
fluent_bit_state_hostpath = var.fluent_bit.fluent_bit_state_hostpath
var_lib_docker_containers_hostpath = var.fluent_bit.var_lib_docker_containers_hostpath
run_log_journal_hostpath = var.fluent_bit.run_log_journal_hostpath
container_name = "fluent-bit"
image = local.docker_images["${var.fluent_bit.image_name}:${try(coalesce(var.fluent_bit.image_tag), "")}"].image
tag = local.docker_images["${var.fluent_bit.image_name}:${try(coalesce(var.fluent_bit.image_tag), "")}"].tag
parser = var.fluent_bit.parser
image_pull_secrets = var.fluent_bit.pull_secrets
is_daemonset = var.fluent_bit.is_daemonset
http_server = (var.fluent_bit.http_port == 0 ? "Off" : "On")
http_port = (var.fluent_bit.http_port == 0 ? "" : tostring(var.fluent_bit.http_port))
read_from_head = (var.fluent_bit.read_from_head ? "On" : "Off")
read_from_tail = (var.fluent_bit.read_from_head ? "Off" : "On")
fluentbitstate_hostpath = var.fluent_bit.fluentbitstate_hostpath
varlibdockercontainers_hostpath = var.fluent_bit.varlibdockercontainers_hostpath
runlogjournal_hostpath = var.fluent_bit.runlogjournal_hostpath
}
seq = length(module.seq) != 0 ? {
host = module.seq[0].host
Expand Down
22 changes: 11 additions & 11 deletions infrastructure/quick-deploy/gcp/all-in-one/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,17 @@ variable "partition_metrics_exporter" {
variable "fluent_bit" {
description = "Fluent bit configuration"
type = object({
image_name = optional(string, "fluent/fluent-bit")
image_tag = optional(string)
pull_secrets = optional(string, "")
is_daemonset = optional(bool, true)
http_port = optional(number, 2020)
read_from_head = optional(bool, true)
node_selector = optional(any, {})
parser = optional(string, "cri")
fluent_bit_state_hostpath = optional(string, "/var/log/fluent-bit/state")
var_lib_docker_containers_hostpath = optional(string, "/var/log/lib/docker/containers")
run_log_journal_hostpath = optional(string, "/var/log/run/log/journal")
image_name = optional(string, "fluent/fluent-bit")
image_tag = optional(string)
pull_secrets = optional(string, "")
is_daemonset = optional(bool, true)
http_port = optional(number, 2020)
read_from_head = optional(bool, true)
node_selector = optional(any, {})
parser = optional(string, "cri")
fluentbitstate_hostpath = optional(string, "/var/log/fluent-bit/state")
varlibdockercontainers_hostpath = optional(string, "/var/log/lib/docker/containers")
runlogjournal_hostpath = optional(string, "/var/log/run/log/journal")
})
default = {}
}
Expand Down
26 changes: 13 additions & 13 deletions infrastructure/quick-deploy/gcp/multi-stages/monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -227,19 +227,19 @@ module "fluent_bit" {
namespace = var.namespace
node_selector = var.fluent_bit.node_selector
fluent_bit = {
container_name = "fluent-bit"
image = var.gar.repositories[local.fluent_bit_image_key]
tag = var.fluent_bit.image_tag
parser = var.fluent_bit.parser
image_pull_secrets = var.fluent_bit.pull_secrets
is_daemonset = var.fluent_bit.is_daemonset
http_server = (var.fluent_bit.http_port == 0 ? "Off" : "On")
http_port = (var.fluent_bit.http_port == 0 ? "" : tostring(var.fluent_bit.http_port))
read_from_head = (var.fluent_bit.read_from_head ? "On" : "Off")
read_from_tail = (var.fluent_bit.read_from_head ? "Off" : "On")
fluent_bit_state_hostpath = var.fluent_bit.fluent_bit_state_hostpath
var_lib_docker_containers_hostpath = var.fluent_bit.var_lib_docker_containers_hostpath
run_log_journal_hostpath = var.fluent_bit.run_log_journal_hostpath
container_name = "fluent-bit"
image = var.gar.repositories[local.fluent_bit_image_key]
tag = var.fluent_bit.image_tag
parser = var.fluent_bit.parser
image_pull_secrets = var.fluent_bit.pull_secrets
is_daemonset = var.fluent_bit.is_daemonset
http_server = (var.fluent_bit.http_port == 0 ? "Off" : "On")
http_port = (var.fluent_bit.http_port == 0 ? "" : tostring(var.fluent_bit.http_port))
read_from_head = (var.fluent_bit.read_from_head ? "On" : "Off")
read_from_tail = (var.fluent_bit.read_from_head ? "Off" : "On")
fluentbitstate_hostpath = var.fluent_bit.fluentbitstate_hostpath
varlibdockercontainers_hostpath = var.fluent_bit.varlibdockercontainers_hostpath
runlogjournal_hostpath = var.fluent_bit.runlogjournal_hostpath
}
seq = length(module.seq) != 0 ? {
host = module.seq[0].host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ variable "grafana" {
variable "fluent_bit" {
description = "Fluent bit configuration"
type = object({
image_name = optional(string, "fluent/fluent-bit")
image_tag = optional(string, "2.1.7")
pull_secrets = optional(string, "")
is_daemonset = optional(bool, true)
http_port = optional(number, 2020)
read_from_head = optional(bool, true)
node_selector = optional(any, {})
parser = optional(string, "cri")
fluent_bit_state_hostpath = optional(string, "/var/log/fluent-bit/state")
var_lib_docker_containers_hostpath = optional(string, "/var/log/lib/docker/containers")
run_log_journal_hostpath = optional(string, "/var/log/run/log/journal")
image_name = optional(string, "fluent/fluent-bit")
image_tag = optional(string, "2.1.7")
pull_secrets = optional(string, "")
is_daemonset = optional(bool, true)
http_port = optional(number, 2020)
read_from_head = optional(bool, true)
node_selector = optional(any, {})
parser = optional(string, "cri")
fluentbitstate_hostpath = optional(string, "/var/log/fluent-bit/state")
varlibdockercontainers_hostpath = optional(string, "/var/log/lib/docker/containers")
runlogjournal_hostpath = optional(string, "/var/log/run/log/journal")
})
default = {}
}

0 comments on commit 061976d

Please sign in to comment.