Skip to content

Commit

Permalink
Add SCC to support Openshift
Browse files Browse the repository at this point in the history
Similar to #51, add SCC support for Openshift, required to mounth the grpc socket as hostPath

Signed-off-by: Alvaro Iradier <airadier@gmail.com>
  • Loading branch information
airadier authored and poiana committed Oct 5, 2020
1 parent 0e32bbe commit 27bcb77
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 2 deletions.
6 changes: 6 additions & 0 deletions falco-exporter/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-exporter` Helm Chart. The release
numbering uses [semantic versioning](http://semver.org).

## v0.3.6

### Minor Changes

* Add SecurityContextConstraint to allow deploying in Openshift

## v0.3.5

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion falco-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.3.5
version: 0.3.6

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
2 changes: 2 additions & 0 deletions falco-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ The following table lists the main configurable parameters of the chart and thei
| `serviceMonitor.scrapeTimeout` | Specify a user defined scrape timeout for the Service Monitor | `""` |
| `grafanaDashboard.enabled` | Enable the falco security dashboard, see https://github.com/falcosecurity/falco-exporter#grafana | `false` |
| `grafanaDashboard.namespace` | The namespace to deploy the dashboard configmap in | `default` |
| `scc.create` | Create OpenShift's Security Context Constraint | `true` |


Please, refer to [values.yaml](./values.yaml) for the full list of configurable parameters.

Expand Down
40 changes: 40 additions & 0 deletions falco-exporter/templates/securitycontextconstraints.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{{- if and .Values.scc.create (.Capabilities.APIVersions.Has "security.openshift.io/v1") }}
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
annotations:
kubernetes.io/description: |
This provides the minimum requirements Falco-exporter to run in Openshift.
name: {{ template "falco-exporter.fullname" . }}
labels:
{{- include "falco-exporter.labels" . | nindent 4 }}
allowHostDirVolumePlugin: true
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowPrivilegeEscalation: false
allowPrivilegedContainer: false
allowedCapabilities: []
allowedUnsafeSysctls: []
defaultAddCapabilities: []
fsGroup:
type: RunAsAny
groups: []
priority: 0
readOnlyRootFilesystem: false
requiredDropCapabilities: []
runAsUser:
type: RunAsAny
seLinuxContext:
type: RunAsAny
seccompProfiles:
- '*'
supplementalGroups:
type: RunAsAny
users:
- system:serviceaccount:{{ .Release.Namespace }}:{{ include "falco-exporter.serviceAccountName" . }}
volumes:
- hostPath
- secret
{{- end }}
6 changes: 5 additions & 1 deletion falco-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,8 @@ serviceMonitor:

grafanaDashboard:
enabled: false
namespace: default
namespace: default

scc:
# true here enabled creation of Security Context Constraints in Openshift
create: true

0 comments on commit 27bcb77

Please sign in to comment.