Skip to content

Commit 63d0a80

Browse files
Added resource limits to all init containers and sidecar containers. (#289)
# Description Renamed .resources in values.yaml to .node.resources to better reflect the fact that this applies to the daemonset pods. Needed for stackabletech/issues#368 Co-authored-by: Sebastian Bernauer <[email protected]>
1 parent f67d932 commit 63d0a80

File tree

3 files changed

+34
-13
lines changed

3 files changed

+34
-13
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ All notable changes to this project will be documented in this file.
1313

1414
- `operator-rs` `0.27.1` -> `0.41.0` ([#275]).
1515
- Removed dummy key from generated Kerberos keytab ([#285]).
16+
- [BREAKING] Daemonset for SecretOperator now assign resource requests and limits to all containers and init containers. Users who have configured resource limits previously in the 'values.yaml' file will need to move the configured limits from `.resources` to `.node.driver.resources` for them to be honored going forward ([#289]).
1617

1718
[#275]: https://github.com/stackabletech/secret-operator/pull/275
1819
[#285]: https://github.com/stackabletech/secret-operator/pull/285
1920
[#286]: https://github.com/stackabletech/secret-operator/pull/286
21+
[#289]: https://github.com/stackabletech/secret-operator/pull/289
2022

2123
## [23.4.0] - 2023-04-17
2224

deploy/helm/secret-operator/templates/daemonset.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
3333
imagePullPolicy: {{ .Values.image.pullPolicy }}
3434
resources:
35-
{{- toYaml .Values.resources | nindent 12 }}
35+
{{ .Values.node.driver.resources | toYaml | nindent 12 }}
3636
env:
3737
- name: CSI_ENDPOINT
3838
value: /csi/csi.sock
@@ -56,6 +56,8 @@ spec:
5656
- name: external-provisioner
5757
image: "{{ .Values.csiProvisioner.image.repository }}:{{ .Values.csiProvisioner.image.tag }}"
5858
imagePullPolicy: {{ .Values.csiProvisioner.image.pullPolicy }}
59+
resources:
60+
{{ .Values.csiProvisioner.resources | toYaml | nindent 12 }}
5961
args:
6062
- --csi-address=/csi/csi.sock
6163
- --feature-gates=Topology=true
@@ -66,6 +68,8 @@ spec:
6668
- name: node-driver-registrar
6769
image: "{{ .Values.csiNodeDriverRegistrar.image.repository }}:{{ .Values.csiNodeDriverRegistrar.image.tag }}"
6870
imagePullPolicy: {{ .Values.csiNodeDriverRegistrar.image.pullPolicy }}
71+
resources:
72+
{{ .Values.csiNodeDriverRegistrar.resources | toYaml | nindent 12 }}
6973
args:
7074
- --csi-address=/csi/csi.sock
7175
- --kubelet-registration-path={{ .Values.kubeletDir }}/plugins/secrets.stackable.tech/csi.sock
@@ -83,6 +87,8 @@ spec:
8387
- name: migrate-longer-csi-registration-path
8488
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
8589
imagePullPolicy: {{ .Values.image.pullPolicy }}
90+
resources:
91+
{{ .Values.node.driver.resources | toYaml | nindent 12 }}
8692
command:
8793
- /bin/bash
8894
- -euo

deploy/helm/secret-operator/values.yaml

+25-12
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,36 @@ csiProvisioner:
88
repository: docker.stackable.tech/k8s/sig-storage/csi-provisioner
99
tag: v3.1.0
1010
pullPolicy: IfNotPresent
11+
resources:
12+
requests:
13+
cpu: 100m
14+
memory: 128Mi
15+
limits:
16+
cpu: 100m
17+
memory: 128Mi
1118
csiNodeDriverRegistrar:
1219
image:
1320
repository: docker.stackable.tech/k8s/sig-storage/csi-node-driver-registrar
1421
tag: v2.5.0
1522
pullPolicy: IfNotPresent
23+
resources:
24+
requests:
25+
cpu: 100m
26+
memory: 128Mi
27+
limits:
28+
cpu: 100m
29+
memory: 128Mi
30+
31+
node:
32+
driver:
33+
# Resources of the secret-operator container itself
34+
resources:
35+
limits:
36+
cpu: 100m
37+
memory: 128Mi
38+
requests:
39+
cpu: 100m
40+
memory: 128Mi
1641

1742
imagePullSecrets: []
1843
nameOverride: ""
@@ -46,18 +71,6 @@ securityContext:
4671
# runAsNonRoot: true
4772
# runAsUser: 1000
4873

49-
resources: {}
50-
# We usually recommend not to specify default resources and to leave this as a conscious
51-
# choice for the user. This also increases chances charts run on environments with little
52-
# resources, such as Minikube. If you do want to specify resources, uncomment the following
53-
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
54-
# limits:
55-
# cpu: 100m
56-
# memory: 128Mi
57-
# requests:
58-
# cpu: 100m
59-
# memory: 128Mi
60-
6174
nodeSelector: {}
6275

6376
tolerations: []

0 commit comments

Comments
 (0)