Skip to content

Commit

Permalink
feat(shield): allow to override capabilities [SMAGENT-8408]
Browse files Browse the repository at this point in the history
  • Loading branch information
iurly committed Dec 13, 2024
1 parent 347d54b commit b02e041
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions charts/shield/templates/host/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ spec:
runAsUser: 0
readOnlyRootFilesystem: false
allowPrivilegeEscalation: true
{{- if .Values.host.extra_capabilities }}
capabilities:
drop:
- ALL
add:
{{- toYaml .Values.host.extra_capabilities | nindent 16 }}
{{- end }}
{{- else }}
allowPrivilegeEscalation: false
seccompProfile:
Expand All @@ -119,7 +126,11 @@ spec:
drop:
- ALL
add:
{{- if .Values.host.extra_capabilities }}
{{- toYaml .Values.host.extra_capabilities | nindent 16 }}
{{- else }}
{{- include "host.capabilities" . | nindent 16 }}
{{- end -}}
{{- end }}
env:
- name: K8S_NODE
Expand Down
2 changes: 2 additions & 0 deletions charts/shield/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ host:
driver: kmod
# Additional settings to be passed to the host shield (overrides the helm generated settings)
additional_settings: {}
# Additional capabilities to be used by the host shield container
extra_capabilities: []
image:
# The registry where the host shield images are stored
registry: quay.io
Expand Down

0 comments on commit b02e041

Please sign in to comment.