Skip to content

Update rook api#1709

Merged
liranmauda merged 1 commit intonoobaa:masterfrom
liranmauda:liran-bump-deps
Sep 29, 2025
Merged

Update rook api#1709
liranmauda merged 1 commit intonoobaa:masterfrom
liranmauda:liran-bump-deps

Conversation

@liranmauda
Copy link
Contributor

@liranmauda liranmauda commented Sep 28, 2025

Explain the changes

Update rook api

Summary by CodeRabbit

  • Documentation

    • Updated CRD guidance to reflect DynamicResourceAllocation feature gate requirements.
    • Clarified pod affinity/anti-affinity weighting behavior in scheduling descriptions.
    • Refreshed notes across resource sections without changing schema or fields.
  • Chores

    • Upgraded Kubernetes ecosystem and related libraries to newer versions for compatibility and stability.
    • General dependency updates and alignment to current toolchain.

Update rook api

Signed-off-by: liranmauda <liran.mauda@gmail.com>
@coderabbitai
Copy link

coderabbitai bot commented Sep 28, 2025

Walkthrough

Updates the NooBaa CRD YAML descriptions (not schema), changing affinity weight description and feature-gate wording, and bumps numerous dependencies in go.mod. The embedded CRD SHA256 in the bundle is updated to match the CRD content.

Changes

Cohort / File(s) Summary
CRD docs update
deploy/crds/noobaa.io_noobaas.yaml
Text changes: invert wording of podAffinity/podAntiAffinity weighted term contribution (addition → subtraction) while keeping preference semantics; replace “alpha field” notes with “depends on the DynamicResourceAllocation feature gate” across multiple resource-related sections. No structural schema changes.
Embedded bundle hash
pkg/bundle/deploy.go
Updated constant Sha256_deploy_crds_noobaa_io_noobaas_yaml to reflect new CRD content (490b10… → ee1ecf…). No logic changes.
Dependency updates
go.mod
Broad version bumps across operator-framework, Kubernetes modules (k8s.io/api, apimachinery, client-go), gRPC, Cobra/PFlag, OpenAPI, and various indirect deps. No new entry points; build/runtime dependencies realigned.

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • updated go version to 1.24 #1680 — Also modifies the NooBaa CRD YAML and updates the embedded CRD SHA256 constant, indicating a closely related CRD content/change alignment.

Suggested reviewers

  • nimrod-becker
  • naveenpaul1

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “Update rook api” is overly generic and does not convey the primary changes in this pull request, which include reversing pod affinity weight contributions, updating DynamicResourceAllocation gating language in CRD documentation, and bumping multiple module dependencies; it fails to summarize the main technical change and misrepresents the scope as simply an API update. Please revise the title to be a concise, one-sentence summary of the core change, for example “Reverse podAffinity weight logic and update DynamicResourceAllocation gating in NooBaa CRD docs,” so that it clearly reflects the main modifications.
Description Check ⚠️ Warning The pull request description only includes the “Explain the changes” section with a single line and omits the mandatory “Issues: Fixed #xxx / Gap #xxx” and “Testing Instructions” sections as well as the required checklist items, so it does not adhere to the repository’s description template. Please expand the description to include the “Issues: Fixed #xxx / Gap #xxx” and “Testing Instructions” headings, detail the relevant issue numbers or gaps addressed, outline steps to verify the changes, and mark the Doc/tests checklist to ensure completeness.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 48bf40d and fc7d7c5.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (3)
  • deploy/crds/noobaa.io_noobaas.yaml (6 hunks)
  • go.mod (6 hunks)
  • pkg/bundle/deploy.go (7 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-07T07:50:45.559Z
Learnt from: liranmauda
PR: noobaa/noobaa-operator#1687
File: scripts/run-golangci-lint.sh:48-56
Timestamp: 2025-09-07T07:50:45.559Z
Learning: In the noobaa-operator repository, the maintainer liranmauda has confirmed that Go files with spaces in their names are not present and will never be allowed. Shellcheck warnings about word splitting in filename handling can be ignored when they relate to this edge case, as the added complexity for handling spaces is not justified.

Applied to files:

  • go.mod
📚 Learning: 2025-09-02T11:05:25.671Z
Learnt from: Neon-White
PR: noobaa/noobaa-operator#0
File: :0-0
Timestamp: 2025-09-02T11:05:25.671Z
Learning: In the noobaa-operator repository, the golangci-lint timeout is configured in `.golangci.yml` under `run.timeout` and is set to 5 minutes.

Applied to files:

  • go.mod
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: run-kms-kmip-test
  • GitHub Check: run-cli-tests
  • GitHub Check: run-operator-tests
  • GitHub Check: run-kms-tls-token-test
  • GitHub Check: run-kms-key-rotate-test
  • GitHub Check: golangci-lint
  • GitHub Check: run-kms-dev-test
  • GitHub Check: run-admission-test
  • GitHub Check: run-hac-test
  • GitHub Check: run-kms-tls-sa-test
  • GitHub Check: run-azure-vault-test
  • GitHub Check: cnpg-deployment-test
  • GitHub Check: run-core-config-map-tests

Comment on lines +637 to 639
compute a sum by iterating through the elements of this field and subtracting
"weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
node(s) with the highest sum are the most preferred.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Undo the subtract phrasing change for pod anti-affinity weights.

Kubernetes still adds each matched weight to the node’s score for both affinity and anti-affinity terms; the scheduler does not subtract the weight. The new wording misrepresents upstream behavior and will mislead users configuring placement. Please revert to the original “adding weight” description so the CRD matches the actual scheduler semantics.(github.com)

🤖 Prompt for AI Agents
In deploy/crds/noobaa.io_noobaas.yaml around lines 637 to 639, the CRD
description incorrectly says the scheduler "subtracts" pod anti-affinity weight
when computing node scores; change the wording back to state that the scheduler
"adds" each matched weight to the node’s score (i.e., it sums and adds weights
for both affinity and anti-affinity terms) so the CRD matches upstream
Kubernetes scheduler semantics and documentation.

Comment on lines +3 to +5
go 1.24.3

toolchain go1.24.7
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix the go directive version format.

go directives accept only the major.minor release (e.g., 1.24), not a patch-level value. Leaving go 1.24.3 makes go commands fail immediately with invalid go version "1.24.3". Please drop the patch component so the module remains buildable.(github.com)

Apply this diff:

-go 1.24.3
+go 1.24
📝 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
go 1.24.3
toolchain go1.24.7
go 1.24
toolchain go1.24.7
🤖 Prompt for AI Agents
In go.mod around lines 3 to 5, the go directive currently uses a patch-level
version ("go 1.24.3") which is invalid; update the go directive to the
major.minor form ("go 1.24") while leaving the toolchain line ("toolchain
go1.24.7") unchanged so module files are valid and go commands succeed.

@liranmauda liranmauda merged commit 22f1cc3 into noobaa:master Sep 29, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants