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

Add privileged mode for SST #105

Closed
Closed
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ spec:
image: {{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{ if .Values.privilegedMode }}
privileged: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd also suggest to restrict the capabilities: to the minimum that is actually required.

I'm not sure what would be the nicest way to tie all the pieces (privileged mode, capabilities, /dev mount) together. Would there be three separate parameters or a signle devAccess or smth 🤨 Thoughts?

{{ else }}
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
{{ end }}
resources:
requests:
cpu: {{ .Values.resources.cpu }}
Expand All @@ -66,6 +70,10 @@ spec:
mountPath: /var/lib/nri-resource-policy
- name: hostsysfs
mountPath: /host/sys
{{ if .Values.privilegedMode }}
- name: hostdev
mountPath: /host/dev
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think mounting /dev should be a separate setting.

{{ end }}
- name: resource-policysockets
mountPath: /var/run/nri-resource-policy
- name: resource-policyconfig
Expand All @@ -81,6 +89,12 @@ spec:
hostPath:
path: /sys
type: Directory
{{ if .Values.privilegedMode }}
- name: hostdev
hostPath:
path: /dev
type: Directory
{{ end }}
- name: resource-policysockets
hostPath:
path: /var/run/nri-resource-policy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ resources:
cpu: 500m
memory: 512Mi


privilegedMode: true

nri:
patchContainerdConfig: false

initContainerImage:
name: ghcr.io/containers/nri-plugins/nri-resource-policy-config-manager
tag: unstable
pullPolicy: Always