Skip to content

[gpu-operator] Introduce GPU-operator - #765

Merged
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
gpu-operator
Apr 9, 2025
Merged

[gpu-operator] Introduce GPU-operator#765
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
gpu-operator

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented Apr 7, 2025

Copy link
Copy Markdown
Member

Related issues to GPU feature:

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Introduced advanced GPU management capabilities with enhanced node feature detection, flexible configuration, and support for NVIDIA driver integration.
    • Enabled improved monitoring, security, and automated cleanup workflows to streamline GPU resource provisioning.
    • Expanded support for GPU functionalities in virtualization environments.
    • Added new configuration options for sandbox workloads, driver management, and device plugin settings.
    • Added new Custom Resource Definitions (CRDs) for node feature discovery and NVIDIA drivers to enhance Kubernetes resource management.
  • Documentation

    • Updated user documentation to provide an overview of the new node feature discovery functionality and GPU operator configuration options.

@coderabbitai

coderabbitai Bot commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request introduces comprehensive GPU management support via new Helm charts and Kubernetes manifests. A new gpu-operator release entry has been added to the platform’s bundle, and a complete Helm chart for the GPU operator (including Makefile, CRDs, RBAC resources, Deployments, ConfigMaps, Jobs, and helper templates) is provided. Additionally, configuration files for operator defaults and tailored settings (e.g., for Talos) are introduced, along with a GPU feature gate for KubeVirt. These changes establish a new framework to deploy and manage GPU operator functionality and Node Feature Discovery across the Kubernetes cluster.

Changes

File(s) Change Summary
packages/core/platform/bundles/paas-full.yaml Added a new gpu-operator entry under releases with attributes (dependencies, values files, etc.) for GPU management.
packages/system/gpu-operator/Chart.yaml, packages/system/gpu-operator/Makefile Introduced a new Helm chart and Makefile for the cozy-gpu-operator, defining API version, chart metadata, and update targets.
packages/system/gpu-operator/charts/gpu-operator/... Added extensive Helm chart components including .helmignore, Chart.yaml, and a full suite of templates and CRDs for Node Feature Discovery, deployments, RBAC (ClusterRole/Role, Bindings), DaemonSets, ConfigMaps, Jobs, and Prometheus PodMonitor.
packages/system/gpu-operator/templates/_helpers.tpl and similar helper files New helper functions for generating resource names, labels, and full image paths for the GPU operator and driver-manager.
packages/system/gpu-operator/values*.yaml Introduced default configuration files and entries (including values-talos.yaml and an updated root values.yaml) to enable and parameterize GPU operator features.
packages/system/kubevirt/templates/kubevirt-cr.yaml Added a new GPU feature gate (GPU) in the KubeVirt configuration’s featureGates list.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant H as Helm
    participant K as Kubernetes API Server
    participant GO as GPU Operator
    participant NFD as Node Feature Discovery

    U->>H: Execute helm install/upgrade for gpu-operator
    H->>K: Deploy manifests (CRDs, Deployments, RBAC, etc.)
    K->>GO: Launch GPU Operator Pod
    GO->>K: Register and manage GPU-related Kubernetes resources
    GO->>NFD: Initiate Node Feature Discovery for GPU configuration
    NFD->>K: Report node features and adjust labels
Loading

Poem

I'm a hopping rabbit in a code-filled glen,
Celebrating new changes again and again.
GPU charts and CRDs sprout like springtime cheer,
With deployments and roles perfectly clear.
Clusters now sparkle with features so bright,
As my ears twitch with pure delight.
Let's nibble on YAML and code through the night!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (1)
packages/system/gpu-operator/Makefile (1)

9-14: ⚠️ Potential issue

Missing 'gen-versions-map' Target:
The pipeline error indicates a failure related to the target gen-versions-map (make: *** [Makefile:17: gen-versions-map] Error 1). However, this target is not present in the provided Makefile. Verify whether this target has been intentionally removed or should be restored to satisfy the pre-commit checks.

🧹 Nitpick comments (34)
packages/system/gpu-operator/charts/gpu-operator/templates/serviceaccount.yaml (1)

1-8: Template Formatting and Indentation Check:
The ServiceAccount YAML follows Helm templating conventions by using an include with nindent. However, static analysis tools flagged a potential syntax error at line 6 and an indentation warning at line 7. Please verify that when the template is rendered, the resulting YAML is correctly formatted and indented. Adjust the nindent value if necessary.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/README.md (1)

1-11: README Clarity and Minor Grammar Improvements:
The README clearly explains the role of Node Feature Discovery. For improved clarity, consider updating the phrase “vendor and application specific node labeling needs” to “vendors and application-specific node labeling needs.”

🧰 Tools
🪛 LanguageTool

[grammar] ~5-~5: Possible agreement error. The noun ‘vendor’ seems to be countable; consider using: “range of vendors”.
Context: ...uration and extension points for a wide range of vendor and application specific node labeling ...

(A_COLLECTIVE_OF_NN)


[uncategorized] ~6-~6: When ‘application-specific’ is used as a modifier, it is usually spelled with a hyphen.
Context: ...n points for a wide range of vendor and application specific node labeling needs. See [NFD document...

(SPECIFIC_HYPHEN)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/.helmignore (1)

1-23: New .helmignore file for node-feature-discovery — Looks Good

The file correctly lists common patterns to ignore (VCS dirs, backup files, IDE directories, etc.) for Helm packaging. One minor note: if any linting tool complains about trailing blank lines or formatting, consider removing the final empty line.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/rolebinding.yaml (1)

1-17: RoleBinding Template for Node Feature Discovery — Review Conditional Rendering and List Formatting

The Helm template logically wraps the RoleBinding creation with a conditional check on both .Values.worker.enable and .Values.worker.rbac.create. The usage of include functions for the name, namespace, and labels is correct.

A couple of small points:

  • The list under subjects: (lines 14–16) is formatted as expected in Helm templates; however, ensure that YAML linters (which might not fully understand Helm templating) ignore these constructs.
  • Static analysis flagged a warning about extra blank lines (line 18); if this warning persists in your CI, you might consider removing the extra whitespace.
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/.helmignore (1)

1-23: .helmignore for GPU-Operator Chart — Consistent and Clear

This file mirrors the ignore patterns from other Helm charts in the repository. It cleanly lists VCS directories, backup file patterns, and IDE configurations. Just as with similar files, please check your linting rules regarding trailing blank lines if any warnings occur.

packages/system/gpu-operator/values-talos.yaml (1)

1-8: GPU-Operator Talos Configuration — Clear and Straightforward

The new values-talos.yaml file provides clear configuration for the GPU operator:

  • Enabling sandboxWorkloads (likely for test or isolated environments),
  • Disabling the driver and devicePlugin components.

This aligns well with scenarios where the Talos environment may not require a full GPU driver or plugin deployment. If applicable, consider adding inline comments to describe the rationale behind disabling these components for future maintainers.

packages/system/gpu-operator/charts/gpu-operator/templates/plugin_config.yaml (2)

1-1: Helm Templating Syntax Notice:
The use of {{- ... }} in line 1 is the standard Helm templating syntax. YAMLlint may report a false positive (“expected the node content, but found '-'”), but this is expected.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


11-11: Trailing Whitespace Cleanup:
Line 11 appears to include trailing spaces. Although minor, cleaning up such whitespace can prevent linting warnings in strict tools.

-{{- end }}␣␣
+{{- end }}
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 11-11: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml (2)

5-7: YAML Templating Indentation Issue:
Static analysis reports a syntax error on line 6 and an indentation warning on line 7. Please verify that the Helm templating block

{{- include "gpu-operator.labels" . | nindent 4 }}

is correctly indented so that it integrates with the surrounding YAML. Adjust the number of spaces if needed to ensure proper YAML parsing.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)


1-85: Role Resource Permissions Validation:
The Role resource defines a comprehensive set of permissions needed for the GPU operator. Please double-check that none of these privileges exceed what is necessary from a security perspective.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/nodefeaturerules.yaml (2)

26-29: YAML Indentation Issues:
Multiple lines within this file (e.g. lines 26, 34, 43, and within the matchAny block at lines 96–105) appear to have inconsistent indentation compared to expected YAML standards. Please adjust the indentation (ensuring list items under a mapping are indented correctly) so that the file passes YAML linting without errors.

Also applies to: 34-37, 43-45, 96-105

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 26-26: wrong indentation: expected 8 but found 6

(indentation)


107-108: Excess Blank Lines:
Static analysis warns about extra blank lines at the end of the file. Removing these will help maintain a clean file format.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 107-107: too many blank lines

(1 > 0) (empty-lines)

packages/system/gpu-operator/Makefile (1)

1-7: Shell Command Robustness:
The version extraction command on line 1 using awk is concise and effective. Consider adding error handling (or a check) in case the expected version string is absent in the charts/cilium/Chart.yaml file.

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrole.yaml (2)

5-7: YAML Templating Indentation Issue:
Similar to the Role resource file, static analysis for this ClusterRole indicates indentation issues around the templating block on lines 5–7 (e.g.

{{- include "gpu-operator.labels" . | nindent 4 }}

). Please review and adjust the indentation so that the YAML parser interprets the templated content correctly.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)


1-156: ClusterRole Permissions Review:
The ClusterRole is set up with extensive permissions that cover multiple API groups and resource types, including NVIDIA‐specific resources. Verify that the conditional deletion permission (lines 153–155, enabled by .Values.operator.cleanupCRD) is intentional and that your values files correctly manage this behavior.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/crds/nvidia.com_nvidiadrivers.yaml (1)

1-810: CRD Definition Completeness and Structure

The CRD is comprehensive and clearly defines both the NVIDIADriver and associated NVIDIADriverList. The schema includes detailed property definitions, validation rules (such as immutability for fields like driverType and usePrecompiled), and additional printer columns. This level of detail will help ensure that driver resources are managed reliably by Kubernetes.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/values.yaml (2)

1-7: Image Configuration and Pull Policy Settings
The image repository and pull policy are clearly defined. The inline comment (line 3) reminds users to set the policy to “IfNotPresent” for released versions. Consider reviewing the commented “tag” option (lines 5–6) to decide if it should remain a comment or be documented in a separate README.


18-68: Master Configuration Block (NFD-Master)
The master section is very detailed. The multi-line commented configuration block (lines 23–67) serves as in-depth documentation and provides useful examples for advanced customization.

  • Recommendation: Verify that users are aware that these commented options can be enabled if needed and that changes require a master restart.
  • Note on Formatting: According to static analysis hints, there are reported indentation and trailing space issues (e.g. lines reported as wrong-indented and trailing spaces on lines ~149/529). Although these may be false positives due to complex templating or comments, please verify and clean up any unintentional whitespace if needed.
packages/system/gpu-operator/charts/gpu-operator/templates/upgrade_crd.yaml (1)

70-76: ImagePullSecrets and Tolerations in Job Spec
The conditional inclusion of imagePullSecrets (lines 71–76) and tolerations (lines 77–80) for the job manifests proper attention to deployment variability.

  • Note: A YAML lint warning noted a potential indentation issue at line 68 (reported as “wrong indentation: expected 6 but found 8”). Please double-check the indentation for job labels to ensure consistency.
packages/system/gpu-operator/charts/gpu-operator/values.yaml (2)

23-30: HostPaths Configuration
The hostPaths block (lines 23–30) is well documented regarding the intent and examples for use with driver installation.


35-51: Daemonsets Configuration
The daemonsets section defines labels, annotations, priority class, tolerations, and update strategies precisely.

  • Suggestion: Consider quoting the value for maxUnavailable (line 50) as "1" if you plan to support percentage values elsewhere—this helps avoid ambiguity between numeric and string representations.
packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml (2)

9-12: SCC Annotations and Description
The annotations (lines 9–12) provide a detailed description of what the SCC does.

  • Action Item: Remove any extraneous trailing spaces reported by static analysis (e.g. line 10) to keep the YAML clean.
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 10-10: trailing spaces

(trailing-spaces)


34-42: Additional Context and Volumes Definition
The supplementalGroups, users, and volumes sections are well defined.

  • Action Item: Remove any trailing spaces (static analysis flags trailing spaces on line 40) to satisfy YAML lint.
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 40-40: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml (2)

94-129: Extended Validator and Component Settings

The configuration for additional validator components (e.g. cuda, driver, toolkit, vfioPCI, vgpuManager, and vgpuDevices) is implemented using conditionals.
Suggestion: Review and, if possible, slightly refactor for readability and consistency in indentation across these nested blocks.


246-681: Comprehensive Configuration for Remaining Components

The remaining blocks (covering kataManager, vfioManager, vgpuDeviceManager, ccManager, toolkit, devicePlugin, dcgm, dcgmExporter, gfd, migManager, nodeStatusExporter, gds, gdrcopy, sandboxWorkloads, and sandboxDevicePlugin) are extensive. This level of configurability is powerful; however, consider whether splitting these into multiple smaller, modular files might enhance maintainability and readability. Ensure every component’s default values are well documented in your values file.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/crds/nfd-api-crds.yaml (1)

413-712: Comprehensive Schema for NodeFeatureRule

The schema for NodeFeatureRule is very detailed, covering match expressions, match name configurations, and additional fields for annotations, labels, taints, and variables.
Recommendation: Consider creating sample custom resource instances to validate that the schema enforces the desired behavior and that label/template expansion works as expected.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/post-delete-job.yaml (6)

54-54: Formatting: Excess Spaces in Name Field

Line 54 contains extra spaces after the colon in the name field of the Job. Removing the extra space will help ensure consistent formatting.

-  name:  {{ include "node-feature-discovery.fullname" . }}-prune
+  name: {{ include "node-feature-discovery.fullname" . }}-prune
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 54-54: too many spaces after colon

(colons)


66-66: Label Indentation Issue in Job Metadata

The key role: prune on line 66 seems over-indented (expected 6 spaces but found 8). Adjust the indentation to match the surrounding keys to avoid YAML parsing warnings.

-         role: prune
+       role: prune
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 66-66: wrong indentation: expected 6 but found 8

(indentation)


70-70: Container Name Indentation

Line 70 (- name: nfd-master) is over-indented relative to the expected level. Please adjust to maintain uniform indentation in the containers array.

-         - name: nfd-master
+       - name: nfd-master
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 70-70: wrong indentation: expected 6 but found 8

(indentation)


76-76: Command Array Indentation

The command array item on line 76 is indented with 12 spaces whereas 10 spaces are expected. Correcting the indentation will improve YAML readability.

-             - "nfd-master"
+           - "nfd-master"
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 76-76: wrong indentation: expected 10 but found 12

(indentation)


78-78: Arguments Array Indentation

Similarly, the argument on line 78 (- "-prune") is over-indented. Please realign it to the correct indent level.

-             - "-prune"
+           - "-prune"
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 78-78: wrong indentation: expected 10 but found 12

(indentation)


83-94: YAML Indentation Consistency in Pod Spec

The sections for nodeSelector, affinity, and tolerations (lines 83–94) use nested indentation. Please verify that the indentations across these blocks are consistent with your YAML style to avoid further linting warnings.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater-crds.yaml (2)

10-38: v1alpha1 Version: Schema Definition Overview
The first version (v1alpha1) is defined with a comprehensive schema that includes properties such as topologyPolicies and zones. The use of anyOf for resource quantities (allocatable, available, capacity) and the regex patterns follow Kubernetes conventions.

Suggestion: Consider reviewing the regex patterns to ensure they capture all expected numeric formats.


39-137: v1alpha1 Detailed Schema for Zones & Resources
The nested schema for zones is detailed and covers sub-properties like attributes, costs, and resources. All required fields are explicitly defined. Ensure that the duplication of similar fields between v1alpha1 and v1alpha2 is intentional and documented for users upgrading between versions.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49b5b51 and 78af5e2.

⛔ Files ignored due to path filters (1)
  • packages/system/gpu-operator/charts/gpu-operator/Chart.lock is excluded by !**/*.lock
📒 Files selected for processing (47)
  • packages/core/platform/bundles/paas-full.yaml (1 hunks)
  • packages/system/gpu-operator/Chart.yaml (1 hunks)
  • packages/system/gpu-operator/Makefile (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/.helmignore (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/Chart.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/.helmignore (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/Chart.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/README.md (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/crds/nfd-api-crds.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/_helpers.tpl (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrole.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/master.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-gc.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-master-conf.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-topologyupdater-conf.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/post-delete-job.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/role.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/rolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/serviceaccount.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater-crds.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/worker.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/values.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/crds/nvidia.com_nvidiadrivers.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/_helpers.tpl (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/cleanup_crd.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/clusterrole.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/clusterrolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/dcgm_exporter_config.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/mig_config.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/nodefeaturerules.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/nvidiadriver.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/operator.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/plugin_config.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/serviceaccount.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/upgrade_crd.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/values.yaml (1 hunks)
  • packages/system/gpu-operator/values-talos.yaml (1 hunks)
  • packages/system/gpu-operator/values.yaml (1 hunks)
  • packages/system/kubevirt/templates/kubevirt-cr.yaml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
packages/system/gpu-operator/charts/gpu-operator/templates/serviceaccount.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 10-10: wrong indentation: expected 2 but found 4

(indentation)


[warning] 11-11: wrong indentation: expected 2 but found 4

(indentation)


[warning] 21-21: wrong indentation: expected 6 but found 4

(indentation)


[warning] 24-24: wrong indentation: expected 6 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-topologyupdater-conf.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/serviceaccount.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-master-conf.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/plugin_config.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 11-11: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/templates/mig_config.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/values.yaml

[warning] 137-137: wrong indentation: expected 6 but found 8

(indentation)


[warning] 140-140: wrong indentation: expected 12 but found 14

(indentation)


[warning] 146-146: wrong indentation: expected 12 but found 14

(indentation)


[error] 149-149: trailing spaces

(trailing-spaces)


[error] 529-529: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/rolebinding.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 18-18: too many blank lines

(1 > 0) (empty-lines)

packages/system/gpu-operator/charts/gpu-operator/templates/nodefeaturerules.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 26-26: wrong indentation: expected 8 but found 6

(indentation)


[warning] 34-34: wrong indentation: expected 8 but found 6

(indentation)


[warning] 43-43: wrong indentation: expected 8 but found 6

(indentation)


[warning] 96-96: wrong indentation: expected 8 but found 7

(indentation)


[warning] 97-97: wrong indentation: expected 11 but found 10

(indentation)


[warning] 102-102: wrong indentation: expected 11 but found 10

(indentation)


[warning] 107-107: too many blank lines

(1 > 0) (empty-lines)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/operator.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrole.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrolebinding.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/master.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/dcgm_exporter_config.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/cleanup_crd.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 20-20: wrong indentation: expected 6 but found 8

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrolebinding.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/worker.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/nvidiadriver.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/role.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater-crds.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrole.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/post-delete-job.yaml

[error] 4-4: syntax error: expected , but found ''

(syntax)


[warning] 54-54: too many spaces after colon

(colons)


[warning] 66-66: wrong indentation: expected 6 but found 8

(indentation)


[warning] 70-70: wrong indentation: expected 6 but found 8

(indentation)


[warning] 76-76: wrong indentation: expected 10 but found 12

(indentation)


[warning] 78-78: wrong indentation: expected 10 but found 12

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/upgrade_crd.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 68-68: wrong indentation: expected 6 but found 8

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-gc.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 10-10: trailing spaces

(trailing-spaces)


[error] 40-40: trailing spaces

(trailing-spaces)

🪛 LanguageTool
packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/README.md

[grammar] ~5-~5: Possible agreement error. The noun ‘vendor’ seems to be countable; consider using: “range of vendors”.
Context: ...uration and extension points for a wide range of vendor and application specific node labeling ...

(A_COLLECTIVE_OF_NN)


[uncategorized] ~6-~6: When ‘application-specific’ is used as a modifier, it is usually spelled with a hyphen.
Context: ...n points for a wide range of vendor and application specific node labeling needs. See [NFD document...

(SPECIFIC_HYPHEN)

🪛 GitHub Actions: Pre-Commit Checks
packages/system/gpu-operator/Makefile

[error] 17-17: make: *** [Makefile:17: gen-versions-map] Error 1.

🔇 Additional comments (121)
packages/system/gpu-operator/values.yaml (1)

1-1: New GPU Operator Configuration Entry:
The addition of an empty gpu-operator: {} block serves as a useful placeholder for future GPU operator configuration options. Ensure that any necessary parameters can be added to this section later if needed.

packages/system/kubevirt/templates/kubevirt-cr.yaml (1)

12-18: Addition of the GPU Feature Gate:
The GPU feature gate is added to the developerConfiguration.featureGates list. This enables GPU-related functionalities within the KubeVirt deployment. Verify that the rest of your system components properly support this new gate.

packages/system/gpu-operator/Chart.yaml (1)

1-4: Helm Chart Metadata Verification:
The Chart.yaml for the GPU operator is correctly set up with apiVersion: v2, the chart’s name, and a placeholder version. Confirm that your build process automatically updates the version before release.

packages/core/platform/bundles/paas-full.yaml (1)

156-166: GPU-Operator Release Entry — Correct Integration with Dependencies and Configuration

The new GPU-operator release entry is clearly defined: it sets the proper releaseName, references the cozy-gpu-operator chart, and includes the expected namespace along with the dependencies on cilium and kubeovn. The use of privileged: true along with optional: true seems appropriate for an operator that might not be deployed on every cluster by default.

Please verify that:

  • The namespace cozy-gpu-operator exists or is created elsewhere in your deployment manifests.
  • The referenced values files (values.yaml and values-talos.yaml) align with the operator’s required configuration.

Overall, this looks well-integrated into the releases bundle.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml (1)

1-13: Review of NFD Worker ConfigMap Template

The template correctly uses a conditional block to create the ConfigMap only when .Values.worker.enable is true. The use of Helm functions (such as include, toYaml, and nindent) is consistent with best practices to ensure proper formatting of the generated YAML. Note that the YAMLlint error on line 1 (regarding the leading dash in {{- if ... }}) is a known false positive caused by Helm templating syntax.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-topologyupdater-conf.yaml (1)

1-13: Review of NFD Topology Updater ConfigMap Template

This template conditionally creates a ConfigMap for the topology updater based on .Values.topologyUpdater.enable. The metadata uses Helm templating functions to inject dynamic names, namespaces, and labels. Like in the previous file, the YAMLlint error at line 1 is likely a false positive due to the {{- if ... }} syntax.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml (1)

1-16: Review of RoleBinding Template for GPU Operator

This RoleBinding template defines the necessary binding between the gpu-operator ServiceAccount and its corresponding Role. The metadata is dynamically generated using Helm templating, which is a good practice for consistency in deployments. However, YAMLlint reports an indentation warning on line 7 (expecting 2 spaces instead of 4) and a syntax warning on line 6 (related to the use of {{- include ... }}). These issues are common false positives when linting templated YAML. It is recommended to run helm lint to verify that the rendered YAML is correctly indented and valid.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrolebinding.yaml (1)

1-16: Review of ClusterRoleBinding Template for GPU Operator

Similar to the RoleBinding, this ClusterRoleBinding template is structured to grant cluster-level permissions by binding the gpu-operator ServiceAccount to a ClusterRole. The dynamic construction of labels and namespace via Helm templating is properly implemented. YAMLlint reports an indentation warning on line 7 and a syntax error on line 6; these are likely false positives due to the templating syntax. Please ensure that the final rendered output passes helm lint.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml (1)

1-27: Review of PodMonitor Template for Prometheus Monitoring

This template provisions a PodMonitor resource to enable Prometheus monitoring for the Node Feature Discovery component. The conditional inclusion based on .Values.prometheus.enable and the dynamic metadata using Helm functions (including merging additional labels via with/toYaml) are well implemented. YAMLlint reports several issues (e.g., a syntax error on line 1 and indentation warnings on lines 10–11, 21, and 24). These errors can be safely ignored if the rendered YAML (verified via helm lint) is valid.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 10-10: wrong indentation: expected 2 but found 4

(indentation)


[warning] 11-11: wrong indentation: expected 2 but found 4

(indentation)


[warning] 21-21: wrong indentation: expected 6 but found 4

(indentation)


[warning] 24-24: wrong indentation: expected 6 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/serviceaccount.yaml (4)

1-13: Master ServiceAccount Block – Looks Good:
This block conditionally creates a ServiceAccount for the master component. The metadata (name, namespace, labels, and optional annotations) is dynamically populated using helper templates. The logic is clear and correct.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


15-28: TopologyUpdater ServiceAccount Block – Valid:
The conditional and templating for creating the ServiceAccount for the topology updater feature is well implemented.


30-43: GC ServiceAccount Block – Valid:
The block that creates the ServiceAccount for the garbage collection component is implemented properly with consistent use of conditionals and helper templates.


45-58: Worker ServiceAccount Block – Good to Go:
The Worker ServiceAccount is conditionally generated using dynamic helper functions, and the structure follows your project's patterns.

packages/system/gpu-operator/charts/gpu-operator/templates/dcgm_exporter_config.yaml (1)

1-15: DCGM Exporter ConfigMap Template – Reviewed:
This template correctly nests two conditionals: first checking for the existence of a DCGM exporter configuration, then verifying that it should be created and that its data is not empty. The use of toYaml and nindent ensures proper formatting. Note that YAMLlint may flag line 1 due to templating syntax; this is a known false positive.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-master-conf.yaml (1)

1-13: NFD Master ConfigMap Template – Looks Solid:
The template conditionally creates a ConfigMap for the Node Feature Discovery master configuration. The metadata (name, namespace, and labels) and the data block (using a block scalar with |-) are correctly structured. Ensure that the output from toYaml meets your formatting expectations. YAMLlint warnings on templated lines are expected.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/mig_config.yaml (1)

1-11: MIG ConfigMap Template – Implementation Verified:
This template conditionally creates a ConfigMap if migManager.config.create is true and its data is non-empty. The usage of toYaml with nindent for the data block is appropriate. Similar YAMLlint warnings are expected due to Helm templating syntax and can be safely ignored if the rendered output is correct.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/nodefeaturerules.yaml (1)

1-1: Template Syntax Caution:
The templating directive on line 1

{{- if .Values.nfd.nodefeaturerules }}

is triggering a YAML syntax error according to static analysis. Confirm that this syntax is acceptable in your Helm chart context and adjust if your YAML linter requires a slightly different format.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/Chart.yaml (1)

1-15: Helm Chart Metadata Validation:
The metadata in this Chart.yaml file appears correctly structured, including the API version, application version, description, and other required fields. Just ensure that the version: 0.17.2 remains in sync with the upstream Node Feature Discovery chart if updates occur.

packages/system/gpu-operator/charts/gpu-operator/templates/cleanup_crd.yaml (1)

1-51:

Details

✅ Verification successful

Cleanup CRD Job Template – YAML Lint and Indentation Issues

The Helm template for the cleanup job is well structured and uses conditional inclusion based on .Values.operator.cleanupCRD. However, YAMLlint reported a syntax error at the very beginning (line 1) and an indentation warning later in the file (notably around line 20). These issues typically arise when raw Helm template directives (e.g. {{- if … }}) are processed by linters that expect pure YAML. Please ensure your linter is configured to handle Helm templating or verify the rendered output using helm template.


Helm Templating Linter Configuration – No Code Changes Required

The YAML lint errors are false positives caused by linting raw Helm templating directives rather than the rendered YAML. Please ensure your YAML linter is configured to handle Helm templates or verify the output with helm template (which should show valid YAML).

  • File: packages/system/gpu-operator/charts/gpu-operator/templates/cleanup_crd.yaml
  • Notes:
    • The syntax error at line 1 and the indentation warning (around line 20) are expected when a linter processes Helm directives.
    • No changes are needed in the template itself if the rendered output is correct.
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 20-20: wrong indentation: expected 6 but found 8

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/master.yaml (1)

1-171:

Details

❓ Verification inconclusive

NFD Master Deployment Template – Handling of Templating Directives

This Deployment template for the Node Feature Discovery (NFD) master is thorough and contains many customizable parameters via Helm values. Static analysis tools are flagging a syntax error at the start (line 1) and an indentation warning on line 9. These warnings likely result from the Helm templating directives (e.g. {{- if .Values.master.enable }}) that may confuse linters expecting standard YAML. It is recommended to either adjust the linter configuration to process rendered output or confirm the final YAML using helm template.


Review: Helm Templating Warnings in NFD Master Deployment Template

The static analysis warnings (syntax error at line 1 and indentation warning at line 9) are expected due to Helm’s templating directives. These lines are not errors in the final rendered YAML. To proceed safely:

  • Confirm the rendered output using helm template to ensure valid YAML.
  • Update your linter configuration (or exclude these files) so that Helm directives are not flagged as errors.
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/operator.yaml (1)

1-100: Operator Deployment Template – Helm Templating and Linter Considerations

The GPU operator deployment is clearly defined with proper separation of concerns (metadata, spec, container configuration, probes, etc.). However, static analysis reported an indentation warning and a syntax error at the templating directive on line 6 (e.g. {{- include "gpu-operator.labels" . | nindent 4 }}). These issues are typical when linters are applied to Helm templates. Please verify that your linter is configured to process Helm templates or review the rendered manifest using helm template to ensure the final output is valid.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/role.yaml (1)

1-26: NFD Worker Role Template – Handling of Helm Templating Directives

The Role resource correctly grants RBAC permissions needed for Node Feature Discovery, with proper rules for both the nfd.k8s-sigs.io API group and core pods access. Static analysis flags a syntax error on line 1 due to the Helm templating directive ({{- if and .Values.worker.enable .Values.worker.rbac.create }}). This is a known behavior when linters parse raw Helm templates. You can safely ignore this warning if the rendered output is correct.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/values.yaml (4)

9-12: Override Settings for Name, Fullname, and Namespace
The override values are set to empty strings, which is standard for allowing users to override defaults. This approach looks good.


13-17: Feature Gates and Priority Class
The featureGates mapping and priorityClassName field are straightforward. Make sure that any future additions to feature gates are well documented so that users know what toggles are available.


93-102: ServiceAccount Configuration
The serviceAccount section properly indicates that a new account is created by default if none is provided. This enhanced usability is appreciated.


109-120: Resource and Revision Configuration
The resource limits and requests for memory and CPU are clearly defined. The revision history and RBAC configurations are minimal but sufficient for a basic deployment.

packages/system/gpu-operator/charts/gpu-operator/templates/nvidiadriver.yaml (6)

1-4: Helm Templating and Conditional Rendering for NVIDIADriver
The file begins with a conditional check using Helm templating (line 1). The configuration for the NVIDIADriver resource and its metadata is clear and well structured.

  • Note: The YAML lint error complaining about a syntax issue at line 1 is a known false positive caused by the Helm templating syntax (“{{- if … }}”). This can safely be ignored.
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


13-18: Annotations and Labels Conditional Inclusion
The use of conditional blocks to include annotations (lines 13–15) and labels (lines 16–18) using the toYaml helper with proper indentation (nindent) is a good practice and improves maintainability.


19-24: Node Selector and ImagePullSecrets Handling
The template conditionally adds nodeSelector and imagePullSecrets based on provided values. This flexible design ensures that resource configurations remain concise while still supporting advanced customization.


37-45: Manager, Startup, Liveness, and Readiness Probes
The subsequent conditional blocks for manager settings, probes, and RDMA settings ensure that the CRD is comprehensive and adapts to the user’s configuration needs. Overall, the logic is clear and follows best practices.


73-79: GDS Configuration Block
The GDS settings (lines 73–79) are conditionally included and structured similarly to other sections. This consistency simplifies future maintenance and upgrades.


95-117: GDRCopy Configuration Block
The GDRCopy block mirrors the structure of the GDS block and is similarly well implemented. All fields are properly templated.

packages/system/gpu-operator/charts/gpu-operator/templates/upgrade_crd.yaml (6)

1-1: Helm Conditional for Upgrade CRD Hook
The file begins with a conditional check on .Values.operator.upgradeCRD.

  • Note: YAML lint may flag a syntax error at line 1 because of the leading Helm directive. This is another common false positive; no action is required.
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


2-11: ServiceAccount Resource for Upgrade Hook
The ServiceAccount is defined with pre-upgrade hook annotations. The hook deletion policy and weight are set correctly to ensure proper lifecycle management during upgrades.


12-32: ClusterRole Resource Definition
The ClusterRole includes the expected permissions (create, get, list, watch, patch, update) for managing CRDs. The hook annotations are consistently applied.


33-49: ClusterRoleBinding Resource
The ClusterRoleBinding binds the ServiceAccount to the ClusterRole with proper annotations. The usage of the Helm templating for the namespace ({{ .Release.Namespace }}) is correct.


50-59: Job Definition for CRD Upgrade
The Job is defined as a pre-upgrade hook with clear metadata and labels. The container command (lines 85–93) applies the required CRD YAML files using kubectl apply.

  • Recommendation: Ensure that the inline shell command logic (with semicolon separation) handles errors gracefully and that the conditional block for NFD API CRDs (lines 91–93) works as intended.

81-96: Job Container and Restart Policy
The container specification (lines 81–93) and the restart policy set to OnFailure are appropriate for a one-off upgrade job.

packages/system/gpu-operator/charts/gpu-operator/values.yaml (13)

1-4: File Header and Documentation Comments
The headers and comments provide good context for users about the purpose of the file and how variables are used in the templates.


5-12: Platform and NFD Configuration
The platform configuration (line 5–7) and the NFD section (lines 8–10) are straightforward. Enabling NFD here makes sense, and the boolean flags are clearly documented.


15-22: PSA, CDI, and Sandbox Workloads Configuration
These sections (lines 12–22) set reasonable defaults. The naming and inline comments are clear.


52-60: Validator Configuration
The validator settings are concise and follow best practices.


67-95: Operator Configuration Block
This section (lines 67–95) sets the core operator parameters including repository, image, pull policy, runtime class, and upgrade options. The inclusion of fields such as cleanupCRD and upgradeCRD is useful.

  • Recommendation: Verify that the runtimeClass value (nvidia) is valid in your deployment environments. Additionally, ensure that any changes to these fields are reflected in downstream documentation and tests.

129-150: Driver Configuration
The driver block (lines 129–150) is comprehensive. It specifies CRD options, kernel module type, repository, and image version.

  • Note: The deprecation note regarding useOpenKernelModules (line 141) is helpful.

152-161: RDMA Configuration
The RDMA settings are minimal yet sufficient. This section prepares for future enhancements if RDMA support is enabled.


162-194: Upgrade Policy for Driver
The upgradePolicy section defines parameters like auto-upgrade, parallel upgrades, and pod deletion options.

  • Recommendation: Consider quoting percentage values (e.g. maxUnavailable: "25%") to ensure YAML parsers do not misinterpret these as expressions.

194-214: Manager Configuration
The manager configuration is detailed and includes environment variables for GPU pod eviction and auto-drain. The inline commentary helps clarify version constraints.


233-242: Toolkit and Device Plugin Configurations
Both sections (lines 233–242 for toolkit and 244–265 for devicePlugin) are straightforward and use standard conventions.


301-310: DCGM and DCGM Exporter Configurations
The settings for DCGM (lines 301–308) and DCGM Exporter (lines 312–332) are appropriately specified.


435-444: GDS and GDRCopy Configurations
The GDS (lines 435–444) and GDRCopy (lines 445–454) sections mirror each other in style and consistency.


559-607: Node-Feature-Discovery and Related Configurations
The final section configuring Node Feature Discovery (lines 559 onward) is thorough. It provides separate configurations for the master and worker components, including service account settings, tolerations, and extra labels.

  • Suggestion: Ensure that any list formats (such as for sources under worker configurations) adhere strictly to YAML formatting to avoid runtime parsing errors.
packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml (5)

1-1: Helm Templating in SCC Definition
The conditional inclusion based on the OpenShift platform is correct. Note that YAML lint may report a syntax error on line 1 due to the Helm templating directive. This false positive can be safely ignored.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


2-8: SCC Metadata and Labels
The metadata section (lines 2–8) correctly assigns API version, kind, and leverages templating for labels.


13-20: SCC Spec Fields and Security Settings
The SCC spec includes fields that restrict host access and privileges (lines 13–20). These settings align with securing a read-only filesystem environment.


21-24: Capabilities and FSGroup Settings
The empty lists for allowed capabilities and default additions, along with an FSGroup strategy, are appropriate.


25-33: User and Group Configurations
The groups and runAsUser settings (lines 25–33) are defined correctly.

packages/system/gpu-operator/charts/gpu-operator/Chart.yaml (1)

1-24: Chart.yaml: Configuration and Dependency Definitions

The file cleanly defines the Helm chart metadata including the API version, app version, dependencies (with a conditional on nfd.enabled), and additional metadata such as description, homepage, icon, and keywords.
Consider verifying that the dependency’s version (v0.17.2) remains compatible with your cluster’s requirements and any recent security advisories.

packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml (11)

1-13: Metadata and Conditional Annotations

The metadata section uses Helm templating effectively to include labels and conditionally add annotations (for CRD cleanup via pre-delete hook). Ensure that the value referenced (e.g. .Values.operator.cleanupCRD) is defined in your values files.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)


14-17: HostPaths Configuration

The host paths for rootFS and driverInstallDir are clearly specified. Double-check that the provided values correctly reflect your cluster’s filesystem layout.


18-42: Operator Settings Templating

The operator section flexibly includes settings such as runtimeClass, defaultGPUMode, and an optional initContainer block via conditional templating. This design provides great flexibility. Verify that missing values are handled gracefully when these parameters are not defined.


43-45: Optional OCP Driver Toolkit Setting

This conditional block correctly injects the use_ocp_driver_toolkit flag when defined. Ensure that the documentation and default values in your values file align with its intended usage.


46-64: Daemonsets Configuration

The daemonsets section appropriately includes templated labels, optional annotations, tolerations, and update strategies. It would be beneficial to verify that the runtime and update behaviors match your operator’s upgrade policies.


65-93: Validator Configuration Parameters

The validator block is comprehensive and supports conditional configuration for repository, image, version, pull policies, secrets, resources, environment variables, and arguments. Consider adding inline documentation (or comments in your values file) to explain the impact of each parameter for future maintainability.


131-134: MIG Strategy Configuration

A straightforward, conditionally included block for configuring the MIG strategy.


135-139: PSA and CDI Settings

The PSA and CDI sections correctly reflect simple enablement flags and default values. Confirm that .Values.cdi.default is provided with an appropriate default.


212-234: Driver Upgrade Policy Configuration

The upgradePolicy section is very detailed—it covers auto-upgrade flags, parallel upgrade limits, unavailable limits, wait for completion, pod deletion, and drain configurations. Verify that these defaults lead to expected and safe upgrade behaviors.


235-245: vgpuManager Settings

The vgpuManager section is conditionally included and uses templating effectively. Just ensure that the default values maintain security and functionality.


140-169:

Details

❓ Verification inconclusive

Driver Configuration Block

This segment details the driver settings including repository, image, version, pull policies, probes, and sub-manager configurations. Given the block’s complexity, ensure comprehensive testing with various value inputs and consider modularizing this block into helper templates to improve readability.


Driver Configuration Block Refactoring & Verification

The driver configuration block (lines 140–169 in packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml) is functionally correct and clearly renders multiple conditional settings. However, given its complexity, consider these improvements for future maintainability and clarity:

  • Modularization: Evaluate breaking out individual subsections (such as repository, image, version, pull policy, and probes) into helper templates. This would simplify the main template and ease future modifications.
  • Comprehensive Testing: Test the template with a variety of value inputs—including cases where some fields are omitted—to ensure the generated YAML remains valid under all conditions.

Please review and verify these suggestions in context with the rest of your chart configuration.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-gc.yaml (7)

1-1: YAML Syntax Warning on the Conditional Statement

The file begins with {{- if and .Values.gc.enable -}} on line 1. Static analysis indicates this may trigger a syntax error because the block starts with a hyphen. Verify that the templating syntax is supported by your Helm version and does not break downstream YAML parsers.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


2-10: Deployment Metadata Configuration

The metadata block—defining the deployment name, namespace, and labels—is well structured using Helm templating. Confirm that the helper templates (e.g. "node-feature-discovery.fullname") render the expected values.


11-20: Deployment Selector and Template Labels

Both the deployment selector and pod template labels merge templated values with static keys (such as role: gc). Ensure that these labels are consistent to facilitate correct pod selection by the deployment controller.


21-30: Pod Template Security and Service Account Settings

The pod spec correctly assigns a service account, DNS policy, (and optionally) priority class and image pull secrets. Double-check that the securityContext provided via Helm is complete and that sensitive settings are not omitted.


31-40: Container Configuration and Command Arguments

The container named gc is defined with an image reference, pull policy, and environment variable (using a field reference for the node name). The conditional inclusion of extra commands (e.g. -gc-interval) is handled appropriately.


41-48: Container Resources and Port Configuration

The resources and the metrics port (defaulting to 8081 if not provided) are correctly templated. Ensure that the resource limits, once substituted, meet your operational requirements.


49-52: NodeSelector, Affinity, and Tolerations

The deployment supports external scheduling configuration through nodeSelector, affinity, and tolerations. Verify these are rendered in the final YAML as expected.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/crds/nfd-api-crds.yaml (4)

1-8: NodeFeature CRD Definition

The Custom Resource Definition for NodeFeature is well-defined with a detailed OpenAPI v3 schema. It clearly specifies properties for attributes, flags, and instances.


9-121: Detailed Schema for NodeFeature

The schema provided for NodeFeature is comprehensive. Verify that the nested object definitions (such as those for attributes and instances) meet your data expectations and that any future changes to the feature discovery mechanism will remain compatible.


124-139: NodeFeatureGroup CRD Definition

The CRD for NodeFeatureGroup is structured appropriately. The use of a short name (e.g. nfg) improves usability. Ensure that the schema definitions correctly enforce the intended grouping rules.


395-412: NodeFeatureRule CRD Definition

The CRD for NodeFeatureRule defines a cluster-scoped resource with comprehensive schema details for node customization rules. Confirm that all enumerated operator values (such as In, NotIn, Exists, etc.) accurately reflect your rule processing logic.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/post-delete-job.yaml (1)

4-4:

Details

✅ Verification successful

ServiceAccount Name Syntax Issue

Static analysis reports a syntax error on line 4 (related to the ServiceAccount name). Please verify that the templated expression in
    name: {{ include "node-feature-discovery.fullname" . }}-prune
is correctly terminated and does not include extraneous characters that may confuse YAML parsers.


Helm Template Syntax Verified – No Changes Required

After verifying the templated expression, it appears that the syntax for
    name: {{ include "node-feature-discovery.fullname" . }}-prune
is valid. The closing mustache (}}) is correctly placed, and the concatenation with -prune is proper for Helm rendering. The static analysis warning appears to be a false positive.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 4-4: syntax error: expected , but found ''

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater.yaml (7)

1-1: Helm Template Conditional & YAMLlint False Positive
Line 1 starts with a Helm templating conditional ({{- if .Values.topologyUpdater.enable -}}). Note that YAML lint tools may report a syntax error here (“expected the node content, but found '-'”) even though this is valid in a Helm template.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


2-13: DaemonSet Metadata and Dynamic Naming
The metadata section is well structured. It uses helper templates for the name, namespace, and labels (e.g. using "node-feature-discovery.fullname" and "node-feature-discovery.labels"), ensuring consistency. The conditional block for annotations via .Values.topologyUpdater.daemonsetAnnotations adds flexibility.


14-30: DaemonSet Spec & Pod Template Identifiers
The DaemonSet specification and pod template metadata (including the selector and labels) are correctly set up. The inclusion of a checksum annotation for configuration (line 26) is a good practice for triggering pod rollouts when configMaps change.


30-39: Pod Specification: Service Account, DNS Policy, & Image Pull Secrets
The pod spec correctly sets the serviceAccountName and dnsPolicy. The optional inclusion of priorityClassName and the image pull secrets (using the toYaml helper) is implemented cleanly.


43-93: Container Configuration – Topology-Updater
The container named topology-updater is defined with dynamic image references and pull policy. Both liveness and readiness probes use gRPC on a configurable health port, and environment variables (e.g. NODE_NAME and NODE_ADDRESS) are systematically injected. The conditional args (lines 96–105) for sleep interval and namespace watching are clear and sensible.


121-139: Volume Mounts & Host Path Configuration
The volume mounts are carefully defined for resources like the kubelet podresources socket, host system files, and configuration via a ConfigMap. The conditional mount for the kubelet config and state files ensures that only available paths are mounted. Verify that the host paths (e.g. /host-var/lib/kubelet-podresources/kubelet.sock) exist as expected in your target nodes.


144-189: Resource & Scheduling Settings
The lower section (lines 144–189) handles resource requests, security context, node selector, affinity, and tolerations. This provides robust scheduling flexibility. Overall, the template aligns well with Helm best practices for deploying a DaemonSet.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater-crds.yaml (4)

1-1: Helm Template Conditional for CRD Creation
The CRD document is wrapped in a conditional that checks both .Values.topologyUpdater.enable and .Values.topologyUpdater.createCRDs. This ensures that the CRD is only created when intended. Like other Helm templates, initial templating syntax might trigger YAML lint warnings, which can be safely ignored.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


2-9: CRD Metadata and Basic Structure
The metadata (lines 2–9) correctly sets the API version, kind, and includes important annotations (e.g. the API approval and controller-gen version). The CRD name (noderesourcetopologies.topology.node.k8s.io) is also properly defined.


139-272: v1alpha2 Version: Updated Schema and Deprecations
The v1alpha2 version refines the schema by deprecating the topologyPolicies field and adding top-level attributes. This evolution aligns with Kubernetes’ API versioning practices. Confirm that users are aware of these schema changes as they migrate.


278-279: Closing the Helm Block
The file correctly ends the templating block. No issues are apparent here.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/worker.yaml (13)

1-1: Helm Template Conditional for Worker DaemonSet
The worker DaemonSet is conditionally enabled by .Values.worker.enable. Similar to other Helm templates, the templating syntax at the file start might trigger linting warnings, which are expected.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


2-7: Worker DaemonSet Metadata
The metadata section (lines 2–7) uses helper templates for dynamic naming and namespace assignment. The labels correctly assign the role “worker” to this DaemonSet.


8-13: Annotations in Metadata
The annotations are conditionally injected using .Values.worker.daemonsetAnnotations, offering flexibility without hardcoding values.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)


14-20: DaemonSet Spec & Selector for Worker
The DaemonSet’s specification, including the revision history limit and the label selector (using helper functions), is implemented correctly.


21-30: Pod Template Metadata for Worker
Pod-level metadata includes dynamic labels and a checksum annotation for configuration via the nfd-worker-conf ConfigMap. Conditional extra annotations add further customization as needed.


31-39: Pod Specifications: Policies & Secrets
The pod spec defines a DNS policy, optionally a priority class, and imagePullSecrets. The service account name is sourced via a helper, ensuring consistency.


40-42: Security & Network Settings
The security context and host network settings in the pod spec are clearly defined. Double-check that these settings meet both security and network performance expectations in your environment.


43-78: Worker Container Configuration
The container section for worker includes image referencing, a dedicated security context, and comprehensive liveness/readiness probe configurations using gRPC. The feature-gates are dynamically processed in the arguments, which is a versatile approach.


79-91: Environment Variables Injection
Environment variables such as NODE_NAME, POD_NAME, and POD_UID are sourced from the pod spec fields, which is essential for dynamic behavior within the container.


92-111: Container Command & Feature Gate Arguments
The container’s command and arguments leverage a loop to include feature gates dynamically. This design is efficient; ensure that the resultant command-line arguments match the container’s entrypoint expectations.


112-120: Port Definitions for Metrics & Health Checks
Port configurations for metrics and gRPC-health are clearly defined with default values. This is consistent with the topology updater’s approach.


121-180: Volume Mounts and Associated Host Paths
The volume mounts cover a broad range of host system paths (e.g. /host-boot, /host-os-release, /host-sys), and the conditional mount for /host-usr/src is appropriately guarded. Confirm that all host paths exist and are accessible on the target nodes.


181-194: Scheduling and Node Affinity Settings
The final section includes node selectors, affinity, tolerations, and an optional priorityClassName. These settings offer flexible scheduling; ensure they are aligned with your operational requirements.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrolebinding.yaml (6)

1-1: YAMLlint & Template Syntax Note
As with previous files, the templated syntax at the top of the file may trigger YAML lint warnings. This is expected in Helm charts.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


1-16: ClusterRoleBinding for Master Role
The first ClusterRoleBinding is conditionally created based on .Values.master.enable and .Values.master.rbac.create. It correctly binds the master ClusterRole to the appropriate ServiceAccount as defined by the helper template.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


18-19: YAML Document Separator Usage
The use of the document separator (--- on line 19) properly denotes the start of a new resource document within the file.


18-34: ClusterRoleBinding for Topology Updater
This block creates a binding for the topology updater by appending “-topology-updater” to the name and correctly referring to the service account. All labels and templated fields are consistent with the naming conventions established in the chart.


36-37: YAML Document Separator Usage
Another document separator (--- on line 37) is used correctly to separate multiple resources.


36-52: ClusterRoleBinding for Garbage Collection (GC)
The GC binding is conditionally created using the GC flags and binds the GC-specific ClusterRole to its ServiceAccount. The namespace is dynamically set, ensuring proper scope.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrole.yaml (5)

1-1: Helm Template Note for ClusterRole Definition
Like the other templates, the opening templated syntax may raise YAML lint warnings. This is typical for Helm-managed YAML files.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


1-8: Master ClusterRole Metadata
The first ClusterRole (lines 1–8) sets up metadata using helper templates for the name and labels. This promotes consistency across the platform.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


9-58: Master ClusterRole Rules Configuration
The rules in this section comprehensively cover access to namespaces, nodes (and nodes/status), and NFD-specific resources (nodefeatures, nodefeaturerules, and nodefeaturegroups). Coordination lease permissions are also granted. Overall, the rules are well segmented by API group and are appropriate for the master’s functions.


60-102: Topology Updater ClusterRole Rules
The ClusterRole for the topology updater allows access to nodes, namespaces, pods (and nodes/proxy), as well as permissions on noderesourcetopologies in the topology.node.k8s.io API group. The defined verbs (create, get, update) seem appropriate for updating resource topology.


104-140: Garbage Collection ClusterRole Rules
The GC ClusterRole grants permissions for listing, watching, and deleting nodes and node features, as well as managing node resource topologies. This minimal yet sufficient set of permissions helps enforce the principle of least privilege for garbage collection operations.

packages/system/gpu-operator/charts/gpu-operator/templates/_helpers.tpl (3)

1-32: Well-structured Helm template helpers following best practices.

The template functions for chart name, fullname, and chart label generation follow standard Helm best practices. The code properly handles name truncation to 63 characters and suffix trimming to comply with Kubernetes DNS naming requirements. The fullname logic correctly handles cases where release name contains chart name.


34-66: Good implementation of label management.

The labeling system properly follows Kubernetes recommended label standards with app.kubernetes.io prefixes. I like how you've separated common labels, operand-specific labels, and match labels into distinct templates. The inclusion of optional custom labels from Values is a nice flexibility feature.


68-80: Clean implementation of image reference helpers.

The fullimage template helpers provide a consistent way to construct image references throughout the chart. This approach will make image management more maintainable as it centralizes the logic for constructing full image paths.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/_helpers.tpl (3)

1-43: Well-structured NFD helper templates with good namespace flexibility.

The Node Feature Discovery templates follow Helm chart best practices with proper name and fullname handling. The additional namespace override feature (lines 27-36) is particularly useful for multi-namespace deployments in combined charts, providing flexibility for deployment scenarios.


45-63: Clear separation of label concerns.

The templates properly separate common labels from selector labels, which is a good practice for Kubernetes resources. The reuse of the selectorLabels template in the common labels template is efficient and promotes consistency.


65-107: Well-designed service account naming system.

The multiple service account naming templates provide good flexibility:

  • They handle creation/non-creation scenarios
  • They allow for explicit name overrides
  • They follow a consistent pattern across different components (master, worker, topology updater, garbage collector)

This approach will make RBAC configuration cleaner and more maintainable.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 12

🧹 Nitpick comments (33)
packages/system/gpu-operator/charts/gpu-operator/templates/mig_config.yaml (1)

1-1: Address YAMLlint False Positive

The YAML lint error regarding the leading hyphen (reported at line 1) is a known false positive when linting Helm template files. The use of {{- if ...}} is intentional and correct in this context.

If you continue to encounter these warnings during linting, consider configuring your linter to ignore Helm templating syntax or add an inline annotation to suppress the false positive.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/dcgm_exporter_config.yaml (1)

1-1: Clarify YAMLlint Static Analysis Warning

YAMLlint reports a syntax error (expected node content but found '-') on line 1. This appears to be a false positive triggered by Helm templating tags. Consider configuring your linter to ignore or correctly process the Helm template syntax.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/nodefeaturerules.yaml (3)

1-1: Helm Template Conditional and YAMLlint False Positive
The Helm template directive on line 1 is correctly used for conditional inclusion. The YAMLlint error (expected node content but found '-') is likely a false positive caused by Helm templating syntax.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


96-102: Rectify Indentation in the 'NVIDIA CC Enabled' MatchAny Block
There are several indentation issues in the matchAny block of the "NVIDIA CC Enabled" rule:

  • Line 96: Expected 8 spaces but found 7.
  • Line 97: Expected 11 spaces but found 10.
  • Line 102: Expected 11 spaces but found 10.

Please adjust these lines as shown below.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 96-96: wrong indentation: expected 8 but found 7

(indentation)


[warning] 97-97: wrong indentation: expected 11 but found 10

(indentation)


[warning] 102-102: wrong indentation: expected 11 but found 10

(indentation)


107-107: Remove Extra Blank Line
Static analysis flagged an unnecessary blank line at line 107. Removing this extra blank line will improve the overall readability of the file.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 107-107: too many blank lines

(1 > 0) (empty-lines)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml (1)

9-11: Check Indentation within the Template Block
The block using with .Values.prometheus.labels and the subsequent toYaml . | nindent 4 is triggering YAMLlint warnings (expected indentation of 2 instead of 4). Although Helm’s templating engine will render the final YAML with the intended structure, verify that the output YAML is valid. Consider testing with helm lint or adjusting the indent level (e.g., switching to nindent 2 if appropriate) to satisfy both Helm and YAML linting.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 10-10: wrong indentation: expected 2 but found 4

(indentation)


[warning] 11-11: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/serviceaccount.yaml (1)

6-7: Verify Helm Templating and Indentation for Labels
The template on line 6 using {{- include "gpu-operator.labels" . | nindent 4 }} is triggering a YAMLlint syntax error (unexpected '-'). Additionally, YAMLlint reports that the indentation on line 7 is not as expected (found 4 instead of 2). If the use of the control operator ({{-) is intentional to strip whitespace, please double-check that the rendered YAML is valid. Consider adding an inline comment or linter override to clarify this intentional behavior.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/README.md (1)

5-6: Refine Descriptive Text for Clarity
The current phrasing "range of vendor and application specific node labeling needs" can be ambiguous. Consider revising it to "a wide range of vendor-specific and application-specific node labeling needs" to improve grammatical clarity and consistency.

🧰 Tools
🪛 LanguageTool

[grammar] ~5-~5: Possible agreement error. The noun ‘vendor’ seems to be countable; consider using: “range of vendors”.
Context: ...uration and extension points for a wide range of vendor and application specific node labeling ...

(A_COLLECTIVE_OF_NN)


[uncategorized] ~6-~6: When ‘application-specific’ is used as a modifier, it is usually spelled with a hyphen.
Context: ...n points for a wide range of vendor and application specific node labeling needs. See [NFD document...

(SPECIFIC_HYPHEN)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/rolebinding.yaml (2)

1-1: Clarify Helm Templating in the Conditional Block
The templating expression on line 1 ({{- if and .Values.worker.enable .Values.worker.rbac.create }}) is expected to trigger YAMLlint errors because of the leading control operator. This is typical in Helm templates; however, consider adding a comment or lint override to indicate that this syntax is intentional and managed by Helm.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


18-18: Eliminate Extra Blank Line
YAMLlint warns about an extra blank line at line 18. Removing any superfluous blank lines will help maintain consistency with style guidelines.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 18-18: too many blank lines

(1 > 0) (empty-lines)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml (2)

1-1: Acknowledge Helm Template Conditional Syntax
The conditional block starting on line 1 ({{- if .Values.worker.enable }}) is causing YAMLlint to report a syntax error. This is expected in Helm templates. It might be useful to document that these errors can be safely ignored or to configure the linter accordingly.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


7-8: Review Label Inclusion Indentation
On line 8, the inclusion of labels with {{- include "node-feature-discovery.labels" . | nindent 4 }} is sensitive to whitespace and indentation. Please verify that the rendered output maintains the proper indentation expected by Kubernetes.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-topologyupdater-conf.yaml (2)

1-1: Validate Conditional Block Syntax in Helm Template
The templating statement on line 1 ({{- if .Values.topologyUpdater.enable -}}) may trigger YAMLlint errors due to the use of the leading and trailing control operators. This is standard in Helm templates; however, it would be helpful to add a comment or use a linter override so that maintainers understand this is intentional.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


7-8: Ensure Correct Label Indentation
Similarly to the worker ConfigMap, the label inclusion on line 8 using {{- include "node-feature-discovery.labels" . | nindent 4 }} must result in correctly indented YAML. Double-check that the rendered labels align appropriately in the metadata.

packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml (1)

5-7: Helm Templating & Indentation Warning
The use of the Helm templating function with nindent 4 is triggering a YAML lint warning (expected indentation of 2 instead of 4) and an error on line 6 ("expected the node content, but found '-'"). These warnings are likely false positives caused by Helm’s whitespace control. However, please run helm template and helm lint on the rendered output to ensure the final YAML is valid.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrole.yaml (1)

5-7: Helm Templating & Indentation Reminder
Similar to the Role YAML, the labels section using {{- include "gpu-operator.labels" . | nindent 4 }} is triggering YAML lint warnings (line 7) and possibly a syntax error (line 6). Verify the rendered YAML using helm template to ensure these templating functions do not cause downstream issues.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/cleanup_crd.yaml (2)

1-1: Helm Directive in File Start
The very first line ({{- if .Values.operator.cleanupCRD }}) triggers a YAML lint error because the linter does not expect a templating directive at the start of the file. Although this is common in Helm charts, ensure that when rendered the file’s content is syntactically correct.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


19-20: Indentation in Labels Block
Static analysis warns that line 20 (app.kubernetes.io/component: "gpu-operator") is indented with 8 spaces while an indentation of 6 spaces is expected. Check if adjusting the nindent value (or otherwise modifying the indentation) improves clarity while maintaining the intended YAML structure after templating.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 20-20: wrong indentation: expected 6 but found 8

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/operator.yaml (1)

5-8: Metadata Templating Caution
Similar YAML lint issues with templating appear in the labels section (line 6 with nindent 4). While this is typical for Helm charts, please verify the rendered output with helm template to ensure that label indentation meets Kubernetes’ schema requirements.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/master.yaml (1)

1-3: Helm Template Directive & YAML Lint Warning
The first line uses a Helm templating directive ({{- if .Values.master.enable }}) which may trigger YAMLlint errors (e.g. “expected the node content, but found '-'”). This is expected in Helm charts; just ensure that linting is performed on the rendered output.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/nvidiadriver.yaml (1)

1-3: Helm Template in CRD Definition
The file begins with a Helm templating directive ({{- if and .Values.driver.nvidiaDriverCRD.enabled .Values.driver.nvidiaDriverCRD.deployDefaultCR }}) which may confuse YAML linters. This is standard for Helm charts; ensure that integration tests render the template correctly and that all value keys (e.g. for repository, image, version) have proper defaults.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/upgrade_crd.yaml (2)

1-3: Helm Hook Template & YAML Render Concerns
The file starts with a conditional Helm directive ({{- if .Values.operator.upgradeCRD }}) that may cause YAMLlint to report syntax errors. As with other Helm templates, ensure that the rendered YAML (after processing template directives) is valid.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


81-88: Container Command & CRD Application Commands
The container’s command section (lines 85–93) uses a multi-line shell command to apply various CRDs using kubectl. Verify that the commands execute sequentially as intended, and consider error handling (or additional logging) if one of the commands fails.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/role.yaml (1)

1-3: Helm Template Directive in Role Definition
The file again begins with a Helm templating directive ({{- if and .Values.worker.enable .Values.worker.rbac.create }}) which might trigger YAML lint warnings. This is normal in Helm charts; ensure that the rendered Role manifests have the correct structure and indentation.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/crds/nvidia.com_nvidiadrivers.yaml (2)

1-10: New CRD Definition and Metadata Setup

The CRD for NVIDIADriver (and its list kind) is comprehensively defined with appropriate group, names, and version settings. The inclusion of the controller-gen.kubebuilder.io/version annotation ensures version traceability. Make sure that your immutability validations (e.g. for driverType and usePrecompiled) are well documented and backed by tests.


792-802: Status Field and State Enumeration

The status section is detailed with a conditions list and an enumeration for state (values: ignored, ready, notReady). The placeholder comment ("INSERT ADDITIONAL STATUS FIELD – define observed state of cluster") indicates an intentional reminder to further define status fields. This should be addressed in a follow-up to ensure clarity when reporting the CRD’s runtime state.

packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml (2)

9-13: Metadata and Annotations in SCC

The metadata labels and annotations are clearly defined to explain the security posture enforced (read-only root filesystem, UID allocation, and SELinux context requirements). However, YAML linting flagged trailing spaces in these lines—please remove any extraneous spaces to ensure strict YAML compliance.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 10-10: trailing spaces

(trailing-spaces)


40-40: Fix Trailing Spaces

Static analysis has detected trailing spaces (e.g. on line 40). Please remove any trailing whitespace to ensure the YAML passes linting without syntax errors.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 40-40: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml (1)

5-7: Fix YAML Indentation in Metadata

Static analysis warnings indicate indentation issues (e.g. "[warning] 7-7: wrong indentation: expected 2 but found 4"). Review the use of nindent in the labels block to ensure proper indentation in the final rendered YAML.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/post-delete-job.yaml (1)

1-95: Post-Delete Job Template: Validate YAML Rendering
The Helm template here defines the ServiceAccount, ClusterRole, ClusterRoleBinding, and Job for the prune task with the appropriate post-delete hook annotations. Note that YAMLlint has flagged some indentation and spacing warnings (e.g. around lines 4, 54, 66, 70, 76, and 78). These warnings may be false positives due to templating; please run helm lint to verify the rendered output.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 4-4: syntax error: expected , but found ''

(syntax)


[warning] 54-54: too many spaces after colon

(colons)


[warning] 66-66: wrong indentation: expected 6 but found 8

(indentation)


[warning] 70-70: wrong indentation: expected 6 but found 8

(indentation)


[warning] 76-76: wrong indentation: expected 10 but found 12

(indentation)


[warning] 78-78: wrong indentation: expected 10 but found 12

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater.yaml (1)

1-189: Topology Updater DaemonSet Template Review
This DaemonSet template for the topology updater is well structured and conditionally rendered based on the Helm values. It carefully configures probes, environment variables, and volume mounts. The opening conditional (line 1) may trigger YAML lint errors in non-Helm contexts; ensure the chart is validated with helm lint so that the rendered YAML is correct.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/worker.yaml (2)

1-1: Helm Template Directive is Expected
The conditional block starting with {{- if .Values.worker.enable }} on line 1 is standard in Helm templates. YAML linters might flag this as a syntax error even though it’s valid in the templating context.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


9-9: Review Indentation in Labels Block
The label line role: worker (line 9) shows a warning regarding indentation (expected 2 spaces but found 4). Please verify that, after template rendering, the YAML structure remains valid. You might consider using a consistent nindent function call to align the labels properly.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 78af5e2 and 68eb9a2.

⛔ Files ignored due to path filters (1)
  • packages/system/gpu-operator/charts/gpu-operator/Chart.lock is excluded by !**/*.lock
📒 Files selected for processing (47)
  • packages/core/platform/bundles/paas-full.yaml (1 hunks)
  • packages/system/gpu-operator/Chart.yaml (1 hunks)
  • packages/system/gpu-operator/Makefile (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/.helmignore (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/Chart.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/.helmignore (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/Chart.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/README.md (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/crds/nfd-api-crds.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/_helpers.tpl (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrole.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/master.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-gc.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-master-conf.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-topologyupdater-conf.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/post-delete-job.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/role.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/rolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/serviceaccount.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater-crds.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/worker.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/values.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/crds/nvidia.com_nvidiadrivers.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/_helpers.tpl (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/cleanup_crd.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/clusterrole.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/clusterrolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/dcgm_exporter_config.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/mig_config.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/nodefeaturerules.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/nvidiadriver.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/operator.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/plugin_config.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/serviceaccount.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/upgrade_crd.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/values.yaml (1 hunks)
  • packages/system/gpu-operator/values-talos.yaml (1 hunks)
  • packages/system/gpu-operator/values.yaml (1 hunks)
  • packages/system/kubevirt/templates/kubevirt-cr.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (9)
  • packages/system/kubevirt/templates/kubevirt-cr.yaml
  • packages/system/gpu-operator/values.yaml
  • packages/system/gpu-operator/Chart.yaml
  • packages/system/gpu-operator/values-talos.yaml
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/.helmignore
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/Chart.yaml
  • packages/core/platform/bundles/paas-full.yaml
  • packages/system/gpu-operator/charts/gpu-operator/.helmignore
  • packages/system/gpu-operator/charts/gpu-operator/Chart.yaml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/values.yaml

[warning] 137-137: wrong indentation: expected 6 but found 8

(indentation)


[warning] 140-140: wrong indentation: expected 12 but found 14

(indentation)


[warning] 146-146: wrong indentation: expected 12 but found 14

(indentation)


[error] 149-149: trailing spaces

(trailing-spaces)


[error] 529-529: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/master.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/operator.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrole.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-gc.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/upgrade_crd.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 68-68: wrong indentation: expected 6 but found 8

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/nvidiadriver.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 10-10: trailing spaces

(trailing-spaces)


[error] 40-40: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater-crds.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/post-delete-job.yaml

[error] 4-4: syntax error: expected , but found ''

(syntax)


[warning] 54-54: too many spaces after colon

(colons)


[warning] 66-66: wrong indentation: expected 6 but found 8

(indentation)


[warning] 70-70: wrong indentation: expected 6 but found 8

(indentation)


[warning] 76-76: wrong indentation: expected 10 but found 12

(indentation)


[warning] 78-78: wrong indentation: expected 10 but found 12

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/worker.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrolebinding.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-master-conf.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-topologyupdater-conf.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 10-10: wrong indentation: expected 2 but found 4

(indentation)


[warning] 11-11: wrong indentation: expected 2 but found 4

(indentation)


[warning] 21-21: wrong indentation: expected 6 but found 4

(indentation)


[warning] 24-24: wrong indentation: expected 6 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/role.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/rolebinding.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 18-18: too many blank lines

(1 > 0) (empty-lines)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/serviceaccount.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/cleanup_crd.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 20-20: wrong indentation: expected 6 but found 8

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrole.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrolebinding.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/dcgm_exporter_config.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/mig_config.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/nodefeaturerules.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 26-26: wrong indentation: expected 8 but found 6

(indentation)


[warning] 34-34: wrong indentation: expected 8 but found 6

(indentation)


[warning] 43-43: wrong indentation: expected 8 but found 6

(indentation)


[warning] 96-96: wrong indentation: expected 8 but found 7

(indentation)


[warning] 97-97: wrong indentation: expected 11 but found 10

(indentation)


[warning] 102-102: wrong indentation: expected 11 but found 10

(indentation)


[warning] 107-107: too many blank lines

(1 > 0) (empty-lines)

packages/system/gpu-operator/charts/gpu-operator/templates/plugin_config.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 11-11: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/serviceaccount.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

🪛 LanguageTool
packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/README.md

[grammar] ~5-~5: Possible agreement error. The noun ‘vendor’ seems to be countable; consider using: “range of vendors”.
Context: ...uration and extension points for a wide range of vendor and application specific node labeling ...

(A_COLLECTIVE_OF_NN)


[uncategorized] ~6-~6: When ‘application-specific’ is used as a modifier, it is usually spelled with a hyphen.
Context: ...n points for a wide range of vendor and application specific node labeling needs. See [NFD document...

(SPECIFIC_HYPHEN)

🔇 Additional comments (65)
packages/system/gpu-operator/charts/gpu-operator/templates/mig_config.yaml (3)

1-1: Ensure Correct Helm Templating Conditional Syntax

The conditional on line 1 uses Helm templating correctly to check that both the migManager.config.create flag is set and that the migManager.config.data is non-empty. This ensures the ConfigMap is created only when valid data is provided.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


2-9: Verify ConfigMap Definition and Dynamic Data Population

The ConfigMap definition (lines 2–9) adheres to the expected structure:

  • The API version (v1) and kind (ConfigMap) are correctly specified.
  • Dynamic metadata fields such as name ({{ .Values.migManager.config.name }}) and namespace ({{ .Release.Namespace }}) are set as intended.
  • The labels are populated using the included helper template, and the data is converted from YAML with proper indentation using toYaml ... | nindent 2.
    This implementation properly leverages Helm templating for dynamic configuration.

10-10: Check Templating Block Closure

The templating block is correctly closed with {{- end }} on line 10, which safely concludes the conditional rendering.

packages/system/gpu-operator/charts/gpu-operator/templates/dcgm_exporter_config.yaml (3)

1-2: Ensure Conditional ConfigMap Creation is Thoroughly Guarded

The conditionals correctly verify that a configuration exists (.Values.dcgmExporter.config), the create flag is set, and the data field is non-empty before instantiating the ConfigMap. This prevents accidental resource creation when the configuration is missing or incomplete.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


3-7: Validate ConfigMap Metadata Setup

The apiVersion, kind, and metadata (including name and namespace) are assembled appropriately using Helm templating constructs. Using {{ .Values.dcgmExporter.config.name }} and {{ .Release.Namespace }} ensures that the ConfigMap aligns with dynamic deployment context.


8-12: Confirm Label Inclusion and Data Formatting

The labels are injected via the helper template ({{- include "gpu-operator.labels" . | nindent 4 }}) and the data block for dcgm-metrics.csv is properly indented using nindent 4. This approach should produce valid YAML output as long as the helper template returns correctly formatted labels.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml (1)

1-1: Helm Templating Directive Context
The {{- if .Values.prometheus.enable }} directive is a standard Helm template conditional. Be aware that standard YAML linters may flag this line as a syntax error because they do not process Helm templating.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/plugin_config.yaml (1)

1-1:

Details

✅ Verification successful

Resolve Templating Syntax and Trailing Spaces in ConfigMap Template

Static analysis indicates a syntax error at line 1—likely due to the leading whitespace control operator ({{-) in the conditional—and trailing spaces at the end of the file (line 11). This can be improved by removing the dash on the opening if statement and cleaning up any trailing spaces.

-{{- if and (.Values.devicePlugin.config.create) (not (empty .Values.devicePlugin.config.data)) }}
+{{ if and (.Values.devicePlugin.config.create) (not (empty .Values.devicePlugin.config.data)) }}

Also, please remove any trailing spaces (e.g., on line 11).

Also applies to: 11-11


Resolve Templating Syntax & Remove Trailing Spaces

In the file packages/system/gpu-operator/charts/gpu-operator/templates/plugin_config.yaml, please update the template as follows:

  • Line 1: Replace the opening tag to remove the whitespace control operator. Change
    {{- if and (.Values.devicePlugin.config.create) (not (empty .Values.devicePlugin.config.data)) }}
    to
    {{ if and (.Values.devicePlugin.config.create) (not (empty .Values.devicePlugin.config.data)) }}
  • Line 11: Remove any trailing spaces.

This adjustment resolves the static analysis warning regarding templating syntax and ensures that no extraneous whitespace remains in the file.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml (1)

8-85: Role Rules Structure Check
The rules for various API groups and resources are comprehensive and well organized. Ensure that the trailing content after line 84 (or the extra "85" marker) does not inadvertently result in an empty or malformed YAML node.

packages/system/gpu-operator/Makefile (3)

1-4: Makefile Variables and Exports
The variable definition using awk (with proper escaping via $$) and the export of NAME and NAMESPACE follow expected Makefile conventions. Please double-check that the referenced file (charts/cilium/Chart.yaml) exists and that the output of the awk command meets expectations.


6-7: Including Shared Makefiles
The inclusion of common-envs.mk and package.mk appears to be appropriate for sharing environment settings and packaging rules. No issues identified.


9-13: Update Target Implementation
The update target cleanly removes the existing charts directory, adds the NVIDIA Helm repository, updates it, and pulls the GPU operator chart using Helm. This target is straightforward and meets the intended purpose.

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrole.yaml (1)

143-155: Conditional Cleanup for CRDs
The conditional inclusion of the delete verb based on .Values.operator.cleanupCRD is a neat use of Helm templating. Verify that the conditional block indents correctly after templating so that the list of verbs remains valid YAML.

packages/system/gpu-operator/charts/gpu-operator/templates/cleanup_crd.yaml (1)

37-44: Command Block in Cleanup Container
The multiline command in the container definition is clearly structured and leverages Helm conditionals for optional extra deletion commands (for NFD). Ensure that the use of the block scalar with > preserves the intended command formatting when the template is rendered.

packages/system/gpu-operator/charts/gpu-operator/templates/operator.yaml (7)

17-24: Annotations and Labels under Pod Metadata
The pod metadata correctly uses templating for injecting labels and annotations. Ensure that the toYaml call for annotations (line 23) returns a properly indented YAML map compatible with Kubernetes metadata.


26-31: Image Pull Secrets Block
The conditional block for imagePullSecrets is well structured using range. No issues noted; just ensure that the secrets are defined properly in the values file when they are expected.


35-51: Container Configuration and Conditional Logging Args
The container specification for gpu-operator is comprehensive. The use of conditionals for devel mode (--zap-devel) versus production logging options (time encoding and level) is handled cleanly. Test that the generated command-line arguments form a valid list when the values are provided, as misconfigured logging flags can lead to unexpected behavior at runtime.


53-64: Environment Variables & Volume Mounts
The environment variables (including the dynamic OPERATOR_NAMESPACE from the pod field reference) and volume mounts for accessing /etc/os-release are correctly configured.


65-76: Liveness and Readiness Probes
The health probes are well defined, with reasonable delays and timeouts. These settings appear to align with common practices for Kubernetes Deployments.


77-84: Resource and Port Configurations
The conditional inclusion of resource requests/limits using toYaml is neatly integrated. The definition of the metrics port is also properly set.


85-99: Node Selectors, Affinity, and Tolerations
The final blocks correctly pull node selection strategies, affinity rules, and tolerations from values. Ensure that their rendered output maintains proper YAML indentation.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/master.yaml (2)

4-13: Metadata & Annotations Block
The metadata section (lines 4–13) correctly uses conditional inclusion for deployment annotations. Please double-check that the included labels and annotations (using include and toYaml) render with the expected indentation when the template is rendered.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)


45-64: Container Probe Configurations
The container configuration (lines 45–64) for startup, liveness, and readiness probes with gRPC settings is comprehensive. Verify that the default port values and delay/timeout parameters in .Values.master.*Probe.* are set consistently with operational expectations.

packages/system/gpu-operator/charts/gpu-operator/templates/nvidiadriver.yaml (1)

60-67: Conditional Configuration Blocks
The CRD includes several conditional blocks (for annotations, labels, nodeSelector, imagePullSecrets, manager, etc.). Verify that these sections are activated only when their corresponding values are provided in the values file. This will ensure a flexible CRD configuration for different deployment scenarios.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/role.yaml (1)

9-24: Role Rules Configuration
The Role’s rules (lines 9–24) grant access to nodefeatures in the nfd.k8s-sigs.io API group and allow read access for pods. The structure is correct; however, double-check that the leading dashes for list items are correctly indented relative to rules: when rendered. This will help avoid potential YAML parsing issues.

packages/system/gpu-operator/charts/gpu-operator/values.yaml (4)

1-7: Default GPU Operator Configuration: Platform and NFD

The initial sections set up the platform configuration and Node Feature Discovery (NFD) settings in a clear and well-commented manner. These defaults appear sensible; just confirm they align with your target deployment environment.


12-18: CDI and Sandbox Workloads Settings

The configuration for CDI (Container Device Interface) and sandbox workloads is neat and self-explanatory. Verify that the chosen default values (e.g. defaultWorkload: "container") match your operational expectations.


23-30: HostPaths Configuration

The hostPaths section documents critical paths (rootFS and driverInstallDir) clearly. Ensure that the runtime environment provides the necessary permissions and that these values remain consistent with your host's filesystem structure.


35-51: Daemonsets and Validator Configuration

The sections for daemonsets, including labels, annotations, tolerations, and update strategies, are well structured. Make sure the image repositories and pull policies (as defined later in the file) conform to your cluster’s security guidelines.

packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml (2)

1-1: Template Conditional Rendering

The conditional check {{- if .Values.platform.openshift }} is appropriately used to include this SecurityContextConstraints (SCC) template only in OpenShift environments. Confirm that your values correctly toggle this behavior.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


14-19: SCC Security Settings

The security settings disable host IPC, network, PID, and related capabilities while allowing controlled privilege escalation. These settings are appropriate for a restrictive SCC. Verify that they meet your operational and security requirements.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-gc.yaml (6)

1-1: Conditional Deployment for GC

The Deployment is wrapped in a conditional ({{- if and .Values.gc.enable -}}) that correctly controls its inclusion. Ensure that the value provided for .Values.gc.enable is consistent with your intended deployment behavior.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


2-13: Deployment Metadata and Annotations

The metadata block leverages templated inclusions (for name, namespace, and labels) and conditionally includes deployment annotations using toYaml. This approach promotes consistency across resources—just verify that the included templates (e.g. "node-feature-discovery.labels") render the expected labels.


14-30: Deployment Spec and Selector

The Deployment spec uses templated values for replica count and revision history limit, and its selector labels (with the additional role: gc) are appropriately defined. Confirm that these values suit your scaling and update strategies.


31-39: Pod Security and Networking

The pod template specifies the service account, DNS policy (ClusterFirstWithHostNet), priority class, and image pull secrets dynamically. The security context imported from .Values.gc.podSecurityContext adds consistency to your security posture. Ensure these settings are intentional.


40-75: Container Configuration for GC

The container configuration details the image composition, pull policy, and environment variables—including dynamic injection of the node name. The conditional inclusion of GC interval arguments is a nice touch. Verify that resource requests, security restrictions (e.g. no privilege escalation and read-only root filesystem), and the metrics port configuration meet the expected operational parameters.


76-87: Node Scheduling Constraints

The templated sections for nodeSelector, affinity, and tolerations are implemented using toYaml and provide the needed flexibility for scheduling. Double-check that these constraints effectively target the intended nodes in your cluster.

packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml (8)

1-13: ClusterPolicy Metadata and Conditional Annotations

The ClusterPolicy resource is defined with the appropriate API version and kind. The conditional injection of the "helm.sh/resource-policy": keep annotation (when operator.cleanupCRD is true) is a smart safeguard to prevent duplicate deletions. Verify that this cleanup logic is thoroughly tested.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)


15-26: Spec HostPaths and Operator Configuration

The spec block’s hostPaths and operator sections dynamically incorporate values such as rootFS, driverInstallDir, runtimeClass, and defaultGPUMode. This flexible design helps tailor the deployment. Confirm that these templated defaults are in line with your infrastructure.


46-64: Daemonsets Settings

The configuration for daemonsets includes templated labels, annotations, tolerations, priority class, update strategy, and rolling update settings. Using toYaml here ensures proper formatting. Verify that these settings reflect your desired update behavior for GPU-related pods.


65-88: Validator Component Configuration

The validator section covers multiple sub-fields such as repository, image, version (with a fallback to .Chart.AppVersion), image pull policy, secrets, resources, environment variables, and even plugin configurations. This thoroughness is commendable; just ensure that every conditional block renders correctly in your helm templates.


131-139: MIG, PSA, and CDI Configuration

The inclusion of MIG strategy, PSA enablement, and CDI settings is succinct and clear. These flags are critical to driver installation and resource management—confirm that their defaults align with your operational intent.


140-234: Driver Configuration and Upgrade Policy

The driver section is extensive, covering enablement flags, CRD usage, kernel module types, precompiled package options, and a detailed upgrade policy. The structured approach here facilitates granular control during driver upgrades. Ensure that numeric values (e.g. in upgradePolicy) are quoted or cast appropriately to avoid type issues in YAML.


235-345: Enhanced Operator Components Configuration

The subsequent blocks for components like vgpuManager, kataManager, vfioManager, and others are modular and follow a consistent templating style. It’s important to verify the interdependencies among these components (e.g., driver managers within vGPU or VFIO sections) through integration tests.


346-681: Comprehensive ClusterPolicy Specification for GPU Operator

The remaining portion of the file covers a wide array of configurations—from device plugins and DCGM (Data Center GPU Manager) to GFD, migManager, nodeStatusExporter, and sandbox-specific settings. The extensive use of conditional templating and toYaml ensures flexibility. Given the file’s complexity, thorough testing and validation against the Kubernetes API schema are recommended to ensure all optional fields and nested configurations render as expected.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/crds/nfd-api-crds.yaml (3)

1-123: NodeFeature CRD Definition Looks Solid
The NodeFeature CRD provides a comprehensive schema with detailed descriptions for its fields. Ensure that any custom processing of the raw feature data is documented in your operator’s docs.


124-392: NodeFeatureGroup CRD Defines Grouping Rules Clearly
The NodeFeatureGroup CRD is well structured, offering clear specifications for grouping rules and status reporting. Consider adding usage examples in the documentation to assist operators in leveraging this resource effectively.


395-712: NodeFeatureRule CRD is Well-Structured and Comprehensive
The NodeFeatureRule CRD thoroughly defines configuration rules for customizing node objects, including annotations, labels, taints, and variable templating. Verify that the cluster-scoped nature of this CRD is intentional and documented since it differs from the others.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrole.yaml (3)

1-59: Master ClusterRole Configuration is Comprehensive
The master ClusterRole grants permissions for namespaces, nodes, and NFD-specific resources (including coordination leases for leader election). Confirm that these permissions adhere to the principle of least privilege and are fully in line with your operator’s security policies.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


60-102: Topology Updater ClusterRole is Appropriately Scoped
The ClusterRole for the topology updater covers access to nodes, namespaces, and specialized resources (like node proxies and pod access). Ensure that the corresponding Helm value conditions are well documented so that operators know when this role is created.


104-141: Garbage Collection ClusterRole Defined Correctly
The GC-related ClusterRole provides the necessary permissions to list, watch, and delete relevant node features and topologies. Review these permissions periodically to ensure they remain consistent with any evolving security policies.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/worker.yaml (1)

1-196: Worker DaemonSet Template Looks Detailed and Functional
Overall, the worker DaemonSet template is comprehensive—it configures security contexts, liveness/readiness probes, resource limits, environment variables, and volume mounts accurately. Verify that all referenced Helm values (e.g. image repository, tag defaults, probe settings) are correctly defined in your values files.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrolebinding.yaml (3)

1-16: Well-structured master ClusterRoleBinding with proper conditionals

The ClusterRoleBinding for the master component is properly conditional on both .Values.master.enable and .Values.master.rbac.create, ensuring it will only be created when both conditions are met. The binding uses appropriate helper templates for consistent naming and labeling.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


18-34: Topology updater ClusterRoleBinding follows best practices

The ClusterRoleBinding for the topology updater component follows the same pattern as the master component, with appropriate conditional logic. The suffix -topology-updater helps distinguish this binding while maintaining naming consistency with the corresponding ClusterRole.


36-52: Garbage collector ClusterRoleBinding is well-defined

This ClusterRoleBinding for the garbage collector component is correctly conditional and follows the established pattern. All three bindings in this file maintain a consistent structure, making the template easy to understand and maintain.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater-crds.yaml (4)

1-10: CRD creation properly conditional with appropriate annotations

The NodeResourceTopology CRD is correctly conditional based on topology updater enablement and CRD creation flag. The metadata includes important annotations such as API approval reference and controller-gen version, following Kubernetes best practices.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


11-139: Well-defined v1alpha1 schema with comprehensive property details

The v1alpha1 schema for NodeResourceTopology is thorough and well-documented. It includes detailed descriptions for all properties and proper validation constraints. Note that this version has the topologyPolicies field as a required field, while it's deprecated in v1alpha2.


139-272: v1alpha2 schema appropriately handles API evolution

The v1alpha2 schema correctly marks topologyPolicies as deprecated while maintaining backward compatibility. This version also removes it from the required fields list (line 268), showing proper API evolution. Setting storage: true for this version indicates it's the preferred storage version.


272-278: Status field initialization follows CRD standard

The status field initialization with empty values for acceptedNames and storedVersions follows the standard pattern for CRDs. This section will be managed by the Kubernetes API server once the CRD is applied.

packages/system/gpu-operator/charts/gpu-operator/templates/_helpers.tpl (3)

1-33: Core helper functions follow Helm best practices

The basic helper functions for name, fullname, and chart follow Helm best practices. They properly handle name overrides, truncation to 63 characters to comply with Kubernetes limits, and appropriate formatting for chart labels.


34-67: Label helper functions provide consistent labeling

The label helper functions ensure consistent labeling across resources. The inclusion of conditional labels from values (lines 46-48 and 54-56) allows for additional custom labels while maintaining the required standard labels. The matchLabels function appropriately includes only the subset of labels typically used in selectors.


68-80: Image helper functions enable flexible image configuration

The image helper functions for the GPU operator and driver manager construct full image references from component parts (repository, image name, version). This approach gives users flexibility to configure each part independently while maintaining a consistent pattern.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/_helpers.tpl (3)

1-44: Core NFD helper functions well-documented and implemented

The name, fullname, namespace, and chart helper functions are well-documented and follow Helm conventions. The namespace function (lines 30-36) adds flexibility by allowing namespace override, which is useful for multi-namespace deployments.


45-64: Label functions provide consistent resource identification

The labels and selectorLabels functions ensure consistent labeling across NFD resources. The separation of selectorLabels is a good practice, as it provides the minimal set of labels needed for selectors while the full labels function includes additional metadata like version and managed-by.


65-107: Service account name functions handle multiple components elegantly

The service account name helper functions for different components (master, worker, topology updater, and garbage collector) follow a consistent pattern. Each properly handles both cases where service accounts are created by the chart or externally provided. The default naming conventions with component-specific suffixes (e.g., -worker, -topology-updater) ensure clear distinction between components.

labels:
sev.snp.enabled: "true"
matchFeatures:
- feature: cpu.security

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Adjust Indentation for SEV-SNP Rule’s List Item
The list item under matchFeatures: in the SEV-SNP rule (line 26) should be indented with 8 spaces instead of 6 to conform with YAML list formatting.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 26-26: wrong indentation: expected 8 but found 6

(indentation)

labels:
sev.es.enabled: "true"
matchFeatures:
- feature: cpu.security

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix Indentation for SEV-ES Rule’s List Item
The list item under matchFeatures: in the SEV-ES rule (line 34) is currently indented with 6 spaces. Please adjust the indentation to 8 spaces.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 34-34: wrong indentation: expected 8 but found 6

(indentation)

sev_asids: '@cpu.security.sev.asids'
sev_es: '@cpu.security.sev.encrypted_state_ids'
matchFeatures:
- feature: cpu.security

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Correct Indentation in SEV System Capacities Rule
The list item at line 43 under matchFeatures: in the SEV system capacities rule should be indented by 8 spaces instead of 6.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 43-43: wrong indentation: expected 8 but found 6

(indentation)

Comment on lines +19 to +21
namespaceSelector:
matchNames:
- {{ include "node-feature-discovery.namespace" . }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

❓ Verification inconclusive

Incorrect Indentation for List Item under NamespaceSelector
YAMLlint reports that the list item on line 21 under matchNames: is indented with 4 spaces, while the expected indentation is 6 spaces. Adjusting the indentation will help ensure the generated YAML is structured correctly. For example:

-    - {{ include "node-feature-discovery.namespace" . }}
+      - {{ include "node-feature-discovery.namespace" . }}

Fix YAML Indentation for List Item Under NamespaceSelector

YAMLlint indicates that the list item under matchNames: is indented incorrectly. The dash should be indented two spaces further than the key. Please update the indentation as follows:

  • File: packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml (lines 19–21)
  • Change:
    -    - {{ include "node-feature-discovery.namespace" . }}
    +      - {{ include "node-feature-discovery.namespace" . }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
namespaceSelector:
matchNames:
- {{ include "node-feature-discovery.namespace" . }}
namespaceSelector:
matchNames:
- {{ include "node-feature-discovery.namespace" . }}
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 21-21: wrong indentation: expected 6 but found 4

(indentation)

Comment on lines +22 to +25
selector:
matchExpressions:
- {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
- {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Incorrect Indentation for List Items under matchExpressions
The list items for matchExpressions (lines 24 and 25) are indented with 4 spaces, but YAMLlint expects these to be indented to 6 spaces relative to the parent key. Ensuring proper indentation here is crucial for valid YAML. For example:

-    - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
-    - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}
+      - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
+      - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}

Below is a shell script to verify the actual indentation on the affected lines. Running this script will display the leading spaces for lines 22–25 in the file so you can confirm whether the list items are indented with 4 spaces (as currently observed) rather than the expected 6 spaces:


Attention: YAML Indentation Correction Required

  • File: packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml (lines 22–25)
  • Issue: The list items under matchExpressions are indented with 4 spaces instead of the 6 spaces expected by YAMLlint.
  • Recommended Change:
    -    - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
    -    - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}
    +      - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
    +      - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}

Please update the file accordingly to ensure the YAML is valid.


🏁 Script executed:

#!/bin/bash
FILE="packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml"
echo "Displaying indentation details for lines 22-25 in $FILE:"
sed -n '22,25p' "$FILE" | while IFS= read -r line; do
    # Count leading spaces
    count=$(echo "$line" | sed -E 's/^([ ]*).*/\1/' | wc -c)
    count=$((count - 1))  # Adjust for the newline
    echo "Leading spaces: $count | $line"
done

Length of output: 1939


Attention: YAML Indentation Correction Required

The list items under matchExpressions in
packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml
(lines 24 and 25) are currently indented with 4 spaces. However, YAMLlint expects these to be indented to 6 spaces.

Issue Identified:

  • matchExpressions: is at 4 spaces, so its list items should be indented 2 additional spaces (i.e., 6 spaces total) rather than the current 4.

Recommended Change:

-    - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
-    - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}
+      - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
+      - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}

Please update the file accordingly to meet YAMLlint's indentation requirements.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
selector:
matchExpressions:
- {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
- {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}
selector:
matchExpressions:
- {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
- {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 24-24: wrong indentation: expected 6 but found 4

(indentation)

@@ -0,0 +1,58 @@
{{- if and .Values.master.enable .Values.master.serviceAccount.create }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

❓ Verification inconclusive

Resolve YAML Templating Syntax Error in Conditional Block

The linter flags a syntax error on line 1 because of the use of the {{- directive. This pattern appears in several conditional blocks. Updating the opening directive by removing the dash can help ensure compatibility with YAML validators.

-{{- if and .Values.master.enable .Values.master.serviceAccount.create }}
+{{ if and .Values.master.enable .Values.master.serviceAccount.create }}

Action Required: Update YAML Template Directive to Address Linter Error

  • The linter currently flags the use of the {{- directive on line 1 as a syntax error.
  • To ensure compatibility with YAML validators, update the conditional block to remove the trim indicator.
-{{- if and .Values.master.enable .Values.master.serviceAccount.create }}
+{{ if and .Values.master.enable .Values.master.serviceAccount.create }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{- if and .Values.master.enable .Values.master.serviceAccount.create }}
{{ if and .Values.master.enable .Values.master.serviceAccount.create }}
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

@@ -0,0 +1,12 @@
{{- if .Values.master.enable }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

❓ Verification inconclusive

Fix Templating Directive to Resolve YAML Syntax Error

On line 1, the conditional starts with {{- if .Values.master.enable }} which the linter flags as a syntax error. Removing the dash should resolve this issue and allow the YAML to be properly parsed.

-{{- if .Values.master.enable }}
+{{ if .Values.master.enable }}

Templating Directive Fix Needed: Remove Whitespace-Trim Dash

The linter reports a YAML syntax error on line 1 caused by using the dash with the conditional directive. Please update the directive as follows to correct the error:

  • Location:
    packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-master-conf.yaml (Line 1)

  • Change:

    -{{- if .Values.master.enable }}
    +{{ if .Values.master.enable }}

This update should resolve the YAML parsing issue flagged by the linter.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{- if .Values.master.enable }}
{{ if .Values.master.enable }}
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

Comment on lines +137 to +147
- weight: 1
preference:
matchExpressions:
- key: "node-role.kubernetes.io/master"
operator: In
values: [""]
- weight: 1
preference:
matchExpressions:
- key: "node-role.kubernetes.io/control-plane"
operator: In

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

YAML Indentation & Trailing Space Warnings
Static analysis reports several indentation warnings (e.g. expected indentations of 6 or 12 spaces) and a trailing space at line 149. While comments and nested YAML blocks in Helm values files can be sensitive to whitespace, please review and correct these issues to ensure that the rendered YAML is free of formatting errors.
For instance, remove any trailing spaces on the affected lines and adjust the indentation for blocks (lines 137, 140, and 146) where necessary.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 137-137: wrong indentation: expected 6 but found 8

(indentation)


[warning] 140-140: wrong indentation: expected 12 but found 14

(indentation)


[warning] 146-146: wrong indentation: expected 12 but found 14

(indentation)

drop: [ "ALL" ]
readOnlyRootFilesystem: true
runAsUser: 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove Trailing Whitespace
There is trailing whitespace at line 529. Removing any extraneous spaces will help maintain a clean YAML standard.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 529-529: trailing spaces

(trailing-spaces)

Comment on lines +68 to +71
app.kubernetes.io/component: "gpu-operator"
spec:
serviceAccountName: gpu-operator-upgrade-crd-hook-sa
{{- if .Values.operator.imagePullSecrets }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Indentation for Tolerations Block
Static analysis warns about indentation at line 68 (expected 6 spaces but found 8) for the tolerations block. Adjust the toYaml indentation to maintain consistency with the surrounding YAML structure. For example, consider using nindent 6 instead of nindent 8 if that aligns with the file’s style.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 68-68: wrong indentation: expected 6 but found 8

(indentation)

Comment thread packages/system/gpu-operator/Makefile Outdated
@@ -0,0 +1,13 @@
CILIUM_TAG=$(shell awk '$$1 == "version:" {print $$2}' charts/cilium/Chart.yaml)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CILIUM_TAG here seems to be a wrong copy-paste.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thank you!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

fixed

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (8)
packages/system/gpu-operator/charts/gpu-operator/templates/clusterrolebinding.yaml (1)

5-7: Fix YAML Templating in Labels Block
As noted in previous reviews, the use of {{- include "gpu-operator.labels" . | nindent 4 }} causes syntax errors. Remove the leading dash to ensure valid YAML formatting. For example:

-    {{- include "gpu-operator.labels" . | nindent 4 }}
+    {{ include "gpu-operator.labels" . | nindent 4 }}
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml (2)

19-21: 💡 Verification agent

❓ Verification inconclusive

Correct Indentation for Namespace Selector List Items
Static analysis reports that the list item under matchNames: on line 21 is indented with 4 spaces, but YAMLlint expects 6 spaces. Adjust the indentation as follows:

-    - {{ include "node-feature-discovery.namespace" . }}
+      - {{ include "node-feature-discovery.namespace" . }}

Adjust Indentation for Namespace Selector List Items

The static analysis correctly detects that the YAML list item under matchNames: is indented with 4 spaces, but YAMLlint enforces an indentation of 6 spaces. Please update the file accordingly:

  • File: packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml
  • Location: Lines 19-21
-    - {{ include "node-feature-discovery.namespace" . }}
+      - {{ include "node-feature-discovery.namespace" . }}

This change will align the indentation with YAMLlint's expectations.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 21-21: wrong indentation: expected 6 but found 4

(indentation)


23-25: 💡 Verification agent

🧩 Analysis chain

Correct Indentation for Selector MatchExpressions
YAMLlint indicates that the list items under matchExpressions: need an additional 2 spaces. Update the indentation on lines 24 and 25 as shown below:

-    - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
-    - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}
+      - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
+      - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}

Please run the above script to inspect the YAML block. If the output shows that the list items under matchExpressions: are indented with only 4 spaces (or otherwise not with an extra 2-space indentation), then update lines 24–25 to use 6 spaces instead—as demonstrated in the diff below:

-    - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
-    - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}
+      - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
+      - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}

🏁 Script executed:

#!/bin/bash
# Display the 'matchExpressions:' block along with several subsequent lines from
# packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml.
# This will help verify whether the list items are correctly indented.
grep -A 4 "matchExpressions:" packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml

Length of output: 485


Action: Update YAML Indentation for Selector MatchExpressions

  • The current output shows that the list items under matchExpressions: are indented with 4 spaces.
  • YAMLlint requires these list items to be indented 2 additional spaces (i.e., 6 spaces total) to meet proper YAML formatting.
  • Please update lines 24–25 in
    packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml
    as illustrated in the diff below:
-    - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
-    - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}
+      - {key: app.kubernetes.io/instance, operator: In, values: ["{{ .Release.Name }}"]}
+      - {key: app.kubernetes.io/name, operator: In, values: ["{{ include "node-feature-discovery.name" . }}"]}
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 24-24: wrong indentation: expected 6 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/serviceaccount.yaml (1)

1-1: Update YAML Templating Directive

The opening line uses {{- if ... }} which may be flagged by some YAML linters. To align with YAML validators, consider removing the trim indicator if whitespace control is not critical. For example:

-{{- if and .Values.master.enable .Values.master.serviceAccount.create }}
+{{ if and .Values.master.enable .Values.master.serviceAccount.create }}
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-master-conf.yaml (1)

1-1: Remove Whitespace-Trim Indicator in Templating Directive

The use of {{- if .Values.master.enable }} on line 1 triggers a YAML lint syntax error. If whitespace trimming is not essential, remove the dash as shown below:

-{{- if .Values.master.enable }}
+{{ if .Values.master.enable }}
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/values.yaml (2)

137-149: YAML Formatting: Indentation & Trailing Whitespace

Static analysis has flagged several indentation issues around lines 137, 140, and 146, as well as trailing whitespace on line 149. Since similar issues were highlighted in previous reviews for this component, please review and adjust the indentation (ensuring that nested blocks adhere to the expected spaces) and remove any extraneous trailing spaces.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 137-137: wrong indentation: expected 6 but found 8

(indentation)


[warning] 140-140: wrong indentation: expected 12 but found 14

(indentation)


[warning] 146-146: wrong indentation: expected 12 but found 14

(indentation)


[error] 149-149: trailing spaces

(trailing-spaces)


529-529: Trailing Whitespace Detected

Trailing spaces were found on line 529. Removing any extra spaces will help ensure that the YAML is clean and that automated tools do not stumble on formatting issues.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 529-529: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/templates/upgrade_crd.yaml (1)

69-80: Pod Specification: ServiceAccount, ImagePullSecrets, and Tolerations
The pod spec under the Job correctly specifies the service account and conditionally includes image pull secrets. For the tolerations block (lines 77–80), YAMLlint has flagged a potential indentation issue.

Consider verifying whether nindent 8 is required or if a value of nindent 6 would provide better consistency:

-      tolerations:
-        {{- toYaml . | nindent 8 }}
+      tolerations:
+        {{- toYaml . | nindent 6 }}
🧹 Nitpick comments (32)
packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater-crds.yaml (4)

1-1: Helm Templating & YAML Linter Consideration

The file begins with a Helm conditional ({{- if and .Values.topologyUpdater.enable .Values.topologyUpdater.createCRDs -}}), which is expected in Helm templates. However, static analysis (e.g. YAMLlint) may report a syntax error due to these templating tokens. Consider configuring your YAML linter to ignore Helm templating or adding a linter directive comment to suppress false positives.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


21-138: v1alpha1 Schema – Deprecation Consideration

The v1alpha1 schema is defined with required properties including both topologyPolicies and zones. Since topologyPolicies is marked as deprecated in the v1alpha2 version, please consider whether it should remain a required field here or document a clear deprecation timeline. Overall, the schema structure and validations (e.g. regex patterns for resource quantities) appear correct.


139-272: v1alpha2 Schema – Transition and Deprecation Notice

The v1alpha2 version correctly sets the storage version (with storage: true) and introduces the attributes array while still including topologyPolicies (now with a deprecation notice). Please ensure that the accompanying documentation clearly explains how clients should transition from topologyPolicies to attributes and the expected removal timeline. The additional status section is also a valuable enhancement.


278-279: Helm Template Closure

The file properly closes the templating block with {{- end }}. As with the opening, ensure your tooling is configured to handle these Helm directives so that linting or deployment pipelines do not misinterpret them as syntax errors.

packages/system/gpu-operator/charts/gpu-operator/values.yaml (1)

8-11: Key Naming Consistency Suggestion

In the NFD section, the key nodefeaturerules is used. For readability and consistency with common naming conventions, consider renaming this key to something like nodeFeatureRules (or a similar consistent format) if it aligns with the project’s naming practices.

packages/system/gpu-operator/charts/gpu-operator/templates/serviceaccount.yaml (1)

1-8: Helm Template and Indentation – Verify Rendered Output

The ServiceAccount manifest uses Helm templating constructs (e.g. on line 6 with {{- include "gpu-operator.labels" . | nindent 4 }}). While the static analysis tool flags an indentation issue and a syntax error in these templated lines, these are likely false positives due to the template syntax. Please verify that when the chart is rendered, the generated YAML has the intended structure and indentation.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/README.md (1)

3-6: Grammar and Hyphenation Improvement

In the description (lines 3–6), the phrase “a wide range of vendor and application specific node labeling needs” could be improved for clarity. Consider revising it to “a wide range of vendors and application‐specific node labeling needs” to address both plurality and hyphenation.

🧰 Tools
🪛 LanguageTool

[grammar] ~5-~5: Possible agreement error. The noun ‘vendor’ seems to be countable; consider using: “range of vendors”.
Context: ...uration and extension points for a wide range of vendor and application specific node labeling ...

(A_COLLECTIVE_OF_NN)


[uncategorized] ~6-~6: When ‘application-specific’ is used as a modifier, it is usually spelled with a hyphen.
Context: ...n points for a wide range of vendor and application specific node labeling needs. See [NFD document...

(SPECIFIC_HYPHEN)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/rolebinding.yaml (1)

1-18: Helm Templating in RoleBinding – Linting False Positives and Blank Line Cleanup

The RoleBinding template correctly uses Helm directives (e.g. on line 1 with {{- if ... }}) to conditionally create the resource. The YAML linter’s errors regarding a syntax error on line 1 are likely due to the templating syntax and can be safely ignored. Additionally, consider removing or reducing extra blank lines at the end (e.g. line 18) to adhere to YAML best practices.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 18-18: too many blank lines

(1 > 0) (empty-lines)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml (1)

1-13: ConfigMap Template – Verify Indentation and Linter Warnings

The nfd-worker-conf.yaml effectively uses Helm templating to generate a ConfigMap when .Values.worker.enable is true. Similar to other templated files, the YAML linter flags a syntax error on line 1 due to the leading template directive ({{- if .Values.worker.enable }}). This is a common artifact of Helm template files, so please verify that the final rendered YAML is valid and correctly indented.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml (1)

8-11: Verify Labels Block Indentation Under Metadata
Within the metadata’s labels block, functions like include and with are used with nindent 4. Ensure that this renders the intended indentation in the final YAML output. If YAMLlint continues to raise warnings (e.g. expecting 2 spaces instead of 4), consider adjusting the nindent value or configuring the linter to ignore Helm templating quirks.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 10-10: wrong indentation: expected 2 but found 4

(indentation)


[warning] 11-11: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/plugin_config.yaml (2)

1-1: Review Helm Templating Directive

The use of the {{- if ... }} directive to trim whitespace is common in Helm templates but may trigger YAML linter errors (e.g. "expected the node content, but found '-'"). If your team intentionally relies on this behavior, consider adding a linter ignore comment or updating your linter configuration.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


11-11: Remove Trailing Spaces

Line 11 contains trailing spaces. Removing them will help maintain file cleanliness.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 11-11: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/templates/mig_config.yaml (1)

1-1: Review Helm Templating Directive in mig_config.yaml

Similar to other templates, the use of {{- if ... }} may provoke YAML lint warnings. Confirm that whitespace trimming is needed; otherwise, consider removing the dash or updating your linter settings accordingly.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/nodefeaturerules.yaml (6)

1-1: Review YAML Templating Directive

The file starts with {{- if .Values.nfd.nodefeaturerules }}. This usage of the trim indicator (-) can result in YAML linter errors. If this behavior is intentional, you might add a linter ignore comment or adjust your linter configuration.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


26-29: Fix Indentation in 'SEV-SNP rule'

Within the "SEV-SNP rule" block, the list item for matchFeatures (starting at line 26) appears misindented (expected 8 spaces rather than 6). Please adjust the indentation to align with YAML formatting standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 26-26: wrong indentation: expected 8 but found 6

(indentation)


34-37: Correct Indentation for 'SEV-ES rule'

The dash under matchFeatures in the "SEV-ES rule" block (line 34) is not correctly indented. Adjust the spacing (to 8 spaces) so that it conforms with standard YAML list formatting.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 34-34: wrong indentation: expected 8 but found 6

(indentation)


43-46: Adjust Indentation for 'SEV system capacities'

The matchFeatures list under the "SEV system capacities" block (lines 43–46) is misindented. Please ensure the dash and its nested items are indented properly (typically 8 spaces for list items) to meet YAML best practices.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 43-43: wrong indentation: expected 8 but found 6

(indentation)


96-105: Correct Indentation in 'NVIDIA CC Enabled' Block

The matchAny block under "NVIDIA CC Enabled" (lines 96–105) shows inconsistent indentation. For example, line 96 is indented with 7 spaces (expected 8), and its nested elements (line 97 and onward) are off by one space. Please adjust all list items within this block to use consistent indentation.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 96-96: wrong indentation: expected 8 but found 7

(indentation)


[warning] 97-97: wrong indentation: expected 11 but found 10

(indentation)


[warning] 102-102: wrong indentation: expected 11 but found 10

(indentation)


107-108: Remove Extra Blank Lines at End of File

There are extra blank lines at the end of the file (lines 107–108). Removing these will improve consistency and reduce linter warnings.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 107-107: too many blank lines

(1 > 0) (empty-lines)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrole.yaml (1)

5-7: YAML Templating Indentation Concern

A static analysis error was raised on line 6 because the templating directive
{{- include "gpu-operator.labels" . | nindent 4 }}
is not yielding the expected node content. Please verify that the output of this include function produces valid, properly indented YAML. You might need to adjust the indentation (or use a different templating trim operator) so that YAMLlint does not erroneously flag it.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/cleanup_crd.yaml (2)

1-1: Helm Conditional Directive Interference

The file begins with a Helm conditional ({{- if .Values.operator.cleanupCRD }}), which is triggering a YAMLlint syntax error (“expected the node content, but found '-'”). This is a common issue when linters do not understand Helm templating. Consider configuring your linter to ignore Helm directives or verify that the rendered output meets YAML standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


19-20: Indentation Warning in Labels Block

YAMLlint reports a wrong indentation on line 20 for the label
app.kubernetes.io/component: "gpu-operator".
Check that the combination of nindent 8 on the preceding include and the manual indentation for subsequent keys yields the proper structure once rendered. Adjust the indentation or the nindent parameter if necessary.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 20-20: wrong indentation: expected 6 but found 8

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/operator.yaml (1)

4-8: Metadata Labels: Templating & Indentation Check

Within the metadata labels (lines 4–8), YAMLlint reports an indentation issue (e.g. “expected 2 but found 4”) and a syntax error triggered by the templating directive on line 6. Please confirm that the Helm function
{{- include "gpu-operator.labels" . | nindent 4 }}
renders keys at the proper indentation level when the template is processed. Adjusting the nindent value or reformatting the labels block may be necessary to satisfy YAML standards.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/master.yaml (2)

1-1: Helm Conditional Directive in Template Header

The file starts with a conditional directive ({{- if .Values.master.enable }}) on line 1, which is raising a syntax error in static analysis (“expected the node content, but found '-'”). This is typical when Helm templating is not recognized by the linter. Please ensure your linter is configured to ignore or properly process Helm templating directives, or consider a workaround so that false positives are minimized.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


7-9: Metadata Labels Indentation in Master Deployment

Static analysis warns of an indentation issue at line 9 (the role: master label). Verify that after rendering, the labels under metadata are indented correctly. This may involve adjusting the nindent value in the include function or manually aligning the subsequent keys.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml (1)

40-41: User Assignment
The template grants access to the SCC for the service account gpu-operator in the release namespace via {{ $.Release.Namespace }}. Note that YAMLlint flagged potential trailing spaces on line 40; a minor nitpick to remove any extra whitespace for clean formatting.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 40-40: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-gc.yaml (1)

1-1: Helm Conditional Syntax Warning:
The templating on line 1 ({{- if and .Values.gc.enable -}}) may trigger YAMLlint errors—even though it’s valid Helm syntax. Consider configuring YAMLlint to ignore Helm templating syntax if these warnings persist.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml (2)

18-42: Operator Settings:
Settings such as runtimeClass, defaultGPUMode, and the initContainer configuration are conditionally rendered. This pattern is appropriate; however, consider providing fallback defaults or extra validation for cases when these values might be missing.


7-7: Indentation Note:
Static analysis flagged a potential indentation mismatch on line 7. Once the Helm template is rendered, please double-check that the YAML conforms to the expected two‐space indentation across metadata fields.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/post-delete-job.yaml (1)

1-95: YAML Formatting Alert:
Static analysis reported syntax and indentation issues (e.g. on line 4 and warnings regarding extra spaces). These are often false positives due to Helm templating. It is recommended to run helm template on this chart to ensure that the output YAML is correctly formatted.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 4-4: syntax error: expected , but found ''

(syntax)


[warning] 54-54: too many spaces after colon

(colons)


[warning] 66-66: wrong indentation: expected 6 but found 8

(indentation)


[warning] 70-70: wrong indentation: expected 6 but found 8

(indentation)


[warning] 76-76: wrong indentation: expected 10 but found 12

(indentation)


[warning] 78-78: wrong indentation: expected 10 but found 12

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater.yaml (1)

1-1: Helm Conditional in Topology Updater:
The template begins with a conditional check ({{- if .Values.topologyUpdater.enable -}}), which is correct. Be aware that YAMLlint may misinterpret this as a syntax error due to the leading dash.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/_helpers.tpl (1)

27-36: Consider removing extra whitespace in template indentation.

While the namespace override functionality works correctly, there's unnecessary whitespace in the template indentation that could be cleaned up for consistency with other helpers.

 {{- define "node-feature-discovery.namespace" -}}
-  {{- if .Values.namespaceOverride -}}
-    {{- .Values.namespaceOverride -}}
-  {{- else -}}
-    {{- .Release.Namespace -}}
-  {{- end -}}
+{{- if .Values.namespaceOverride -}}
+{{- .Values.namespaceOverride -}}
+{{- else -}}
+{{- .Release.Namespace -}}
+{{- end -}}
 {{- end -}}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 68eb9a2 and 1e27ded.

⛔ Files ignored due to path filters (1)
  • packages/system/gpu-operator/charts/gpu-operator/Chart.lock is excluded by !**/*.lock
📒 Files selected for processing (47)
  • packages/core/platform/bundles/paas-full.yaml (1 hunks)
  • packages/system/gpu-operator/Chart.yaml (1 hunks)
  • packages/system/gpu-operator/Makefile (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/.helmignore (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/Chart.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/.helmignore (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/Chart.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/README.md (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/crds/nfd-api-crds.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/_helpers.tpl (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrole.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/master.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-gc.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-master-conf.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-topologyupdater-conf.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/post-delete-job.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/role.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/rolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/serviceaccount.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater-crds.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/worker.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/values.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/crds/nvidia.com_nvidiadrivers.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/_helpers.tpl (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/cleanup_crd.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/clusterrole.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/clusterrolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/dcgm_exporter_config.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/mig_config.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/nodefeaturerules.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/nvidiadriver.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/operator.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/plugin_config.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/serviceaccount.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/templates/upgrade_crd.yaml (1 hunks)
  • packages/system/gpu-operator/charts/gpu-operator/values.yaml (1 hunks)
  • packages/system/gpu-operator/values-talos.yaml (1 hunks)
  • packages/system/gpu-operator/values.yaml (1 hunks)
  • packages/system/kubevirt/templates/kubevirt-cr.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (10)
  • packages/system/gpu-operator/values.yaml
  • packages/system/gpu-operator/Chart.yaml
  • packages/system/kubevirt/templates/kubevirt-cr.yaml
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/.helmignore
  • packages/system/gpu-operator/Makefile
  • packages/system/gpu-operator/charts/gpu-operator/.helmignore
  • packages/core/platform/bundles/paas-full.yaml
  • packages/system/gpu-operator/values-talos.yaml
  • packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/Chart.yaml
  • packages/system/gpu-operator/charts/gpu-operator/Chart.yaml
🧰 Additional context used
🪛 YAMLlint (1.35.1)
packages/system/gpu-operator/charts/gpu-operator/templates/nodefeaturerules.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 26-26: wrong indentation: expected 8 but found 6

(indentation)


[warning] 34-34: wrong indentation: expected 8 but found 6

(indentation)


[warning] 43-43: wrong indentation: expected 8 but found 6

(indentation)


[warning] 96-96: wrong indentation: expected 8 but found 7

(indentation)


[warning] 97-97: wrong indentation: expected 11 but found 10

(indentation)


[warning] 102-102: wrong indentation: expected 11 but found 10

(indentation)


[warning] 107-107: too many blank lines

(1 > 0) (empty-lines)

packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/values.yaml

[warning] 137-137: wrong indentation: expected 6 but found 8

(indentation)


[warning] 140-140: wrong indentation: expected 12 but found 14

(indentation)


[warning] 146-146: wrong indentation: expected 12 but found 14

(indentation)


[error] 149-149: trailing spaces

(trailing-spaces)


[error] 529-529: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 10-10: trailing spaces

(trailing-spaces)


[error] 40-40: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater-crds.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/post-delete-job.yaml

[error] 4-4: syntax error: expected , but found ''

(syntax)


[warning] 54-54: too many spaces after colon

(colons)


[warning] 66-66: wrong indentation: expected 6 but found 8

(indentation)


[warning] 70-70: wrong indentation: expected 6 but found 8

(indentation)


[warning] 76-76: wrong indentation: expected 10 but found 12

(indentation)


[warning] 78-78: wrong indentation: expected 10 but found 12

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/master.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrole.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrolebinding.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-gc.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-master-conf.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-topologyupdater-conf.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-worker-conf.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 10-10: wrong indentation: expected 2 but found 4

(indentation)


[warning] 11-11: wrong indentation: expected 2 but found 4

(indentation)


[warning] 21-21: wrong indentation: expected 6 but found 4

(indentation)


[warning] 24-24: wrong indentation: expected 6 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/role.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/rolebinding.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 18-18: too many blank lines

(1 > 0) (empty-lines)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/serviceaccount.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/worker.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/cleanup_crd.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 20-20: wrong indentation: expected 6 but found 8

(indentation)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrole.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrolebinding.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/dcgm_exporter_config.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/mig_config.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/nvidiadriver.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/operator.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/plugin_config.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 11-11: trailing spaces

(trailing-spaces)

packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/serviceaccount.yaml

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/upgrade_crd.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 68-68: wrong indentation: expected 6 but found 8

(indentation)

🪛 LanguageTool
packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/README.md

[grammar] ~5-~5: Possible agreement error. The noun ‘vendor’ seems to be countable; consider using: “range of vendors”.
Context: ...uration and extension points for a wide range of vendor and application specific node labeling ...

(A_COLLECTIVE_OF_NN)


[uncategorized] ~6-~6: When ‘application-specific’ is used as a modifier, it is usually spelled with a hyphen.
Context: ...n points for a wide range of vendor and application specific node labeling needs. See [NFD document...

(SPECIFIC_HYPHEN)

🔇 Additional comments (88)
packages/system/gpu-operator/charts/gpu-operator/templates/dcgm_exporter_config.yaml (6)

1-2: Ensure Robust Conditional Checks for ConfigMap Generation

The nested conditionals correctly guard the creation of the ConfigMap and ensure that both the create flag is true and the data value is non-empty. Verify that your values file always defines the expected keys, or consider adding default values if not set.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


3-4: ConfigMap Declaration is Clear

The apiVersion: v1 and kind: ConfigMap lines are correctly defined according to Kubernetes specifications.


5-7: Proper Use of Metadata with Dynamic Values

Using Helm templating to set the ConfigMap's name and namespace is correctly implemented. Ensure that .Values.dcgmExporter.config.name is provided in your values file and that it meets naming conventions for Kubernetes resources.


8-9: Dynamic Label Injection via Template Include

The inclusion of labels with {{- include "gpu-operator.labels" . | nindent 4 }} is a good practice for maintaining consistency and reusability. Make sure the gpu-operator.labels template is defined and returns valid YAML.


10-12: Proper Formatting of Multiline Data Block

Using the literal block scalar (|) along with nindent 4 on the DCGM metrics data helps ensure that the inline values are correctly indented. This approach preserves the formatting of the CSV content as expected.


1-1: Note on YAMLlint Static Analysis Error

The YAMLlint error regarding the unexpected '-' in line 1 is a false positive. Helm template directives (e.g., {{- if ... }}) sometimes trigger such warnings, but they are normal in this context and can be safely ignored.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater-crds.yaml (1)

2-9: CRD Metadata Definition

The metadata block is well-structured with clear annotations including the API approval and the controller-gen version. Just verify that setting creationTimestamp: null is intentional in a Helm-managed context, as this field is typically populated during deployment.

packages/system/gpu-operator/charts/gpu-operator/values.yaml (1)

1-606: Overall Configuration File – Well-Documented and Comprehensive

This new values file provides an extensive and well-commented configuration for the GPU operator. The various sections (platform, NFD, driver, manager, etc.) are clearly structured with informative inline comments.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/README.md (1)

1-11: README Clarity and Informative Content

The README provides a clear introduction to Node Feature Discovery (NFD), outlining its role in detecting hardware features and labeling nodes. It also includes an external link for deployment instructions, which is very helpful for users.

🧰 Tools
🪛 LanguageTool

[grammar] ~5-~5: Possible agreement error. The noun ‘vendor’ seems to be countable; consider using: “range of vendors”.
Context: ...uration and extension points for a wide range of vendor and application specific node labeling ...

(A_COLLECTIVE_OF_NN)


[uncategorized] ~6-~6: When ‘application-specific’ is used as a modifier, it is usually spelled with a hyphen.
Context: ...n points for a wide range of vendor and application specific node labeling needs. See [NFD document...

(SPECIFIC_HYPHEN)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-topologyupdater-conf.yaml (1)

1-13: Helm Template for ConfigMap is Well-Structured
The conditional creation of the ConfigMap with the if block and the use of toYaml with nindent are correctly implemented. Note that the YAMLlint error on line 1 (expected node content but found ‘‑’) is likely a false positive triggered by Helm’s templating syntax. If necessary, configure your linting tool to ignore Helm templates.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml (1)

8-11: Verify Subjects List Indentation
The subjects field should be a properly indented YAML sequence. Confirm that the dash on line 9 is correctly placed relative to the subjects: key. Typically, it should appear two spaces further in than the key.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/prometheus.yaml (1)

1-1: Ignore Helm Templating False Positive
The syntax error reported on line 1 (expected node content but found ‘‑’) is a known false positive caused by Helm template delimiters. This can be safely ignored or excluded from YAMLlint.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/templates/clusterrole.yaml (1)

153-155: Conditional CRD Cleanup Rule Validation

The conditional inclusion of the delete verb based on .Values.operator.cleanupCRD is correctly implemented. Just ensure that the resulting verbs list is valid and that the cleanup logic is well tested so that CRDs are deleted only when intended.

packages/system/gpu-operator/charts/gpu-operator/templates/operator.yaml (1)

35-42: Deployment Container Configuration Review

The container configuration—including environment variables, volume mounts, and resource definitions—is clear and leverages Helm templating effectively. No issues were detected here; the configuration looks well structured.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/master.yaml (1)

22-31: Annotations and Checksum in Pod Template

The annotations block—including the checksum of the ConfigMap from
{{ include (print $.Template.BasePath "/nfd-master-conf.yaml") . | sha256sum }}—is well implemented. Please double-check that the checksum correctly updates when the configuration changes.

packages/system/gpu-operator/charts/gpu-operator/templates/nvidiadriver.yaml (10)

1-12: Solid CRD Definition & Conditionals
The CRD definition for NVIDIADriver is clear and leverages Helm conditionals effectively (using {{- if ... }}) to control whether the default CRD is deployed. This ensures that users can enable or disable the deployment based on values.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


13-24: Effective Use of Conditional Optional Metadata
The conditional inclusion of optional fields—such as annotations, labels, node selectors, and image pull secrets—using toYaml and nindent is well implemented. Ensure the chosen indentation (6 spaces in most cases) aligns with your overall chart style guidelines.


25-36: Configuration Blocks for Manager and Probes
The optional blocks for the driver manager and for the startup, liveness, and readiness probes are clear and modular. This design supports flexible configuration while keeping the template maintainable.


37-42: RDMA and Tolerations Blocks
The RDMA configuration and the inclusion of tolerations via a conditional block are handled appropriately. Verify that the indentation (using nindent 6) meets your YAML style, especially since similar sections in other files have raised indentation concerns.


43-50: Optional Repo and Certificate Configurations
The conditional sections for repoConfig and certConfig are clear and consistent with the overall design, allowing users to supply custom configurations when needed.


51-55: Licensing Configuration
The licensingConfig block correctly defines a configuration for NVIDIA vGPU licensing, including a default for nlsEnabled (set to true).


56-63: Virtual Topology & Kernel Module Configuration
Both the virtualTopologyConfig and kernelModuleConfig sections are concise and conditionally rendered. Confirm that the field names and expected values are consistent with your Helm values file.


64-72: Resources, Environment, and Arguments
Using conditional blocks to include resources, environment variables (env), and command-line arguments (args) via toYaml keeps the template flexible and maintainable.


73-95: GDS Integration Block
The GPUDirectStorage (GDS) configuration is thorough, incorporating repository, image, version (with quoting), image pull policy, and image pull secrets. This detailed configuration facilitates extensive customization.


96-118: GDRCopy Configuration Block
The gdrcopy configuration mirrors the GDS block in structure and clarity. Its use of conditionals and default values (e.g. defaulting to false) ensures that additional settings are only applied when required.

packages/system/gpu-operator/charts/gpu-operator/templates/upgrade_crd.yaml (6)

1-11: ServiceAccount for Upgrade CRD Hook
The ServiceAccount is properly defined with pre-upgrade hook annotations (helm.sh/hook, hook-delete-policy, and hook-weight). This configuration is key to triggering the CRD upgrade process as part of the Helm lifecycle.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


12-32: ClusterRole Definition for CRD Management
The ClusterRole grants the necessary permissions on customresourcedefinitions—including create, get, list, watch, patch, and update—which is sufficient for managing CRDs during upgrades.


33-49: ClusterRoleBinding for Proper Authorization
The ClusterRoleBinding correctly associates the ServiceAccount with the ClusterRole while dynamically setting the namespace using {{ .Release.Namespace }}.


50-61: Job Metadata and Hook Annotations
The Job is configured with appropriate pre-upgrade hook annotations and labels. The hook weights are set deliberately (with values “0” and “1”); ensure these values reflect your desired execution order for hooks.


81-94: Container Configuration for Upgrade Job
The container’s configuration—including the image (sourced via include "gpu-operator.fullimage"), pull policy, and the multiline shell command that applies various CRD files—is implemented clearly. The conditional inclusion for applying the NFD API CRDs is also appropriately controlled.


94-95: Restart Policy Verification
The restart policy is set to OnFailure, which is typical for Job resources, ensuring the Job will retry only in failure situations.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/role.yaml (3)

1-9: Conditional Role Creation for Node Feature Discovery
This Role resource is conditionally rendered based on .Values.worker.enable and .Values.worker.rbac.create, and the metadata (name, namespace, and labels) is templated appropriately.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


10-18: Nodefeatures Permissions Rule
The first rule grants the necessary permissions (create, get, update, delete) for the nodefeatures resource in the nfd.k8s-sigs.io API group. This is well defined and follows RBAC best practices.


19-24: Pods Access Rule
The second rule, which provides minimal (get) access for pods in the core API group, minimizes over-privileging while still permitting necessary read operations.

packages/system/gpu-operator/charts/gpu-operator/crds/nvidia.com_nvidiadrivers.yaml (4)

1-28: CRD Header and Basic Specification
The CRD header is well defined with the proper apiVersion, kind, and metadata annotations (including the controller-gen version). The group, names (with short names), and scope are correctly specified, adhering to Kubernetes CRD conventions.


29-716: Extensive OpenAPI Schema for NVIDIADriverSpec
The openAPIV3Schema for NVIDIADriverSpec is highly comprehensive. It covers a wide array of configuration options including:

  • Basic fields such as annotations, args, and certConfig.
  • Core configurations like driverType (with a default value and immutability validation), env, gdrcopy, and gds.
  • Image settings, kernel module configurations, labeling, and licensing configurations.
  • Detailed probe configurations (liveness, readiness, startup) with appropriate thresholds and formats.
  • Advanced runtime settings including resource limits/requests, node affinity, tolerations, and RDMA settings.

The schema uses proper type declarations, enumeration, regex patterns, and even includes x-kubernetes-validations to enforce immutability for certain fields. This rigorous schema will help validate user input and prevent misconfigurations.


717-804: Status Schema Definition
The status section of the CRD is clearly structured with a detailed conditions array. Each condition includes essential fields such as lastTransitionTime, message, reason, status, and type—all with proper validations (e.g. length limits and regex patterns). This level of detail should greatly aid in accurately reporting and diagnosing the state of installed NVIDIA drivers.


806-810: CRD Serving and Subresource Settings
The CRD is marked as served and the subresource for status is enabled. These settings ensure the CRD is available for API operations and allows status updates independently.

packages/system/gpu-operator/charts/gpu-operator/templates/readonlyfs_scc.openshift.yaml (9)

1-13: Conditional SCC for OpenShift
This template conditionally renders the SecurityContextConstraints (SCC) for OpenShift when .Values.platform.openshift is enabled. The metadata—comprising labels (using the chart’s helper) and a descriptive annotation—is well defined, providing useful context about the SCC’s restrictions.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[error] 10-10: trailing spaces

(trailing-spaces)


14-20: Host Feature and Privilege Restrictions
The SCC explicitly disables host directory volume plugins, IPC, network, PID, and host ports while allowing privilege escalation (without permitting privileged containers). This strict configuration aligns well with a hardened security posture.


21-22: Capabilities Configuration
Both allowedCapabilities and defaultAddCapabilities are set to empty arrays, ensuring that no extra Linux capabilities are inadvertently granted.


23-24: Filesystem Group Enforcement
The fsGroup is set to MustRunAs, enforcing that pods run with a specific group—a solid practice for ensuring predictable filesystem permissions.


25-27: Groups and Priority Configuration
The inclusion of the system:authenticated group and a priority of 0 is appropriate to ensure that the SCC applies to all authenticated users at the intended precedence.


28-33: Read-Only Root and Capabilities Drop
The SCC mandates a read-only root filesystem and specifies a list of capabilities (KILL, MKNOD, SETUID, SETGID) to drop. This enforces a strict security environment for pods managed under this SCC.


34-37: User and SELinux Constraints
The settings for runAsUser (MustRunAsRange) and seLinuxContext (MustRunAs) ensure that pods run under controlled user and SELinux contexts.


38-39: Supplemental Groups Setting
Allowing supplemental groups to be set to RunAsAny is acceptable here, offering flexibility while maintaining other security constraints.


42-48: Allowed Volume Types
The list of allowed volume types is explicitly provided and limited to common and safe options such as configMap, downwardAPI, emptyDir, persistentVolumeClaim, projected, and secret. This restricts pod access to only approved storage options.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/nfd-gc.yaml (5)

1-13: Deployment Metadata and Labels:
The Deployment metadata uses dynamic naming and labeling (via include and toYaml), which helps to maintain consistency. Please verify that your values (e.g. those in .Values.gc) are defined correctly in your values file.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


14-23: Deployment Spec Configuration:
The spec sets the replica count and revision history limit based on values and correctly matches labels in the selector. Ensure that .Values.gc.replicaCount and .Values.gc.revisionHistoryLimit provide appropriate defaults.


44-50: Container Image and Environment Setup:
The container “gc” is configured with dynamic image repository/tag values and an environment variable (NODE_NAME) sourced from the node. Double-check that any extra environment variables added via .Values.gc.extraEnvs are well formatted.


55-64: Command Arguments Handling:
The conditional inclusion of the -gc-interval argument is clear and correctly implemented. Please verify that when .Values.gc.interval is set, the rendered argument meets your intended format.


65-79: Security Context and Scheduling Configurations:
The container’s security context (which restricts privilege escalation, sets a read-only root, etc.) and the pod scheduling settings (nodeSelector, affinity, tolerations) are well parameterized. Confirm that the corresponding values under .Values.gc are valid and meet your security and scheduling requirements.

packages/system/gpu-operator/charts/gpu-operator/templates/clusterpolicy.yaml (5)

1-7: ClusterPolicy Metadata and Labeling:
The metadata section effectively uses Helm templating to generate a dynamic name and labels (including the "app.kubernetes.io/component": "gpu-operator" label). Please confirm that this label structure aligns with your overall labeling strategy.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)


8-13: Conditional Annotations for CR Cleanup:
Annotations for CR cleanup are added conditionally if .Values.operator.cleanupCRD is set. This avoids potential duplicate cleanup actions. Verify that this behavior matches your operator’s lifecycle expectations.


14-17: HostPaths Parameters:
The hostPaths for rootFS and driverInstallDir are parameterized. Ensure that the provided values in .Values.hostPaths are valid paths on your target nodes.


46-64: Daemonset Block Configuration:
The daemonset section (including labels, annotations, tolerations, priority, update strategy, etc.) is structured correctly using Helm functions. Please double-check options like the priorityClassName and rollingUpdate settings against your operational requirements.


65-517: Overall ClusterPolicy Resource Review:
This template is extensive and covers several operator components (validator, driver, MIG, PSA, CDI, etc.). Due to its complexity, thorough integration testing is recommended to ensure that all Helm value substitutions produce valid and usable configurations in your cluster.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/crds/nfd-api-crds.yaml (4)

1-1: Document Separator Check:
The file appropriately starts with a YAML document separator (---), which is expected when combining multiple documents. Confirm that your tooling supports multi-document YAML files.


1-123: NodeFeature CRD Review:
The NodeFeature CRD is defined with a detailed OpenAPIV3 schema outlining properties for features (attributes, flags, and instances) and labels. Verify that using additionalProperties and required fields meets your API contract for node feature discovery.


124-194: NodeFeatureGroup CRD Review:
This CRD provides a schema for grouping nodes based on discovered features. The featureGroupRules section is well described. Please test that the matchers behave as intended.


395-712: NodeFeatureRule CRD Review:
The NodeFeatureRule CRD supports the creation of node customization rules using complex matchers (matchAny, matchFeatures) along with annotations, labels, taints, and variable templates. Given its complexity, a careful review of schema validation rules is recommended to ensure they match your operational requirements.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/post-delete-job.yaml (4)

1-11: ServiceAccount for Post-Delete Hook:
The ServiceAccount is defined with a dynamic name and namespace and includes hook annotations (e.g. "helm.sh/hook": post-delete). This implementation looks good; just ensure the account receives only the necessary privileges.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 4-4: syntax error: expected , but found ''

(syntax)


12-32: ClusterRole for Node Pruning:
The ClusterRole specifies permissions (get, patch, update, list) for nodes and nodes/status, which are essential for the post-delete cleanup job. Verify that these permissions adhere to the principle of least privilege.


33-50: ClusterRoleBinding Association:
The ClusterRoleBinding cleanly links the ClusterRole to the ServiceAccount. This setup is appropriate for RBAC in cleanup operations.


51-95: Job Configuration for Post-Delete Cleanup:
The Job resource is configured to run the nfd-master binary with the -prune flag and conditionally adds an instance argument if provided. The hook annotations are in place for proper Helm hook handling. Please verify that resource requests (if defined elsewhere) and restart policies match your cluster’s needs.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 54-54: too many spaces after colon

(colons)


[warning] 66-66: wrong indentation: expected 6 but found 8

(indentation)


[warning] 70-70: wrong indentation: expected 6 but found 8

(indentation)


[warning] 76-76: wrong indentation: expected 10 but found 12

(indentation)


[warning] 78-78: wrong indentation: expected 10 but found 12

(indentation)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/topologyupdater.yaml (7)

2-10: DaemonSet Metadata and Annotations:
Metadata (name, namespace, labels) is generated dynamically. The annotations include a checksum for the configuration file, which is a good practice to trigger pod restarts on config changes.


14-20: DaemonSet Selector and Template Labels:
The selector and pod template labels are managed using Helm helpers (e.g. include "node-feature-discovery.selectorLabels"). This ensures consistency between resource selectors and pod labels.


43-68: Container Probes and Health Checks:
Liveness and readiness probes are configured to use gRPC on a configurable port, with conditional inclusion of delay and timeout values. This robust setup is good; please ensure that the health check thresholds match your application’s behavior.


80-120: Command and Environment Configuration:
The container’s environment variables (NODE_NAME and NODE_ADDRESS) are correctly obtained via field references, and the command arguments are built using conditionals for update interval, watched namespace, and other options. Confirm that default values (such as a 3-second sleep interval) are appropriate for your deployment.


121-143: Ports and Volume Mounts Setup:
The container exposes metrics and health ports and mounts necessary host paths (e.g., for kubelet config and pod resources socket). Validate that paths like /host-var/kubelet-config and the fallback for the pod resources socket are correct for your target cluster.


144-188: Pod Scheduling Details:
Pod scheduling is enhanced with configurable node selectors, affinity rules, and tolerations. This allows flexible placement of topology updater pods. Just ensure that the values provided yield the intended scheduling behavior.


1-189: Overall Topology Updater Review:
This DaemonSet template is comprehensive, covering security, health checks, command arguments, volume mounts, and scheduling. Running helm template to review the final rendered YAML is recommended to validate correctness under your environment.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrole.yaml (3)

1-58: RBAC permissions for NFD master look appropriate

The ClusterRole for the node-feature-discovery master component contains the necessary permissions to manage node features, including namespaces, nodes, and NFD-specific resources. The conditional creation based on .Values.master.enable and .Values.master.rbac.create follows best practices for optional components.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


60-102: RBAC permissions for topology updater correctly scoped

The topology updater ClusterRole has appropriate permissions to access nodes, pods, and manage node resource topologies. The permissions align with the topology updater's responsibilities for managing hardware topology information.


104-140: RBAC permissions for garbage collector well-defined

The garbage collector ClusterRole contains the necessary permissions for cleaning up stale node features and node resource topologies when nodes are removed from the cluster. The permissions are correctly limited to list and delete operations on the relevant resources.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/worker.yaml (4)

1-42: Worker DaemonSet configuration looks appropriate

The DaemonSet configuration for the NFD worker component includes proper metadata, selectors, and pod specifications. The use of template helpers for naming and labels ensures consistency, and the checksum annotation on line 26 will trigger rolling updates when the configuration changes.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 9-9: wrong indentation: expected 2 but found 4

(indentation)


43-111: Container configuration uses best practices

The worker container configuration includes:

  • Proper security context
  • Well-defined liveness and readiness probes using gRPC
  • Downward API for node and pod information
  • Configurable resource requests and limits
  • Feature gate configuration

These settings follow Kubernetes best practices for containerized applications.


112-146: Volume mounts correctly configured as read-only

All host path mounts are properly configured as read-only, which is a security best practice when accessing host resources. The conditional mount for /usr/src (lines 136-140) provides flexibility when that directory is not needed.


147-194: Volume and scheduling settings look good

The volume definitions and scheduling settings (nodeSelector, affinity, tolerations) are well structured and provide flexibility for different deployment scenarios. The ConfigMap mounting for worker configuration is correctly implemented with specific item mapping.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/clusterrolebinding.yaml (3)

1-16: ClusterRoleBinding for master component is correctly configured

The ClusterRoleBinding properly connects the master ClusterRole to its ServiceAccount. The naming conventions are consistent and follow the pattern established in the ClusterRole definition.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


18-34: ClusterRoleBinding for topology updater looks good

The topology updater ClusterRoleBinding correctly links the topology updater ClusterRole to its ServiceAccount. The conditional creation based on feature enablement follows the same pattern as the ClusterRole.


36-52: ClusterRoleBinding for garbage collector is properly defined

The garbage collector ClusterRoleBinding appropriately connects the garbage collector ClusterRole to its ServiceAccount. The naming and namespace references are consistent with the other components.

packages/system/gpu-operator/charts/gpu-operator/templates/_helpers.tpl (3)

1-33: Helm naming helper templates follow best practices

The helper templates for chart names and application names correctly handle:

  • Name truncation to 63 characters (Kubernetes limit)
  • Suffix trimming
  • Optional name overrides
  • Proper chart version formatting

These patterns follow Helm best practices for resource naming.


34-66: Label templates provide consistent labeling across resources

The label templates create consistent sets of labels for different resources:

  • Common labels for all resources
  • Operand-specific labels
  • Match labels for selectors

Including conditional custom labels from values provides flexibility while maintaining consistency.


68-80: Image name templates correctly handle repository and versioning

The templates for full image names properly combine repository, image name, and version information, with appropriate fallbacks to chart version when specific versions aren't provided.

packages/system/gpu-operator/charts/gpu-operator/charts/node-feature-discovery/templates/_helpers.tpl (3)

1-26: Well-structured Helm helper functions for name generation.

The chart name, fullname, and override-related helpers follow proper Helm chart practices with the appropriate truncation to 63 characters for Kubernetes naming constraints.


38-63: Correctly implemented chart label and selector label helpers.

The chart label and selector label helpers follow best practices for Kubernetes resource labeling, ensuring proper selection of resources and adherence to label standards.


65-107: Service account naming follows consistent patterns across components.

The service account naming helpers for master, worker, topology updater, and garbage collector components follow a consistent pattern:

  1. Check if service account creation is enabled
  2. Use specified name or generate appropriate default with component suffix
  3. Fall back to "default" if not creating a service account

This approach handles service account configuration appropriately.

Comment on lines +5 to +7
labels:
{{- include "gpu-operator.labels" . | nindent 4 }}
app.kubernetes.io/component: "gpu-operator"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Fix YAML Templating in Labels Block
The use of the dash in the templating directive (i.e. {{- include "gpu-operator.labels" . | nindent 4 }}) is causing YAMLlint syntax and indentation issues. Please remove the dash to ensure proper YAML output. For example, change the line to:

-    {{- include "gpu-operator.labels" . | nindent 4 }}
+    {{ include "gpu-operator.labels" . | nindent 4 }}

Based on our verification, the file still contains the templating directive with the dash, which is reportedly causing YAMLlint syntax and indentation issues. Therefore, please update the labels block as follows:

Action Required: Fix YAML Templating in Labels Block

Please update the templating directive in
packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml
by removing the dash before include to ensure proper YAML indentation. Specifically, change:

-    {{- include "gpu-operator.labels" . | nindent 4 }}
+    {{ include "gpu-operator.labels" . | nindent 4 }}

🏁 Script executed:

#!/bin/bash
# Verify if the problematic dash usage exists in the rolebinding template.
rg '{{- include "gpu-operator.labels"' packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml

Length of output: 347


The previous command encountered regex errors because the templating syntax was interpreted as a regular expression. The above script uses the fixed-string option (-F) to search for occurrences of {{- include "gpu-operator.labels" in the file.

Action: Verify and Update YAML Templating
Please run the above shell script to manually verify whether the problematic dash remains in:

packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml

If the output shows any occurrences of the directive with a dash (i.e., {{- include "gpu-operator.labels" ... }}), update it by removing the dash so that it becomes:

-    {{- include "gpu-operator.labels" . | nindent 4 }}
+    {{ include "gpu-operator.labels" . | nindent 4 }}

This change should resolve YAMLlint syntax and indentation issues.


🏁 Script executed:

#!/bin/bash
# Using -F flag for fixed-string search to avoid regex parser issues.
rg -F '{{- include "gpu-operator.labels"' packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml

Length of output: 296


Action Required: Remove Template Syntax Dash

In packages/system/gpu-operator/charts/gpu-operator/templates/rolebinding.yaml, the labels block uses:

    {{- include "gpu-operator.labels" . | nindent 4 }}

This use of the dash (-) in the templating directive is causing YAMLlint syntax and indentation issues. Please remove the hyphen to correct the templating output. For example, update the code as follows:

-    {{- include "gpu-operator.labels" . | nindent 4 }}
+    {{ include "gpu-operator.labels" . | nindent 4 }}

After making this change, verify that YAMLlint passes without errors.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

Comment on lines +5 to +7
labels:
{{- include "gpu-operator.labels" . | nindent 4 }}
app.kubernetes.io/component: "gpu-operator"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Remove Leading Dash in Labels Template
Similar to the other RBAC manifests, the templating directive used in the labels block (line 6) should not trim whitespace with a leading dash. Change:

-    {{- include "gpu-operator.labels" . | nindent 4 }}
+    {{ include "gpu-operator.labels" . | nindent 4 }}

This adjustment should prevent YAMLlint errors regarding unexpected tokens.


Below is a shell script to verify that the GPU Operator role manifest currently uses the trimmed include directive:

After executing the above, if you see that line 6 indeed contains:

    {{- include "gpu-operator.labels" . | nindent 4 }}

the fix is to remove the leading dash as shown below.


Please adjust the labels include directive in the GPU Operator's role manifest to prevent YAMLlint errors.

  • In file packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml (lines 5–7), change the include directive as follows:

    -    {{- include "gpu-operator.labels" . | nindent 4 }}
    +    {{ include "gpu-operator.labels" . | nindent 4 }}

This update aligns with how other RBAC manifests are structured and should resolve any YAMLlint issues regarding unexpected tokens.


🏁 Script executed:

#!/bin/bash
# Print lines 1-10 of the target file to confirm the problematic snippet
sed -n '1,10p' packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml

# Search for the usage of a trimmed include directive in the file
grep '{{- include "gpu-operator.labels"' packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml || echo "No trimmed include directive found."

Length of output: 496


Action: Remove Leading Dash from Labels Directive

The GPU Operator role manifest still contains a trimmed include directive on line 6, which causes YAMLlint errors. Please update the file as follows:

  • Location: packages/system/gpu-operator/charts/gpu-operator/templates/role.yaml (lines 5–7)

  • Change Required:

    -    {{- include "gpu-operator.labels" . | nindent 4 }}
    +    {{ include "gpu-operator.labels" . | nindent 4 }}

This update aligns the labels block with the other RBAC manifests and should resolve the YAMLlint issue.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
labels:
{{- include "gpu-operator.labels" . | nindent 4 }}
app.kubernetes.io/component: "gpu-operator"
labels:
{{ include "gpu-operator.labels" . | nindent 4 }}
app.kubernetes.io/component: "gpu-operator"
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 7-7: wrong indentation: expected 2 but found 4

(indentation)


[error] 6-6: syntax error: expected the node content, but found '-'

(syntax)

@kvaps
Andrei Kvapil (kvaps) merged commit ea9df9e into main Apr 9, 2025
@kvaps
Andrei Kvapil (kvaps) deleted the gpu-operator branch April 9, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants