Skip to content

Commit

Permalink
Add PSP support to fake event generator
Browse files Browse the repository at this point in the history
Fixes falcosecurity#128

Signed-off-by: Christian Zunker <christian.zunker@codecentric.cloud>
  • Loading branch information
Christian Zunker authored and poiana committed Oct 21, 2020
1 parent 7148838 commit 971f5e1
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 1 deletion.
6 changes: 6 additions & 0 deletions falco/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
This file documents all notable changes to Falco Helm Chart. The release
numbering uses [semantic versioning](http://semver.org).

## v1.5.2

### Minor Changes

* Add Pod Security Policy Support for the fake event generator

## v1.5.1

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion falco/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: falco
version: 1.5.1
version: 1.5.2
appVersion: 0.26.1
description: Falco
keywords:
Expand Down
3 changes: 3 additions & 0 deletions falco/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ rules:
- podsecuritypolicies
resourceNames:
- {{ template "falco.fullname" . }}
{{- if .Values.fakeEventGenerator.enabled }}
- event-generator-{{ template "falco.fullname" . }}
{{- end }}
verbs:
- use
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions falco/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ spec:
labels:
app: {{ template "falco.fullname" . }}-event-generator
spec:
serviceAccountName: {{ template "falco.serviceAccountName" .}}
containers:
- name: {{ template "falco.fullname" . }}-event-generator
securityContext:
privileged: false
image: falcosecurity/event-generator:latest
{{- with .Values.fakeEventGenerator.args }}
args:
Expand Down
28 changes: 28 additions & 0 deletions falco/templates/podsecuritypolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.podSecurityPolicy.create}}
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand All @@ -22,3 +23,30 @@ spec:
rule: RunAsAny
volumes: ['*']
{{- end }}
{{- if (and .Values.podSecurityPolicy.create .Values.fakeEventGenerator.enabled) }}
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: event-generator-{{ template "falco.fullname" . }}
labels:
app: {{ template "falco.fullname" . }}-event-generator
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
privileged: false
hostNetwork: false
readOnlyRootFilesystem: true
requiredDropCapabilities:
- ALL
fsGroup:
rule: RunAsAny
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes: []
{{- end }}

0 comments on commit 971f5e1

Please sign in to comment.