Skip to content

Commit

Permalink
fix: Fluent-bit state path (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemaitre-aneo authored Aug 26, 2024
2 parents 4d2b7ad + f631355 commit f5b8bd3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion monitoring/onpremise/fluent-bit/locals.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
locals {
# Fluent-bit
# tflint-ignore: terraform_unused_declarations
fluent_bit_state_hostpath = try(var.fluent_bit.fluent_bit_state_hostpath, "/var/fluent-bit/state")
fluent_bit_container_name = try(var.fluent_bit.container_name, "fluent-bit")
fluent_bit_image = try(var.fluent_bit.image, "fluent/fluent-bit")
fluent_bit_tag = try(var.fluent_bit.tag, "1.3.11")
Expand All @@ -10,7 +12,6 @@ locals {
fluent_bit_read_from_head = try(var.fluent_bit.read_from_head, "On")
fluent_bit_read_from_tail = try(var.fluent_bit.read_from_tail, "Off")
fluent_bit_image_pull_secrets = try(var.fluent_bit.image_pull_secrets, "")
fluent_bit_state_hostpath = try(var.fluent_bit.fluent_bit_state_hostpath, "/var/fluent-bit/state")
fluent_bit_var_lib_docker_containers_hostpath = try(var.fluent_bit.var_lib_docker_containers_hostpath, "/var/lib/docker/containers")
fluent_bit_run_log_journal_hostpath = try(var.fluent_bit.run_log_journal_hostpath, "/run/log/journal")
fluent_bit_node_selector_keys = keys(var.node_selector)
Expand Down
22 changes: 11 additions & 11 deletions monitoring/onpremise/fluent-bit/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ resource "kubernetes_daemonset" "fluent_bit" {
name = kubernetes_config_map.fluent_bit_envvars_config.metadata[0].name
}
}
# FIXME: use PVC instead
# volume_mount {
# name = "fluentbitstate"
# mount_path = "/var/fluent-bit/state"
# }
# Please don't change below read-only permissions
volume_mount {
name = "fluentbitstate"
mount_path = "/var/fluent-bit/state"
read_only = true
}
volume_mount {
name = "varlog"
mount_path = "/var/log"
Expand All @@ -94,12 +94,12 @@ resource "kubernetes_daemonset" "fluent_bit" {
read_only = true
}
}
volume {
name = "fluentbitstate"
host_path {
path = local.fluent_bit_state_hostpath
}
}
# volume {
# name = "fluentbitstate"
# host_path {
# path = local.fluent_bit_state_hostpath
# }
# }
volume {
name = "varlog"
host_path {
Expand Down

0 comments on commit f5b8bd3

Please sign in to comment.