Skip to content

Commit

Permalink
feat: add support for falco custom rules (#1658)
Browse files Browse the repository at this point in the history
  • Loading branch information
rifisdfds authored Dec 11, 2024
1 parent 5b03454 commit 2026e9c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _sub/security/falco/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ resource "github_repository_file" "helm_patch" {
stream_enabled = var.stream_enabled
stream_webhook_url = var.stream_webhook_url
stream_channel_name = var.stream_channel_name

custom_rules = var.custom_rules
})
overwrite_on_create = var.overwrite_on_create
}
3 changes: 3 additions & 0 deletions _sub/security/falco/values/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ spec:
enabled: true
webserver:
prometheus_metrics_enabled: true
customRules:
falco_custom_rules.yaml: |-
${custom_rules}
falcosidekick:
enabled: true
webui:
Expand Down
6 changes: 6 additions & 0 deletions _sub/security/falco/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,10 @@ variable "stream_channel_name" {
type = string
default = ""
description = "Channel name for falco stream. Example: #falco-stream"
}

variable "custom_rules" {
type = string
default = ""
description = "Custom rules to be added to the falco config"
}
1 change: 1 addition & 0 deletions compute/k8s-services/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,7 @@ module "falco" {
stream_enabled = var.falco_stream_enabled
stream_webhook_url = var.falco_stream_webhook_url
stream_channel_name = var.falco_stream_channel_name
custom_rules = var.falco_custom_rules

providers = {
github = github.fluxcd
Expand Down
6 changes: 6 additions & 0 deletions compute/k8s-services/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1478,3 +1478,9 @@ variable "falco_stream_channel_name" {
default = ""
description = "Channel name for falco stream. Example: #falco-stream"
}

variable "falco_custom_rules" {
type = string
default = ""
description = "Custom rules to be added to the falco config"
}

0 comments on commit 2026e9c

Please sign in to comment.