Browse Source

[398399] Support resource limits

- Add resource limit support to each daemon set

Change-Id: I4680f70338627144e7b3ffa1625eba2ce3a33f25
Scott Hussey 1 year ago
parent
commit
f1fbfa1d5e

+ 1
- 0
divingbell/templates/daemonset-ethtool.yaml View File

@@ -38,6 +38,7 @@ spec:
38 38
       - name: {{ $daemonset }}
39 39
         image: {{ .Values.images.divingbell }}
40 40
         imagePullPolicy: {{ .Values.images.pull_policy }}
41
+{{ tuple $envAll $envAll.Values.pod.resources.ethtool | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
41 42
         command:
42 43
         - /tmp/{{ $daemonset }}.sh
43 44
         volumeMounts:

+ 1
- 0
divingbell/templates/daemonset-mounts.yaml View File

@@ -38,6 +38,7 @@ spec:
38 38
       - name: {{ $daemonset }}
39 39
         image: {{ .Values.images.divingbell }}
40 40
         imagePullPolicy: {{ .Values.images.pull_policy }}
41
+{{ tuple $envAll $envAll.Values.pod.resources.mounts | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
41 42
         command:
42 43
         - /tmp/{{ $daemonset }}.sh
43 44
         volumeMounts:

+ 1
- 0
divingbell/templates/daemonset-sysctl.yaml View File

@@ -38,6 +38,7 @@ spec:
38 38
       - name: {{ $daemonset }}
39 39
         image: {{ .Values.images.divingbell }}
40 40
         imagePullPolicy: {{ .Values.images.pull_policy }}
41
+{{ tuple $envAll $envAll.Values.pod.resources.sysctl | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
41 42
         command:
42 43
         - /tmp/{{ $daemonset }}.sh
43 44
         volumeMounts:

+ 1
- 0
divingbell/templates/daemonset-uamlite.yaml View File

@@ -38,6 +38,7 @@ spec:
38 38
       - name: {{ $daemonset }}
39 39
         image: {{ .Values.images.divingbell }}
40 40
         imagePullPolicy: {{ .Values.images.pull_policy }}
41
+{{ tuple $envAll $envAll.Values.pod.resources.uamlite | include "helm-toolkit.snippets.kubernetes_resources" | indent 8 }}
41 42
         command:
42 43
         - /tmp/{{ $daemonset }}.sh
43 44
         volumeMounts:

+ 30
- 0
divingbell/values.yaml View File

@@ -46,3 +46,33 @@ pod:
46 46
           enabled: true
47 47
           min_ready_seconds: 0
48 48
           max_unavailable: 100%
49
+  resources:
50
+    enabled: false
51
+    ethtool:
52
+      limits:
53
+        memory: "128Mi"
54
+        cpu: "100m"
55
+      requests:
56
+        memory: "128Mi"
57
+        cpu: "100m"
58
+    mounts:
59
+      limits:
60
+        memory: "128Mi"
61
+        cpu: "100m"
62
+      requests:
63
+        memory: "128Mi"
64
+        cpu: "100m"
65
+    uamlite:
66
+      limits:
67
+        memory: "128Mi"
68
+        cpu: "100m"
69
+      requests:
70
+        memory: "128Mi"
71
+        cpu: "100m"
72
+    sysctl:
73
+      limits:
74
+        memory: "128Mi"
75
+        cpu: "100m"
76
+      requests:
77
+        memory: "128Mi"
78
+        cpu: "100m"

Loading…
Cancel
Save