Skip to content

Commit 61eb3fb

Browse files
authored
feat: Add resizePolicy to chart (#60)
* feat: Add `resizePolicy` to chart for in-place pod vertical scaling Signed-off-by: younsl <cysl@kakao.com> * docs: Add resizePolicy to README configuration table Signed-off-by: younsl <cysl@kakao.com> * fix: align README parameter order with helm-docs generated output The `resizePolicy` parameter was listed after `resources` in the README configuration table for both `dcgmAgent` and `nodeAgent` sections. However, helm-docs generates the table in alphabetical order, placing `resizePolicy` before `resources`. This mismatch caused the `make generate` CI check to fail because the generated output did not match the committed README. Reorder the parameter rows to match helm-docs alphabetical sorting: - dcgmAgent.resizePolicy before dcgmAgent.resources - nodeAgent.resizePolicy before nodeAgent.resources Signed-off-by: younsl <cysl@kakao.com> --------- Signed-off-by: younsl <cysl@kakao.com>
1 parent 14d813e commit 61eb3fb

5 files changed

Lines changed: 41 additions & 0 deletions

File tree

charts/configuration.schema.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
"resources": {
4646
"$ref": "#/definitions/Resources"
4747
},
48+
"resizePolicy": {
49+
"$ref": "#/definitions/ResizePolicy"
50+
},
4851
"tolerations": {
4952
"$ref": "#/definitions/Tolerations"
5053
},
@@ -93,6 +96,9 @@
9396
"resources": {
9497
"$ref": "#/definitions/Resources"
9598
},
99+
"resizePolicy": {
100+
"$ref": "#/definitions/ResizePolicy"
101+
},
96102
"tolerations": {
97103
"$ref": "#/definitions/Tolerations"
98104
}
@@ -141,6 +147,27 @@
141147
}
142148
}
143149
},
150+
"ResizePolicy": {
151+
"title": "ResizePolicy",
152+
"type": "array",
153+
"description": "Container resize policy for in-place pod vertical scaling (requires Kubernetes 1.33+)",
154+
"default": [],
155+
"items": {
156+
"type": "object",
157+
"additionalProperties": false,
158+
"properties": {
159+
"resourceName": {
160+
"type": "string",
161+
"enum": ["cpu", "memory"]
162+
},
163+
"restartPolicy": {
164+
"type": "string",
165+
"enum": ["NotRequired", "RestartContainer"]
166+
}
167+
},
168+
"required": ["resourceName", "restartPolicy"]
169+
}
170+
},
144171
"Tolerations": {
145172
"title": "Tolerations",
146173
"type": "array",

charts/eks-node-monitoring-agent/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The following table lists the configurable parameters for this chart and their d
4646
| dcgmAgent.image.tag | string | `"4.5.2-4.8.1-ubuntu22.04"` | Image tag for the dcgm-exporter |
4747
| dcgmAgent.podAnnotations | object | `{}` | Pod annotations applied to the dcgm exporter |
4848
| dcgmAgent.podLabels | object | `{}` | Pod labels applied to the dcgm exporter |
49+
| dcgmAgent.resizePolicy | list | `[]` | Container resize policy for in-place pod vertical scaling (requires Kubernetes 1.33+) |
4950
| dcgmAgent.resources | object | `{}` | Container resources for the dcgm deployment |
5051
| dcgmAgent.tolerations | list | `[]` | Deployment tolerations for the dcgm |
5152
| fullnameOverride | string | `"eks-node-monitoring-agent"` | A fullname override for the chart |
@@ -66,6 +67,7 @@ The following table lists the configurable parameters for this chart and their d
6667
| nodeAgent.monitors | object | `{}` | Per-monitor configuration keyed by plugin name. See the main README for details. |
6768
| nodeAgent.podAnnotations | object | `{}` | Pod annotations applied to the eks-node-monitoring-agent |
6869
| nodeAgent.podLabels | object | `{}` | Pod labels applied to the eks-node-monitoring-agent |
70+
| nodeAgent.resizePolicy | list | `[]` | Container resize policy for in-place pod vertical scaling (requires Kubernetes 1.33+) |
6971
| nodeAgent.resources | object | `{"limits":{"cpu":"250m","memory":"200Mi"},"requests":{"cpu":"10m","memory":"30Mi"}}` | Container resources for the eks-node-monitoring-agent |
7072
| nodeAgent.securityContext | object | `{"capabilities":{"add":["NET_ADMIN"]},"privileged":true}` | Container Security context for the eks-node-monitoring-agent |
7173
| nodeAgent.tolerations | list | `[{"operator":"Exists"}]` | Deployment tolerations for the eks-node-monitoring-agent |

charts/eks-node-monitoring-agent/templates/daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ spec:
6565
httpGet:
6666
path: /healthz
6767
port: 8002
68+
{{- with .Values.nodeAgent.resizePolicy }}
69+
resizePolicy:
70+
{{- toYaml . | nindent 12 }}
71+
{{- end }}
6872
{{- with .Values.nodeAgent.resources }}
6973
resources:
7074
{{- toYaml . | nindent 12 }}

charts/eks-node-monitoring-agent/templates/dcgm-daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ spec:
4646
imagePullPolicy: {{ .Values.dcgmAgent.image.pullPolicy }}
4747
command: ["/bin/sh"]
4848
args: ["-c", "nv-hostengine -n -b ALL || true; sleep infinity"]
49+
{{- with .Values.dcgmAgent.resizePolicy }}
50+
resizePolicy:
51+
{{- toYaml . | nindent 12 }}
52+
{{- end }}
4953
{{- with .Values.dcgmAgent.resources }}
5054
resources:
5155
{{- toYaml . | nindent 12 }}

charts/eks-node-monitoring-agent/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ nodeAgent:
7676
limits:
7777
cpu: 250m
7878
memory: 200Mi
79+
# -- Container resize policy for in-place pod vertical scaling (requires Kubernetes 1.33+)
80+
resizePolicy: []
7981
# -- Container Security context for the eks-node-monitoring-agent
8082
securityContext:
8183
privileged: true
@@ -138,6 +140,8 @@ dcgmAgent:
138140
- amd64
139141
# -- Container resources for the dcgm deployment
140142
resources: {}
143+
# -- Container resize policy for in-place pod vertical scaling (requires Kubernetes 1.33+)
144+
resizePolicy: []
141145
# -- Deployment tolerations for the dcgm
142146
tolerations: []
143147
# -- Pod labels applied to the dcgm exporter

0 commit comments

Comments
 (0)