Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion modules/essentials/fluent_bit.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ locals {
service_account_name = local.service_account_name,
image_repository = var.fluent_bit_image_repository,
image_tag = var.fluent_bit_image_tag,
liveness_probe = jsonencode(var.fluent_bit_liveness_probe),
readiness_probe = jsonencode(var.fluent_bit_readiness_probe),
resources = jsonencode(var.fluent_bit_resources),
})

fluent_bit_helm_config = merge(
local.default_helm_config,
var.fluent_bit_helm_config
)

}

#tfsec:ignore:aws-cloudwatch-log-group-customer-key Not using CMK to save cost
Expand Down
23 changes: 5 additions & 18 deletions modules/essentials/templates/fluent_bit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,11 @@ service:
# prometheus.io/port: "2020"
# prometheus.io/scrape: "true"

livenessProbe:
httpGet:
path: /
port: http

readinessProbe:
httpGet:
path: /api/v1/health
port: http

resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
livenessProbe: ${liveness_probe}

readinessProbe: ${readiness_probe}

resources: ${resources}

flush: 1

Expand All @@ -71,7 +59,6 @@ config:
Time_Key time
Time_Format %d/%b/%Y:%H:%M:%S %z


## https://docs.fluentbit.io/manual/pipeline/inputs
inputs: |
[INPUT]
Expand Down
37 changes: 37 additions & 0 deletions modules/essentials/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1505,6 +1505,43 @@ variable "fluent_bit_overwrite_helm_values" {
default = ""
}

variable "fluent_bit_liveness_probe" {
description = "Liveness probe for fluent-bit"
type = map(any)
default = {
httpGet = {
path = "/"
port = "2020"
}
}
}

variable "fluent_bit_readiness_probe" {
description = "Readiness probe for fluent-bit"
type = map(any)
default = {
httpGet = {
path = "/api/v1/health"
port = "2020"
}
}
}

variable "fluent_bit_resources" {
description = "Resources for fluent-bit"
type = map(any)
default = {
requests = {
cpu = "100m"
memory = "128Mi"
}
limits = {
cpu = "100m"
memory = "128Mi"
}
}
}

variable "ip_dual_stack_enabled" {
description = "Enable essentials to support EKS dual stack cluster"
type = bool
Expand Down
Loading