-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #222 from draios/add-k8s-example
Add falco,event generator files for k8s.
- Loading branch information
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
=Example K8s Services for Falco= | ||
|
||
The yaml file in this directory installs the following: | ||
- Open Source Falco, as a DaemonSet. Falco is configured to communicate with the K8s API server via its service account, and changes its output to be K8s-friendly. It also sends to a slack webhook for the `#demo-falco-alerts` channel on our [public slack](https://sysdig.slack.com/messages/demo-falco-alerts/). | ||
- The [Falco Event Generator](https://github.com/draios/falco/wiki/Generating-Sample-Events), as a deployment that ensures it runs on exactly 1 node. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: DaemonSet | ||
metadata: | ||
name: falco | ||
labels: | ||
name: falco-daemonset | ||
app: demo | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
name: falco | ||
app: demo | ||
role: security | ||
spec: | ||
containers: | ||
- name: falco | ||
image: sysdig/falco:latest | ||
securityContext: | ||
privileged: true | ||
command: [ "/usr/bin/falco", "-K", "/var/run/secrets/kubernetes.io/serviceaccount/token", "-k", "https://kubernetes", "-pk", "-o", "json_output=true", "-o", "program_output.enabled=true", "-o", "program_output.program=jq '{text: .output}' | curl -d @- -X POST https://hooks.slack.com/services/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"] | ||
volumeMounts: | ||
- mountPath: /host/var/run/docker.sock | ||
name: docker-socket | ||
readOnly: true | ||
- mountPath: /host/dev | ||
name: dev-fs | ||
readOnly: true | ||
- mountPath: /host/proc | ||
name: proc-fs | ||
readOnly: true | ||
- mountPath: /host/boot | ||
name: boot-fs | ||
readOnly: true | ||
- mountPath: /host/lib/modules | ||
name: lib-modules | ||
readOnly: true | ||
- mountPath: /host/usr | ||
name: usr-fs | ||
readOnly: true | ||
volumes: | ||
- name: docker-socket | ||
hostPath: | ||
path: /var/run/docker.sock | ||
- name: dev-fs | ||
hostPath: | ||
path: /dev | ||
- name: proc-fs | ||
hostPath: | ||
path: /proc | ||
- name: boot-fs | ||
hostPath: | ||
path: /boot | ||
- name: lib-modules | ||
hostPath: | ||
path: /lib/modules | ||
- name: usr-fs | ||
hostPath: | ||
path: /usr |
17 changes: 17 additions & 0 deletions
17
examples/k8s-using-daemonset/falco-event-generator-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: falco-event-generator-deployment | ||
labels: | ||
name: falco-event-generator-deployment | ||
app: demo | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: falco-event-generator | ||
spec: | ||
containers: | ||
- name: falco-event-generator | ||
image: sysdig/falco-event-generator:latest |