Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Falco #98

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 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
9 changes: 9 additions & 0 deletions eks-service-definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ provision:
required: false
type: boolean
details: "Specify whether the managed node group should span only a single availability zone"
- field_name: slack_webhookurl
type: string
required: false
details: "Slack webhookurl to get Falco alerts"

computed_inputs:
- name: instance_name
Expand Down Expand Up @@ -97,6 +101,10 @@ provision:
type: boolean
default: false
overwrite: true
- name: slack_webhookurl
type: string
default: ""
overwrite: true

outputs:
- field_name: domain_name
Expand Down Expand Up @@ -151,6 +159,7 @@ provision:
k8s-admin-account: terraform/modules/provision-k8s/k8s-admin-account.tf
k8s-autoscaler: terraform/modules/provision-k8s/k8s-autoscaler.tf
k8s-external-dns: terraform/modules/provision-k8s/k8s-external-dns.tf
k8s-falco: terraform/modules/provision-k8s/k8s-falco.tf
k8s-logging: terraform/modules/provision-k8s/k8s-logging.tf
k8s-network-policy: terraform/modules/provision-k8s/k8s-network-policy.tf
k8s-outputs: terraform/modules/provision-k8s/k8s-outputs.tf
Expand Down
4 changes: 4 additions & 0 deletions terraform/modules/provision-aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ variable "single_az" {
type = bool
default = false
}

variable "slack_webhookurl" {
type = string
}
30 changes: 30 additions & 0 deletions terraform/modules/provision-k8s/k8s-falco.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Creating namespace for falco.
# So that the default-deny-egress network policy does not affect falco pods.
resource "kubernetes_namespace" "falco" {
metadata {
name = "falco"
}
}
Comment on lines +3 to +7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest you annotate the namespace to help identify it better in terms of connecting to other resources, k8s relies a lot on annotations to know how to operate in different settings and environments. If we wanted to create a specific network policy for falco, the annotation would probably come in handy,
Example: https://github.com/GSA/datagov-brokerpak-eks/blob/main/terraform/modules/provision-k8s/k8s-network-policy.tf#L2-L9


resource "helm_release" "falco" {
name = "falco"
chart = "falco"
repository = "https://falcosecurity.github.io/charts"
version = "1.18.3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the latest version? Anything we should know about this version and compatibility with k8s version or other systems-specific versioning?


namespace = kubernetes_namespace.falco.metadata[0].name
cleanup_on_fail = "true"
timeout = 600

dynamic "set" {
for_each = {
"falcosidekick.enabled" = true,
"falcosidekick.config.slack.webhookurl" = var.slack_webhookurl,
"falcosidekick.config.slack.minimumpriority" = "warning",
}
content {
name = set.key
value = set.value
}
}
}