Skip to content

Commit b1c5337

Browse files
feat: [network-agent] add resource limits (#297)
## Which problem is this PR solving? - Closes honeycombio/honeycomb-network-agent#273 ## Short description of the changes - Add `resources` template to daemonset to allow end users to set resource limits - Move `extraEnvVars` to bottom of daemonset - Add `resources` to `values.yaml` ## How to verify that this has the expected result Installing the helm chart with resource limits defined should set those limits as expected
1 parent 979e495 commit b1c5337

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

charts/network-agent/templates/daemonset.yaml

+7-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ spec:
3737
value: {{ .Values.honeycomb.dataset }}
3838
- name: HONEYCOMB_STATS_DATASET
3939
value: {{ .Values.honeycomb.statsDataset }}
40-
{{- with .Values.extraEnvVars }}
41-
{{- toYaml . | nindent 12 }}
42-
{{- end }}
4340
# https://kubernetes.io/docs/concepts/workloads/pods/downward-api/
4441
- name: AGENT_NODE_IP
4542
valueFrom:
@@ -61,6 +58,13 @@ spec:
6158
valueFrom:
6259
fieldRef:
6360
fieldPath: metadata.name
61+
{{- with .Values.extraEnvVars }}
62+
{{- toYaml . | nindent 12 }}
63+
{{- end }}
64+
{{- if .Values.resources }}
65+
resources:
66+
{{- toYaml .Values.resources | nindent 12 }}
67+
{{- end }}
6468
securityContext:
6569
capabilities:
6670
add:

charts/network-agent/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ image:
1818
# Overrides the image tag whose default is the chart appVersion.
1919
tag: ""
2020

21+
resources: {}
22+
# limits:
23+
# cpu: 750m
24+
# memory: 2Gi
25+
2126
# Allows adding extra environment variables to the network agent daemonset.
2227
extraEnvVars:
2328
# - name: ENV_VAR

0 commit comments

Comments
 (0)