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 daemonset affinity and tolerations to Helm chart #2476

Merged
merged 2 commits into from
Oct 12, 2024
Merged
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
2 changes: 2 additions & 0 deletions deploy/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ please refer to [Installation Guide](https://github.com/kubernetes-sigs/security
|-----|------|---------|-------------|
| affinity | object | `{}` | `pod affinity rules` |
| autoscaling.enabled | bool | `false` | `enable autosclaing or not` |
| daemon.affinity | object | `{}` | `daemonset affinity rules` |
| daemon.tolerations | list | `[]` | `a list of daemonset tolerations rules` |
| enableAppArmor | bool | `false` | `enable apparmor or not` |
| enableBpfRecorder | bool | `false` | `enable BpfRecorder or not` |
| enableLogEnricher | bool | `false` | `enable log enricher or not` |
Expand Down
8 changes: 8 additions & 0 deletions deploy/helm/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ metadata:
name: spod
namespace: {{ .Release.Namespace }}
spec:
{{- with .Values.daemon.affinity }}
affinity:
{{- toYaml . | nindent 4 }}
{{- end }}
enableSelinux: {{ .Values.enableSelinux }}
enableLogEnricher: {{ .Values.enableLogEnricher }}
enableAppArmor: {{ .Values.enableAppArmor }}
enableBpfRecorder: {{ .Values.enableBpfRecorder }}
enableProfiling: {{ .Values.enableProfiling }}
{{- with .Values.daemon.tolerations }}
tolerations:
{{- toYaml . | nindent 4 }}
{{- end }}
verbosity: {{ .Values.verbosity }}
13 changes: 13 additions & 0 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ resources:
cpu: 250m
memory: 50Mi

daemon:
affinity: {}
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/control-plane
operator: Exists
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists

autoscaling:
enabled: false
minReplicas: 1
Expand Down
2 changes: 2 additions & 0 deletions installation-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ kubectl -n security-profiles-operator patch spod spod --type merge -p
'{"spec":{"affinity": {...}}}'
```

These settings are also available in the Helm chart.

## Enable memory optimization in spod

The controller running inside of spod daemon process is watching all pods available in the cluster when profile recording
Expand Down
Loading