Skip to content

Commit 24f4c0b

Browse files
[nr-k8s-otel-collector, nri-bundle] Resource defaults (#2012)
#### Is this a new chart It is NOT a new chart. #### What this PR does / why we need it: Adds defaults for resource requirements to prevent otel from logging WARN messages when installing these charts. #### Which issue this PR fixes *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)* N/A #### Special notes for your reviewer: This PR is aimed at ensuring that customers can always set resource values. It adds a passthrough for the init container to inherit the same limits as the collector that is booted after it runs. I've also added empty resource config blocks for the kube-state-metrics sub-chart as in-line documentation to let user's know that this is one of the config options available to be passed to the kube state metrics chart. Not only is it just good practise to ensure our customers have easy access to these settings, but It's especially important for GKE Autopilot users who get warnings and default limits set on them if they are not set manually. Which is what drove this effort, so I've also added a callout in the readme for that. #####No Resource values set: <img width="1492" height="233" alt="Screenshot 2025-11-18 at 11 50 01 AM" src="https://github.com/user-attachments/assets/c61a6969-e121-46eb-a57b-bf2fd530d7f8" /> #####With Resource values set: <img width="710" height="125" alt="Screenshot 2025-11-18 at 11 48 38 AM" src="https://github.com/user-attachments/assets/12f18a9b-cb8b-4465-ad01-1210e32d4b41" /> #### Checklist [Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.] - [x] Chart Version bumped - [x] Variables are documented in the README.md - [x] Title of the PR starts with chart name (e.g. `[mychartname]`) # Release Notes to Publish (nr-k8s-otel-collector) If this PR contains changes in `nr-k8s-otel-collector`, please complete the following section. All other charts should ignore this section. <!--BEGIN-RELEASE-NOTES--> ## 🚀 What's Changed * Adding empty resource blocks for the Kube-state-metrics subchart in the Values.yaml to appease providers that do not allow empty resource blocks. * Adds the user set resource values for the daemonset init container. <!--END-RELEASE-NOTES-->
1 parent a40dd4d commit 24f4c0b

File tree

17 files changed

+53
-30
lines changed

17 files changed

+53
-30
lines changed

charts/nr-k8s-otel-collector/.helmignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Patterns to ignore when building packages.
22
# This supports shell glob matching, relative path matching, and
3-
# negation (prefixed with !). Only one pattern per line.
3+
# Don't waste time with Negation.
4+
# | "The confusion around negation in .helmignore is because it technically exists in the Helm codebase
5+
# | but is effectively non-functional for typical allowlist use cases."
6+
47
.DS_Store
58
# Common VCS dirs
69
.git/
@@ -21,3 +24,9 @@
2124
.idea/
2225
*.tmproj
2326
.vscode/
27+
28+
# Project files
29+
ci/
30+
e2e/
31+
examples/
32+
tests/

charts/nr-k8s-otel-collector/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type: application
1717
# This is the chart version. This version number should be incremented each time you make changes
1818
# to the chart and its templates, including the app version.
1919
# Versions are expected to follow Semantic Versioning (https://semver.org/)
20-
version: 0.9.4
20+
version: 0.9.5
2121

2222

2323
dependencies:

charts/nr-k8s-otel-collector/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ to export data to this connector which can then be connected to the New Relic ma
169169
| kube-state-metrics.metricAnnotationsAllowList | list | `["pods=[*]", "namespaces=[*]", "deployments=[*]"]` | List of Kubernetes annotation keys that will be used in the resources' annotations metric. By default, kube-state-metrics v2+ does not expose annotations as metric labels. This option allows you to specify which annotations should be exposed as metric dimensions. Each entry is formatted as "resource=[annotation1,annotation2,...]". Use "*" to include all annotations for a resource type. Example: ["pods=[description,owner]", "namespaces=[description]", "deployments=[change-id,jira-ticket]"] |
170170
| kube-state-metrics.metricLabelsAllowlist | list | `["pods=[*]", "namespaces=[*]", "deployments=[*]"]` | List of Kubernetes label keys that will be used in the resources' labels metric. By default, kube-state-metrics v2+ does not expose labels as metric labels. This option allows you to specify which labels should be exposed as metric dimensions. Each entry is formatted as "resource=[label1,label2,...]". Use "*" to include all labels for a resource type. Example: ["pods=[app,environment,team]", "namespaces=[environment]", "deployments=[app,version]"] |
171171
| kube-state-metrics.prometheusScrape | bool | `false` | Disable prometheus from auto-discovering KSM and potentially scraping duplicated data |
172+
| kube-state-metrics.resources | object | `{}` | Sets resources for kube-state-metrics. |
172173
| labels | object | `{}` | Additional labels for chart objects |
173174
| licenseKey | string | `""` | This set this license key to use. Can be configured also with `global.licenseKey` |
174175
| logsPipeline | object | `{"collectorEgress":{"exporters":null,"processors":null},"collectorIngress":{"exporters":null,"processors":null}}` | Edit how the NR Logs pipeline handles your Logs |

charts/nr-k8s-otel-collector/examples/k8s/rendered/clusterrole.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
app.kubernetes.io/managed-by: Helm
1010
app.kubernetes.io/name: nr-k8s-otel-collector
1111
app.kubernetes.io/version: 1.2.0
12-
helm.sh/chart: nr-k8s-otel-collector-0.9.4
12+
helm.sh/chart: nr-k8s-otel-collector-0.9.5
1313
rules:
1414
- apiGroups:
1515
- ""

charts/nr-k8s-otel-collector/examples/k8s/rendered/clusterrolebinding.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
app.kubernetes.io/managed-by: Helm
1010
app.kubernetes.io/name: nr-k8s-otel-collector
1111
app.kubernetes.io/version: 1.2.0
12-
helm.sh/chart: nr-k8s-otel-collector-0.9.4
12+
helm.sh/chart: nr-k8s-otel-collector-0.9.5
1313
subjects:
1414
- kind: ServiceAccount
1515
name: nr-k8s-otel-collector

charts/nr-k8s-otel-collector/examples/k8s/rendered/daemonset-configmap.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ metadata:
1010
app.kubernetes.io/managed-by: Helm
1111
app.kubernetes.io/name: nr-k8s-otel-collector
1212
app.kubernetes.io/version: 1.2.0
13-
helm.sh/chart: nr-k8s-otel-collector-0.9.4
13+
helm.sh/chart: nr-k8s-otel-collector-0.9.5
1414
data:
1515
daemonset-config.yaml: |
1616
receivers:
@@ -605,7 +605,7 @@ data:
605605
value: <cluser_name>
606606
- key: "newrelic.chart.version"
607607
action: upsert
608-
value: 0.9.4
608+
value: 0.9.5
609609
- key: newrelic.entity.type
610610
action: upsert
611611
value: "k8s"

charts/nr-k8s-otel-collector/examples/k8s/rendered/daemonset.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ metadata:
1010
app.kubernetes.io/managed-by: Helm
1111
app.kubernetes.io/name: nr-k8s-otel-collector
1212
app.kubernetes.io/version: 1.2.0
13-
helm.sh/chart: nr-k8s-otel-collector-0.9.4
13+
helm.sh/chart: nr-k8s-otel-collector-0.9.5
1414
spec:
1515
selector:
1616
matchLabels:
@@ -24,7 +24,7 @@ spec:
2424
app.kubernetes.io/name: nr-k8s-otel-collector
2525
component: daemonset
2626
annotations:
27-
checksum/config: a927fe84bb5aa454ae7797be3c40e6e39c4ba38b7541393a66ea1d001a443e80
27+
checksum/config: 77a7cce06c82557a2dd736d5097decdee255f98396c867accc2a38a2f3296a41
2828
spec:
2929
serviceAccountName: nr-k8s-otel-collector
3030
initContainers:
@@ -69,6 +69,8 @@ spec:
6969
fieldRef:
7070
apiVersion: v1
7171
fieldPath: spec.nodeName
72+
resources:
73+
{}
7274
volumeMounts:
7375
- name: daemonset-config
7476
mountPath: /temp-config

charts/nr-k8s-otel-collector/examples/k8s/rendered/deployment-configmap.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ metadata:
1010
app.kubernetes.io/managed-by: Helm
1111
app.kubernetes.io/name: nr-k8s-otel-collector
1212
app.kubernetes.io/version: 1.2.0
13-
helm.sh/chart: nr-k8s-otel-collector-0.9.4
13+
helm.sh/chart: nr-k8s-otel-collector-0.9.5
1414
data:
1515
deployment-config.yaml: |
1616
receivers:
@@ -516,7 +516,7 @@ data:
516516
value: <cluser_name>
517517
- key: "newrelic.chart.version"
518518
action: upsert
519-
value: 0.9.4
519+
value: 0.9.5
520520
- key: newrelic.entity.type
521521
action: upsert
522522
value: "k8s"
@@ -534,7 +534,7 @@ data:
534534
value: <cluser_name>
535535
- key: "newrelic.chart.version"
536536
action: upsert
537-
value: 0.9.4
537+
value: 0.9.5
538538
539539
transform/events:
540540
log_statements:

charts/nr-k8s-otel-collector/examples/k8s/rendered/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ metadata:
1010
app.kubernetes.io/managed-by: Helm
1111
app.kubernetes.io/name: nr-k8s-otel-collector
1212
app.kubernetes.io/version: 1.2.0
13-
helm.sh/chart: nr-k8s-otel-collector-0.9.4
13+
helm.sh/chart: nr-k8s-otel-collector-0.9.5
1414
spec:
1515
replicas: 1
1616
minReadySeconds: 5
@@ -26,7 +26,7 @@ spec:
2626
app.kubernetes.io/name: nr-k8s-otel-collector
2727
component: deployment
2828
annotations:
29-
checksum/config: 4b7405cec95883b628f90dc2a53342a95aa53a7555771c4e34387706933bf015
29+
checksum/config: 7b6cdd6a106ad25744cf25c3f834de76923083f2c466a19cf906d777976b2322
3030
spec:
3131
serviceAccountName: nr-k8s-otel-collector
3232
containers:

charts/nr-k8s-otel-collector/examples/k8s/rendered/secret.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ metadata:
1010
app.kubernetes.io/managed-by: Helm
1111
app.kubernetes.io/name: nr-k8s-otel-collector
1212
app.kubernetes.io/version: 1.2.0
13-
helm.sh/chart: nr-k8s-otel-collector-0.9.4
13+
helm.sh/chart: nr-k8s-otel-collector-0.9.5
1414
data:
1515
licenseKey: PE5SX2xpY2Vuc2VLZXk+

0 commit comments

Comments
 (0)