Skip to content

[kubernetes] Add gpu-operator and introduce GPU support for tenant Kubernetes clusters - #834

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

[kubernetes] Add gpu-operator and introduce GPU support for tenant Kubernetes clusters#834
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
kubernetes-gpu-operator-addon

Conversation

@kvaps

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

Copy link
Copy Markdown
Member

Signed-off-by: Andrei Kvapil kvapss@gmail.com

Summary by CodeRabbit

  • New Features

    • Added support for GPU resources in Kubernetes clusters, including the ability to specify GPUs per node group and deploy the NVIDIA GPU Operator as an optional addon.
    • Introduced new configuration options for customizing Kamaji control plane resources and presets.
    • Added support for vertical pod autoscaler customization via override values.
  • Bug Fixes

    • Corrected typographical errors in label keys across multiple HelmRelease manifests to ensure consistent labeling.
  • Documentation

    • Updated documentation to describe new GPU and control plane configuration options, removed the instance type feature matrix, and added detailed parameter explanations.
  • Chores

    • Incremented Kubernetes app chart version to 0.19.0 and updated version mappings.
    • Fixed typos in parameter descriptions and comments.

@coderabbitai

coderabbitai Bot commented Apr 22, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This update introduces GPU support to the Kubernetes app by adding GPU device configuration options to node groups and implementing a conditional GPU operator deployment via HelmRelease. The chart version is incremented to 0.19.0, and the documentation is updated to reflect new configuration parameters and addon options. Several HelmRelease templates are corrected to fix a typographical error in a label key. The values schema is expanded to support GPU operator and vertical pod autoscaler customization, as well as resource presets for Kamaji control plane components. The version mapping is updated accordingly.

Changes

File(s) Change Summary
packages/apps/kubernetes/Chart.yaml, packages/apps/versions_map Incremented Kubernetes chart version from 0.18.1 to 0.19.0; updated version mapping.
packages/apps/kubernetes/README.md Replaced "Series" feature matrix with detailed "Parameters" section, documenting new and existing configuration options including GPU and Kamaji control plane settings.
packages/apps/kubernetes/templates/cluster.yaml Added conditional rendering of GPU device entries in VM domain spec for node groups with GPUs defined.
packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml Introduced new HelmRelease and Secret templates for conditional deployment and configuration of the GPU operator via FluxCD.
packages/apps/kubernetes/templates/helmreleases/delete.yaml Added GPU operator Helm release to pre-delete suspension logic and updated Role permissions accordingly.
packages/apps/kubernetes/values.schema.json Fixed typo in "replicas" description; added schema for GPU operator, vertical pod autoscaler, and Kamaji control plane resource presets.
packages/apps/kubernetes/values.yaml Fixed typo; added GPU array parameter for node groups and new "gpuOperator" addon section with enable and override options.
packages/apps/kubernetes/templates/helmreleases/cert-manager-crds.yaml, ... (and others) Fixed typo in label key from "coztstack.io/target-cluster-name" to "cozystack.io/target-cluster-name" in multiple HelmRelease templates.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HelmChart
    participant NodeGroup
    participant GPUOperator
    participant FluxCD

    User->>HelmChart: Deploy Kubernetes chart with GPU-enabled node group
    HelmChart->>NodeGroup: Render VM spec with GPU devices if .group.gpus defined
    HelmChart->>GPUOperator: If addons.gpuOperator.enabled, render HelmRelease
    GPUOperator->>FluxCD: FluxCD deploys GPU Operator to target cluster
    User->>HelmChart: Optionally provide valuesOverride for GPU Operator
    HelmChart->>GPUOperator: Create Secret with override values if provided
Loading

Possibly related PRs

  • cozystack/cozystack#862: Adds named GPU device entries to VM templates, directly overlapping with this PR's GPU device naming and manifest changes.
  • cozystack/cozystack#758: Updates Kubernetes app chart version and modifies Kamaji control plane resource presets, relating to versioning and configuration changes in this PR.

Suggested labels

ok-to-test, backport

Suggested reviewers

  • lllamnyp
  • klinch0

Poem

A bunny hopped through fields of code,
With GPUs now in every node!
Helm charts polished, typos gone,
Kamaji presets marching on.
Cluster docs are clear and bright,
Version bumps bring pure delight—
Hooray for progress, fluffy and fast,
Kubernetes hops ahead at last! 🐇✨


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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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: 7

🧹 Nitpick comments (2)
packages/apps/kubernetes/values.yaml (1)

153-153: Remove trailing whitespace
YAML linters flag trailing spaces. Please remove the extra space on this line to satisfy linting.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 153-153: trailing spaces

(trailing-spaces)

packages/apps/kubernetes/README.md (1)

63-70: Refine grammar in resource-preset descriptions
The phrase "This is ignored if resources is set (resources is recommended for production)" uses singular/plural inconsistently. Consider updating to:

- ... Set container resources according to one common preset ... This is ignored if resources is set (resources is recommended for production).
+ ... Set container resources using a common preset ... These presets are ignored if specific resources are set (resources are recommended for production).
🧰 Tools
🪛 LanguageTool

[uncategorized] ~64-~64: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~64-~64: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | small ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~68-~68: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~68-~68: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~70-~70: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~70-~70: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a14bcf9 and 3909406.

📒 Files selected for processing (8)
  • packages/apps/kubernetes/Chart.yaml (1 hunks)
  • packages/apps/kubernetes/README.md (1 hunks)
  • packages/apps/kubernetes/templates/cluster.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/delete.yaml (2 hunks)
  • packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (1 hunks)
  • packages/apps/kubernetes/values.schema.json (3 hunks)
  • packages/apps/kubernetes/values.yaml (3 hunks)
  • packages/apps/versions_map (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: Pre-Commit Checks
packages/apps/kubernetes/templates/helmreleases/delete.yaml

[error] 1-1: Makefile target 'gen-versions-map' failed with error: '../../hack/gen_versions_map.sh: 34: [: !=: unexpected operator' and 'fatal: Needed a single revision'. Exit code 128.

packages/apps/kubernetes/Chart.yaml

[error] 1-1: Makefile target 'gen-versions-map' failed with error: '../../hack/gen_versions_map.sh: 34: [: !=: unexpected operator' and 'fatal: Needed a single revision'. Exit code 128.

packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml

[error] 1-1: Makefile target 'gen-versions-map' failed with error: '../../hack/gen_versions_map.sh: 34: [: !=: unexpected operator' and 'fatal: Needed a single revision'. Exit code 128.

packages/apps/versions_map

[error] 1-1: Makefile target 'gen-versions-map' failed with error: '../../hack/gen_versions_map.sh: 34: [: !=: unexpected operator' and 'fatal: Needed a single revision'. Exit code 128.

packages/apps/kubernetes/templates/cluster.yaml

[error] 1-1: Makefile target 'gen-versions-map' failed with error: '../../hack/gen_versions_map.sh: 34: [: !=: unexpected operator' and 'fatal: Needed a single revision'. Exit code 128.

packages/apps/kubernetes/values.yaml

[error] 1-1: Makefile target 'gen-versions-map' failed with error: '../../hack/gen_versions_map.sh: 34: [: !=: unexpected operator' and 'fatal: Needed a single revision'. Exit code 128.

packages/apps/kubernetes/README.md

[error] 1-1: Makefile target 'gen-versions-map' failed with error: '../../hack/gen_versions_map.sh: 34: [: !=: unexpected operator' and 'fatal: Needed a single revision'. Exit code 128.

packages/apps/kubernetes/values.schema.json

[error] 1-1: Makefile target 'gen-versions-map' failed with error: '../../hack/gen_versions_map.sh: 34: [: !=: unexpected operator' and 'fatal: Needed a single revision'. Exit code 128.

🪛 YAMLlint (1.35.1)
packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml

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

(syntax)

packages/apps/kubernetes/values.yaml

[error] 153-153: trailing spaces

(trailing-spaces)

🪛 LanguageTool
packages/apps/kubernetes/README.md

[uncategorized] ~64-~64: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~64-~64: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | small ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~68-~68: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~68-~68: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~70-~70: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~70-~70: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)

🔇 Additional comments (8)
packages/apps/kubernetes/Chart.yaml (1)

19-19: Chart version bump for GPU features
Bumped the Chart version from 0.18.0 to 0.19.0 to include the new GPU support changes. Ensure this aligns with your packages/apps/versions_map update and that all dependent Helm releases are compatible with the new version.

packages/apps/versions_map (1)

61-62: Update version mapping for Kubernetes chart
The mapping for kubernetes 0.18.0 now points to 721c12a7 and you've added kubernetes 0.19.0HEAD. Please verify that your downstream automation (e.g., hack/gen_versions_map.sh) correctly handles HEAD references. The current pipeline error ([: !=: unexpected operator) suggests the shell script is not POSIX‑compliant.

Consider updating hack/gen_versions_map.sh to use a POSIX‑safe comparison, for example:

- if [ "$new" != "$old" ]; then
+ if [ "$new" ] && [ "$new" != "$old" ]; then

This will resolve the pre‑commit failure.

packages/apps/kubernetes/templates/helmreleases/delete.yaml (2)

38-38: Include GPU operator in teardown patch
Good catch adding {{ .Release.Name }}-gpu-operator to the kubectl patch invocation so the GPU operator release is suspended during deletion.


74-74: Grant RBAC permission for GPU operator
The Role's resourceNames list now includes the GPU operator HelmRelease, matching the teardown logic.

packages/apps/kubernetes/values.yaml (2)

27-31: Add gpus parameter for node groups
Introducing the gpus: [] array under each node group allows explicit GPU device attachments, which aligns with your VM template changes.


62-69: Add gpuOperator addon configuration
The new gpuOperator.enabled flag and valuesOverride map will drive the conditional GPU operator HelmRelease. This is a solid extension to the addons section.

packages/apps/kubernetes/README.md (1)

38-41: Clarify GPU parameter format
The gpus entry (Line 40) currently reads "List of GPUs to attach" but doesn't specify the expected format (e.g., device IDs, vendor strings, Kubernetes device-plugin resource names). Please update the description to include examples or a reference to the cluster template docs for clarity.

packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (1)

1-1: Ignore YAMLlint false positive
The YAMLlint error on line 1 stems from Helm’s Go template directive ({{- if ... }}) and can safely be ignored in this context.

🧰 Tools
🪛 YAMLlint (1.35.1)

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

(syntax)

🪛 GitHub Actions: Pre-Commit Checks

[error] 1-1: Makefile target 'gen-versions-map' failed with error: '../../hack/gen_versions_map.sh: 34: [: !=: unexpected operator' and 'fatal: Needed a single revision'. Exit code 128.

Comment thread packages/apps/kubernetes/templates/cluster.yaml
Comment thread packages/apps/kubernetes/README.md Outdated
Comment thread packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml Outdated
Comment thread packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml
Comment thread packages/apps/kubernetes/values.schema.json
Comment thread packages/apps/kubernetes/values.schema.json Outdated

@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: 1

🔭 Outside diff range comments (1)
packages/apps/kubernetes/values.yaml (1)

90-93: 🛠️ Refactor suggestion

Missing enabled flag for VerticalPodAutoscaler addon
For consistency with other addons (certManager, ingressNginx, gpuOperator, etc.), add an enabled: false field to addons.verticalPodAutoscaler. This makes it clear when the VPA component should be deployed.

♻️ Duplicate comments (3)
packages/apps/kubernetes/README.md (1)

37-37: Fix typo in control plane description
There's still a typo in the controlPlane.replicas description:

  • Change “contorl-plane” → “control-plane”
packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (2)

7-8: ⚠️ Potential issue

Fix label key typo
The label key coztstack.io/target-cluster-name is misspelled. It should be cozystack.io/target-cluster-name to match your domain.

-    coztstack.io/target-cluster-name: {{ .Release.Name }}
+    cozystack.io/target-cluster-name: {{ .Release.Name }}

13-20: 🛠️ Refactor suggestion

Pin GPU Operator chart version
To ensure reproducible deployments, specify a version under chart.spec. For example:

   chart:
     spec:
       chart: cozy-gpu-operator
+      version: <gpu-operator-chart-version>
       reconcileStrategy: Revision
       sourceRef:
         kind: HelmRepository
🧹 Nitpick comments (2)
packages/apps/kubernetes/values.yaml (1)

153-153: Remove trailing whitespace
There's a trailing space on this blank line (line 153), which can cause lint warnings. Please trim trailing spaces.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 153-153: trailing spaces

(trailing-spaces)

packages/apps/kubernetes/README.md (1)

64-70: Refine grammar in resource preset descriptions
The repeated phrase “This is ignored if resources is set…” could be clearer. Consider rewording to “Ignored when resources is specified” or “This setting is ignored when custom resources are provided”.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~64-~64: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~64-~64: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | small ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~68-~68: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~68-~68: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~70-~70: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~70-~70: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3909406 and 5677999.

📒 Files selected for processing (8)
  • packages/apps/kubernetes/Chart.yaml (1 hunks)
  • packages/apps/kubernetes/README.md (1 hunks)
  • packages/apps/kubernetes/templates/cluster.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/delete.yaml (2 hunks)
  • packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (1 hunks)
  • packages/apps/kubernetes/values.schema.json (3 hunks)
  • packages/apps/kubernetes/values.yaml (3 hunks)
  • packages/apps/versions_map (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/apps/versions_map
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/apps/kubernetes/Chart.yaml
  • packages/apps/kubernetes/templates/cluster.yaml
  • packages/apps/kubernetes/templates/helmreleases/delete.yaml
  • packages/apps/kubernetes/values.schema.json
🧰 Additional context used
🪛 LanguageTool
packages/apps/kubernetes/README.md

[uncategorized] ~64-~64: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~64-~64: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | small ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~68-~68: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~68-~68: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~70-~70: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~70-~70: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)

🪛 YAMLlint (1.35.1)
packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml

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

(syntax)

packages/apps/kubernetes/values.yaml

[error] 153-153: trailing spaces

(trailing-spaces)

🔇 Additional comments (5)
packages/apps/kubernetes/values.yaml (2)

27-31: Add GPU parameter
The gpus parameter under nodeGroups is correctly introduced to allow specifying GPU devices per node group.


62-69: Add GPU Operator addon configuration
The gpuOperator section under addons is properly added with enabled and valuesOverride fields to control the GPU Operator deployment.

packages/apps/kubernetes/README.md (2)

40-41: Document GPU parameter
The gpus field is now clearly documented under Common parameters with an empty default ([]).


51-52: Document GPU Operator addon
The new entries for addons.gpuOperator.enabled and addons.gpuOperator.valuesOverride correctly reflect the values schema and usage.

packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (1)

1-1: Helm templating directive
The lint error at line 1 is a false positive due to the Helm {{- if ... }} directive. You can safely ignore this YAMLlint warning.

🧰 Tools
🪛 YAMLlint (1.35.1)

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

(syntax)

Comment thread packages/apps/kubernetes/README.md
@kvaps
Andrei Kvapil (kvaps) force-pushed the kubernetes-gpu-operator-addon branch 2 times, most recently from 5d58d0a to 9467459 Compare April 23, 2025 13:22

@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: 3

♻️ Duplicate comments (2)
packages/apps/kubernetes/README.md (1)

37-37: Fix typo in controlPlane.replicas description
There's a typo in the description for controlPlane.replicas:

- Number of replicas for Kubernetes contorl-plane components
+ Number of replicas for Kubernetes control-plane components
packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (1)

7-8: ⚠️ Potential issue

Fix label key typo
The label coztstack.io/target-cluster-name has a spelling error in the domain. It should be cozystack.io:

-     coztstack.io/target-cluster-name: {{ .Release.Name }}
+     cozystack.io/target-cluster-name: {{ .Release.Name }}
🧹 Nitpick comments (4)
packages/apps/kubernetes/README.md (2)

40-40: Clarify nested path for gpus parameter
The table lists gpus at the top level, but this setting is actually nested under each nodeGroups entry. Consider renaming the "Name" column to nodeGroups[].gpus (or similar) for clarity.


155-155: Remove trailing spaces
Line 155 contains trailing whitespace that should be removed to satisfy YAML linting.

packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (2)

11-11: Use unique Helm release name per cluster
Currently releaseName: gpu-operator is a static value. This may cause conflicts in shared namespaces. Consider:

-releaseName: gpu-operator
+releaseName: {{ .Release.Name }}-gpu-operator

13-16: Pin GPU Operator chart version
For reproducible deployments, explicitly specify the chart version under chart.spec:

 chart:
   spec:
     chart: cozy-gpu-operator
+    version: <gpu-operator-chart-version>
     reconcileStrategy: Revision
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5677999 and 9467459.

📒 Files selected for processing (9)
  • packages/apps/kubernetes/Chart.yaml (1 hunks)
  • packages/apps/kubernetes/README.md (1 hunks)
  • packages/apps/kubernetes/images/ubuntu-container-disk/Dockerfile (1 hunks)
  • packages/apps/kubernetes/templates/cluster.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/delete.yaml (2 hunks)
  • packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (1 hunks)
  • packages/apps/kubernetes/values.schema.json (3 hunks)
  • packages/apps/kubernetes/values.yaml (3 hunks)
  • packages/apps/versions_map (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/apps/kubernetes/Chart.yaml
  • packages/apps/versions_map
  • packages/apps/kubernetes/templates/cluster.yaml
  • packages/apps/kubernetes/templates/helmreleases/delete.yaml
  • packages/apps/kubernetes/values.schema.json
🧰 Additional context used
🪛 LanguageTool
packages/apps/kubernetes/README.md

[uncategorized] ~64-~64: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~64-~64: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | small ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~66-~66: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~68-~68: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~68-~68: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~70-~70: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~70-~70: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)

🪛 YAMLlint (1.35.1)
packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml

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

(syntax)

packages/apps/kubernetes/values.yaml

[error] 155-155: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build and Test
🔇 Additional comments (2)
packages/apps/kubernetes/values.yaml (1)

27-33: Add GPU attachment parameter under nodeGroups
The new gpus array parameter provides a list of GPUs to attach per node group and defaults to an empty list ([]). This aligns with the schema and examples, enabling conditional GPU device configuration in the VM spec.

packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (1)

20-23: Verify kubeConfig secret key
The secretRef.key is set to super-admin.svc. Ensure this matches the actual key in your kubeconfig Secret (e.g., super-admin.conf vs. super-admin.svc).

Comment thread packages/apps/kubernetes/images/ubuntu-container-disk/Dockerfile Outdated
Comment thread packages/apps/kubernetes/README.md
Comment thread packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml
@kvaps
Andrei Kvapil (kvaps) force-pushed the kubernetes-gpu-operator-addon branch from 9467459 to dd49f23 Compare April 23, 2025 14:34
…bernetes clusters

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@kvaps
Andrei Kvapil (kvaps) force-pushed the kubernetes-gpu-operator-addon branch from dd49f23 to 7537235 Compare April 23, 2025 14:39

@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.

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

♻️ Duplicate comments (5)
packages/apps/kubernetes/README.md (2)

37-37: ⚠️ Potential issue

Fix typo in parameter description
The description for controlPlane.replicas still reads contorl-plane. Please correct it to control-plane.


41-56: 🛠️ Refactor suggestion

Cluster Addons table consistency
The table lists all addons, including the new GPU operator and VPA overrides. However, unlike other addons, verticalPodAutoscaler only has valuesOverride and lacks an enabled flag. To maintain consistency, please add an addons.verticalPodAutoscaler.enabled row (default false) above its valuesOverride.

packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (2)

7-8: ⚠️ Potential issue

Fix label key typo
The label key coztstack.io/target-cluster-name is misspelled and will break downstream selectors. It should read:

-    coztstack.io/target-cluster-name: {{ .Release.Name }}
+    cozystack.io/target-cluster-name: {{ .Release.Name }}

40-47: ⚠️ Potential issue

Correct indentation under dependsOn
YAML sequences must be indented under their parent key. Update as follows:

-  dependsOn:
-  - name: {{ .Release.Name }}
-    namespace: {{ .Release.Namespace }}
+  dependsOn:
+    - name: {{ .Release.Name }}
+      namespace: {{ .Release.Namespace }}
     {{- end }}
+    - name: {{ .Release.Name }}-cilium
+      namespace: {{ .Release.Namespace }}

This ensures valid YAML and proper dependency ordering.

packages/apps/kubernetes/values.schema.json (1)

108-118: 🛠️ Refactor suggestion

Add missing enabled flag for Vertical Pod Autoscaler
To align with other addons, include an enabled boolean before valuesOverride (default false).

Apply this diff:

 "verticalPodAutoscaler": {
     "type": "object",
     "properties": {
+        "enabled": {
+            "type": "boolean",
+            "description": "Enables the Vertical Pod Autoscaler",
+            "default": false
+        },
         "valuesOverride": {
             "type": "object",
             "description": "Custom values to override",
             "default": {}
         }
🧹 Nitpick comments (3)
packages/apps/kubernetes/values.yaml (1)

154-154: Remove trailing spaces
There's a trailing whitespace on this line. Removing it will keep the YAML clean and avoid linter warnings.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 154-154: trailing spaces

(trailing-spaces)

packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (1)

12-19: Pin GPU Operator chart version
For reproducible deployments, specify a chart version under chart.spec. For example:

   chart:
     spec:
       chart: cozy-gpu-operator
+      version: <gpu-operator-chart-version>
       reconcileStrategy: Revision
       sourceRef:
         kind: HelmRepository
packages/apps/kubernetes/values.schema.json (1)

132-136: Restrict resourcesPreset to allowed values
To enforce only valid presets, add an enum constraint for resourcesPreset (none, nano, micro, small, medium, large, xlarge, 2xlarge).

Example diff for the apiServer.resourcesPreset:

- "resourcesPreset": {
-     "type": "string",
-     "description": "...",
-     "default": "small"
- },
+ "resourcesPreset": {
+     "type": "string",
+     "enum": ["none","nano","micro","small","medium","large","xlarge","2xlarge"],
+     "description": "...",
+     "default": "small"
+ },

Remember to propagate this to all resourcesPreset definitions under kamajiControlPlane.

🛑 Comments failed to post (1)
packages/apps/kubernetes/values.yaml (1)

27-32: ⚠️ Potential issue

Mismatch between gpus example and schema
The inline example shows each GPU as an object with a name key, but the JSON schema defines gpus items as plain strings. Please reconcile this by either:

  • Updating the schema to accept objects with a name field, or
  • Changing the example to a simple list of device strings (e.g. - "nvidia.com/AD102GL_L40S").

@kvaps
Andrei Kvapil (kvaps) merged commit 8db92d5 into main Apr 23, 2025
@kvaps
Andrei Kvapil (kvaps) deleted the kubernetes-gpu-operator-addon branch April 23, 2025 14:44

@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: 1

♻️ Duplicate comments (2)
packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (2)

12-15: 🛠️ Refactor suggestion

Pin GPU Operator chart version
For reproducible deployments, specify a version under chart.spec.

Example diff:

 chart:
   spec:
     chart: cozy-gpu-operator
+    version: <gpu-operator-chart-version>

40-47: ⚠️ Potential issue

Fix indentation of dependsOn entries
Sequence items under dependsOn must be indented beneath the key. This ensures valid YAML for HelmRelease dependencies.

Suggested diff:

 spec:
   dependsOn:
-  {{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
-  - name: {{ .Release.Name }}
-    namespace: {{ .Release.Namespace }}
-  {{- end }}
-  - name: {{ .Release.Name }}-cilium
-    namespace: {{ .Release.Namespace }}
+  {{- if lookup "helm.toolkit.fluxcd.io/v2" "HelmRelease" .Release.Namespace .Release.Name }}
+    - name: {{ .Release.Name }}
+      namespace: {{ .Release.Namespace }}
+  {{- end }}
+    - name: {{ .Release.Name }}-cilium
+      namespace: {{ .Release.Namespace }}
🧹 Nitpick comments (4)
packages/apps/kubernetes/values.yaml (1)

154-154: Remove trailing spaces
There’s a trailing space on this line. Please delete the extra whitespace to satisfy YAML linting.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 154-154: trailing spaces

(trailing-spaces)

packages/apps/kubernetes/README.md (3)

34-39: Document gpus under nodeGroups
The common parameters table lists nodeGroups but doesn’t mention the new gpus field. Consider extending the description for nodeGroups or adding a separate row for nodeGroups[].gpus.


50-56: Cluster Addons table updated

  • Approve the addition of addons.gpuOperator.enabled and valuesOverride.
  • For consistency, add an addons.verticalPodAutoscaler.enabled (default false) flag before the valuesOverride entry.

63-69: Grammar tweak for resource presets
The sentence “resources is recommended for production” should agree in number. Consider:

- (resources is recommended for production).
+ (resources are recommended for production).
🧰 Tools
🪛 LanguageTool

[uncategorized] ~63-~63: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~63-~63: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | small ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~65-~65: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~65-~65: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~67-~67: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~67-~67: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~69-~69: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~69-~69: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between dd49f23 and 7537235.

📒 Files selected for processing (18)
  • packages/apps/kubernetes/Chart.yaml (1 hunks)
  • packages/apps/kubernetes/README.md (1 hunks)
  • packages/apps/kubernetes/templates/cluster.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/cert-manager-crds.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/cert-manager.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/cilium.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/csi.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/delete.yaml (2 hunks)
  • packages/apps/kubernetes/templates/helmreleases/fluxcd.yaml (2 hunks)
  • packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/ingress-nginx.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/monitoring-agents.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/vertical-pod-autoscaler-crds.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/vertical-pod-autoscaler.yaml (1 hunks)
  • packages/apps/kubernetes/templates/helmreleases/victoria-metrics-operator.yaml (1 hunks)
  • packages/apps/kubernetes/values.schema.json (3 hunks)
  • packages/apps/kubernetes/values.yaml (4 hunks)
  • packages/apps/versions_map (1 hunks)
✅ Files skipped from review due to trivial changes (10)
  • packages/apps/kubernetes/templates/helmreleases/cert-manager-crds.yaml
  • packages/apps/kubernetes/templates/helmreleases/cilium.yaml
  • packages/apps/kubernetes/templates/helmreleases/vertical-pod-autoscaler-crds.yaml
  • packages/apps/kubernetes/templates/helmreleases/fluxcd.yaml
  • packages/apps/kubernetes/templates/helmreleases/cert-manager.yaml
  • packages/apps/kubernetes/templates/helmreleases/vertical-pod-autoscaler.yaml
  • packages/apps/kubernetes/templates/helmreleases/monitoring-agents.yaml
  • packages/apps/kubernetes/templates/helmreleases/victoria-metrics-operator.yaml
  • packages/apps/kubernetes/templates/helmreleases/csi.yaml
  • packages/apps/kubernetes/templates/helmreleases/ingress-nginx.yaml
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/apps/kubernetes/Chart.yaml
  • packages/apps/versions_map
  • packages/apps/kubernetes/templates/cluster.yaml
  • packages/apps/kubernetes/templates/helmreleases/delete.yaml
  • packages/apps/kubernetes/values.schema.json
🧰 Additional context used
🪛 LanguageTool
packages/apps/kubernetes/README.md

[uncategorized] ~63-~63: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~63-~63: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | small ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~65-~65: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~65-~65: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~67-~67: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~67-~67: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~69-~69: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... 2xlarge). This is ignored if resources is set (resources is recommended for produ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)


[uncategorized] ~69-~69: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... ignored if resources is set (resources is recommended for production). | micro ...

(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)

🪛 YAMLlint (1.35.1)
packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml

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

(syntax)

packages/apps/kubernetes/values.yaml

[error] 154-154: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build and Test
🔇 Additional comments (6)
packages/apps/kubernetes/values.yaml (3)

4-4: Typo fix confirmed
The parameter description now correctly spells “control-plane”.


27-32: Approve GPU list parameter addition
Adding a gpus array under each node group enables specifying GPU devices. Ensure the corresponding schema (values.schema.json) has been updated to validate this field.


63-70: Approve GPU operator addon configuration
Introducing addons.gpuOperator with an enabled flag and valuesOverride map aligns with other addons.

packages/apps/kubernetes/README.md (1)

30-32: New “Parameters” section added
The headings for the parameters reference are well placed.

packages/apps/kubernetes/templates/helmreleases/gpu-operator.yaml (2)

1-1: Skip YAMLlint false positive
The linter flags the Helm template directive on line 1, but this is valid in a Helm chart context.

🧰 Tools
🪛 YAMLlint (1.35.1)

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

(syntax)


2-9: Manifest header and metadata look good
The conditional guard, API version, kind, and labels (with correct cozystack.io domain) are properly set.

Comment on lines +33 to +38
{{- if .Values.addons.gpuOperator.valuesOverride }}
valuesFrom:
- kind: Secret
name: {{ .Release.Name }}-gpu-operator-values-override
valuesKey: values
{{- end }}

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

Fix indentation of valuesFrom block
YAML requires sequence items under valuesFrom to be indented further than the key. Otherwise the manifest will be invalid.

Suggested diff:

-spec:
-  {{- if .Values.addons.gpuOperator.valuesOverride }}
-  valuesFrom:
-  - kind: Secret
-    name: {{ .Release.Name }}-gpu-operator-values-override
-    valuesKey: values
-  {{- end }}
+spec:
+  {{- if .Values.addons.gpuOperator.valuesOverride }}
+  valuesFrom:
+    - kind: Secret
+      name: {{ .Release.Name }}-gpu-operator-values-override
+      valuesKey: values
+  {{- end }}
📝 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.addons.gpuOperator.valuesOverride }}
valuesFrom:
- kind: Secret
name: {{ .Release.Name }}-gpu-operator-values-override
valuesKey: values
{{- end }}
spec:
{{- if .Values.addons.gpuOperator.valuesOverride }}
valuesFrom:
- kind: Secret
name: {{ .Release.Name }}-gpu-operator-values-override
valuesKey: values
{{- end }}

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.

3 participants