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

fix: add resource limits #796

Merged
merged 4 commits into from
May 17, 2022
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
5 changes: 5 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"ignorePaths": ["/CHANGELOG.md", "*.json"],
"ignoreRegExpList": ["/'s\\b/"],
"ignoreWords": [
"adrs",
"adrlog",
"adrlogstop",
"anyuid",
"appgw",
"auths",
Expand All @@ -31,11 +34,13 @@
"kubeapps",
"kubes",
"kubeval",
"madr",
"millis",
"mkilled",
"nindent",
"nothrow",
"nslookup",
"nygard",
"rAGRS",
"jwks",
"pids",
Expand Down
8 changes: 8 additions & 0 deletions charts/host-mods/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ spec:
value: "{{ .Values.certDir }}"
- name: UPDATE_CMD
value: "{{ .Values.updateCmd }}"
resources:
limits:
cpu: 100m
memory: 256Mi
securityContext:
runAsUser: 0
privileged: true
Expand All @@ -54,3 +58,7 @@ spec:
image: k8s.gcr.io/pause:3.1
securityContext:
runAsUser: 1000
resources:
limits:
cpu: 50m
memory: 64Mi
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ spec:
- configMapRef:
name: kubernetes-services-endpoint
optional: true
resources:
limits:
cpu: 250m
memory: 512Mi
volumes:
- name: var-lib-calico
hostPath:
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/env/policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ policies:
- latest
container-limits:
cpu: '2'
enabled: false
enabled: true
memory: 2Gi
psp-allowed-repos:
enabled: false
Expand Down
8 changes: 8 additions & 0 deletions values/gatekeeper/gatekeeper.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@ controllerManager:
{{- end }}

otomiVersions: {{- toYaml .Values.versions | nindent 2 }}
crds:
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 50m
memory: 64Mi