Skip to content

Conversation

@weizhoublue
Copy link
Member

I am robot, upgrade: project prometheus-node-exporter chart upgrade from 4.6.0 to 4.49.2

@gemini-code-assist
Copy link

Summary of Changes

Hello @weizhoublue, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request performs a major version upgrade of the prometheus-node-exporter Helm chart, moving from 4.6.0 to 4.49.2. The primary goal is to incorporate significant enhancements and align the chart with current Kubernetes and Prometheus Operator best practices. This includes bolstering security through kube-rbac-proxy integration, improving monitoring capabilities with PodMonitor support, and providing more flexible network and service configurations. The changes also involve updating chart metadata, documentation, and underlying templating logic to reflect these new features and deprecate outdated components.

Highlights

  • Helm Chart Version Upgrade: The prometheus-node-exporter Helm chart has been upgraded from version 4.6.0 to 4.49.2, reflecting a substantial update to its capabilities and configurations.
  • New Features and Configuration Options: This upgrade introduces several new features, including integration with kube-rbac-proxy for enhanced security, support for PodMonitor for Prometheus Operator, network policies, and dual-stack IP configurations for services. Many new configuration parameters have been added to values.yaml to support these features.
  • Kubernetes Best Practices Alignment: The chart now aligns with modern Kubernetes practices by removing deprecated Pod Security Policy (PSP) configurations and introducing more granular control over service accounts, image pull secrets, and pod affinities.
  • Documentation and Templating Improvements: The README.md files have been updated with new usage instructions, including OCI Artifacts, and the Helm templating logic (_helpers.tpl, daemonset.yaml, service.yaml) has been significantly refined to support the new features and improve flexibility.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the prometheus-node-exporter Helm chart from version 4.6.0 to 4.49.2. The changes are extensive, reflecting the upstream chart's evolution with many new features, improvements, and bug fixes. Key updates include the introduction of kube-rbac-proxy for securing endpoints, support for PodMonitor, removal of deprecated PodSecurityPolicy resources, and numerous enhancements to configurability and templating. Overall, this is a significant and valuable upgrade. I've identified a critical issue in the daemonset.yaml template that would cause deployment to fail if sidecars are used, along with a few minor issues related to documentation and file formatting.

{{- toYaml . | nindent 12 }}
{{- end }}
{{- range .Values.sidecars }}
{{- $overwrites := dict "volumeMounts" (concat (include "prometheus-node-exporter.sidecarVolumeMounts" $ | fromYamlArray) (.volumeMounts | default list) | default list) }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The template function fromYamlArray is not a standard Helm or Sprig function. This will cause a template rendering error if a user tries to configure sidecars. The correct function to use for parsing a YAML string (including a list) is fromYaml.

          {{- $overwrites := dict "volumeMounts" (concat (include "prometheus-node-exporter.sidecarVolumeMounts" $ | fromYaml) (.volumeMounts | default list) | default list) }}

- Helm Repository: `https://prometheus-community.github.io/helm-charts` with chart `prometheus-node-exporter`

_See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._
The installation instructions use the OCI registry. Refer to the [`helm repo`]([`helm repo`](https://helm.sh/docs/helm/helm_repo/)) command documentation for information on installing charts via the traditional repository.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There appears to be a formatting error in the markdown link. The link tag is nested within itself, which may cause rendering issues in some markdown viewers.

Suggested change
The installation instructions use the OCI registry. Refer to the [`helm repo`]([`helm repo`](https://helm.sh/docs/helm/helm_repo/)) command documentation for information on installing charts via the traditional repository.
The installation instructions use the OCI registry. Refer to the [`helm repo`](https://helm.sh/docs/helm/helm_repo/) command documentation for information on installing charts via the traditional repository.

- Helm Repository: `https://prometheus-community.github.io/helm-charts` with chart `prometheus-node-exporter`

_See [`helm repo`](https://helm.sh/docs/helm/helm_repo/) for command documentation._
The installation instructions use the OCI registry. Refer to the [`helm repo`]([`helm repo`](https://helm.sh/docs/helm/helm_repo/)) command documentation for information on installing charts via the traditional repository.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There appears to be a formatting error in the markdown link. The link tag is nested within itself, which may cause rendering issues in some markdown viewers.

Suggested change
The installation instructions use the OCI registry. Refer to the [`helm repo`]([`helm repo`](https://helm.sh/docs/helm/helm_repo/)) command documentation for information on installing charts via the traditional repository.
The installation instructions use the OCI registry. Refer to the [`helm repo`](https://helm.sh/docs/helm/helm_repo/) command documentation for information on installing charts via the traditional repository.

verbs:
- get
```
{{- end }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The file is missing a final newline character. It's a common convention to end files with a newline to ensure POSIX compatibility and prevent issues with some command-line tools.

{{- end }}

Comment on lines +219 to +223
{{- if .Values.kubeRBACProxy.image.sha }}
image: "{{ .Values.global.imageRegistry | default .Values.kubeRBACProxy.image.registry}}/{{ .Values.kubeRBACProxy.image.repository }}:{{ .Values.kubeRBACProxy.image.tag }}@sha256:{{ .Values.kubeRBACProxy.image.sha }}"
{{- else }}
image: "{{ .Values.global.imageRegistry | default .Values.kubeRBACProxy.image.registry}}/{{ .Values.kubeRBACProxy.image.repository }}:{{ .Values.kubeRBACProxy.image.tag }}"
{{- end }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The image definition for kube-rbac-proxy uses image.sha, which has been deprecated in favor of image.digest for the main node-exporter image. For consistency, it would be better to use image.digest here as well. Consider creating a dedicated helper template for the kube-rbac-proxy image to improve maintainability and ensure consistency.

resource: services
subresource: {{ template "prometheus-node-exporter.fullname" . }}
name: {{ template "prometheus-node-exporter.fullname" . }}
{{- end }} No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The file is missing a final newline character. It's a common convention to end files with a newline to ensure POSIX compatibility and prevent issues with some command-line tools.

{{- end }}

@github-actions github-actions bot force-pushed the upgrade/prometheus-node-exporter/4.49.2 branch 3 times, most recently from 5cd7ce1 to 95f639c Compare November 30, 2025 20:12
@github-actions github-actions bot force-pushed the upgrade/prometheus-node-exporter/4.49.2 branch from 95f639c to 97d23f8 Compare December 1, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants