Skip to content

Conversation

@kvaps
Copy link
Member

@kvaps kvaps commented Mar 5, 2025

This fix introduced Kamaji update #633
But helm chart didn't actually updated

This affected issue with creating new clusters.
Ref clastix/kamaji#623

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

Summary by CodeRabbit

  • Chores
    • Revised application and chart version information alongside updated dependency requirements.
  • New Features
    • Added new configuration options for tenant control planes, including enhanced network and load balancer settings.
  • Documentation
    • Updated version indicators and clarified configuration details for default datastore behavior.
  • Bug Fixes
    • Improved deployment stability by conditionally applying the default datastore setting to avoid potential errors.

This fix introduced Kamaji update #633
But helm chart didn't actually updated

This affected issue with creating new clusters.
Ref clastix/kamaji#623

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@kvaps kvaps requested a review from lllamnyp as a code owner March 5, 2025 11:45
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 5, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 5, 2025

Walkthrough

The pull request downgrades the Kamaji chart and application versions while updating the dependency constraints. It revises version numbers in both the Chart.yaml and README.md files, and clarifies configuration details in the README and values.yaml. Additionally, the TenantControlPlane CRD is enhanced with new fields and stricter validation rules. A conditional check in the controller template ensures the --datastore argument is only included when specified.

Changes

File(s) Change Summary
packages/.../Chart.yaml, packages/.../README.md Downgrade version numbers (appVersion: v1.0.0v0.0.0, chart version: 2.0.00.0.0) and update kamaji-etcd dependency (>=0.7.0 → >=0.8.1). README additionally updates badges and expands the description for defaultDatastoreName.
packages/.../crds/kamaji.clastix.io_tenantcontrolplanes.yaml Enhance field descriptions and validations. New fields added: dataStoreSchema, clusterDomain, loadBalancerClass, and loadBalancerSourceRanges; updated descriptions for fields like dataStore, dnsServiceIPs, podCidr, and serviceCidr.
packages/.../templates/controller.yaml Modify the handling of the --datastore argument to only include it when defaultDatastoreName is non-empty.
packages/.../values.yaml Revise comment for defaultDatastoreName to clarify that unspecified Kamaji instances will inherit the default value.

Sequence Diagram(s)

sequenceDiagram
    participant Helm as Helm Chart
    participant Values as Values.yaml
    participant Controller as Controller Template
    participant Pod as Deployment Container

    Values->>Controller: Retrieve defaultDatastoreName value
    alt Value is non-empty 
        Controller->>Pod: Pass "--datastore" argument with value
    else Value is empty
        Controller->>Pod: Omit "--datastore" argument
    end
Loading

Possibly related PRs

Suggested labels

bug, enhancement, lgtm

Poem

Oh, what a jump in our YAML lands,
Versions retreat with clever, nimble hops.
Dependencies align like dance-floor bands,
CRDs grow new fields that never stop.
My whiskers twitch with every code tweak,
Hoppity cheers, for smooth deployments we seek!
🐇🎉


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

@dosubot dosubot bot added the bug Something isn't working label Mar 5, 2025
Copy link
Contributor

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

🧹 Nitpick comments (1)
packages/system/kamaji/charts/kamaji/README.md (1)

25-25: Markdownlint Notice: Format Bare URL if Needed

The URL https://clastix.github.io/charts is presented as a bare URL in the table, which may trigger markdownlint (MD034). Consider wrapping it in angle brackets or converting it to a markdown link if it aligns with your project's style guidelines.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

25-25: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 48af411 and faaab88.

⛔ Files ignored due to path filters (1)
  • packages/system/kamaji/charts/kamaji/Chart.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • packages/system/kamaji/charts/kamaji/Chart.yaml (2 hunks)
  • packages/system/kamaji/charts/kamaji/README.md (3 hunks)
  • packages/system/kamaji/charts/kamaji/crds/kamaji.clastix.io_tenantcontrolplanes.yaml (3 hunks)
  • packages/system/kamaji/charts/kamaji/templates/controller.yaml (1 hunks)
  • packages/system/kamaji/charts/kamaji/values.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/system/kamaji/charts/kamaji/values.yaml
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
packages/system/kamaji/charts/kamaji/README.md

25-25: Bare URL used
null

(MD034, no-bare-urls)

🔇 Additional comments (14)
packages/system/kamaji/charts/kamaji/templates/controller.yaml (1)

36-38: Ensure Conditional Inclusion of --datastore Argument Is Correctly Implemented

The conditional block checks if .Values.defaultDatastoreName is not an empty string before adding the --datastore argument. This change prevents potential deployment errors when the value is not provided, thereby addressing the regression.

packages/system/kamaji/charts/kamaji/Chart.yaml (3)

2-2: App Version Downgrade to v0.0.0

The appVersion has been updated to v0.0.0 as required by the regression fix. Please confirm that this version downgrade aligns with your versioning strategy.


20-20: Chart Version Downgrade to 0.0.0

Changing the chart version to 0.0.0 reflects the intended reset in versioning. Ensure that all dependent environments are ready for this rollback.


24-24: Dependency Version Constraint Update for kamaji-etcd

The dependency version constraint has been adjusted to >=0.8.1, ensuring compatibility with updated requirements. This meets the new minimum version criteria for the dependency.

packages/system/kamaji/charts/kamaji/README.md (3)

3-3: Updated Version Badges Reflect New Versioning

The version badges now display 0.0.0 and v0.0.0, matching the changes in the Chart.yaml. This update enhances documentation accuracy and consistency.


25-25: Updated Dependency Version in Requirements Table

The requirements table now reflects the dependency version for kamaji-etcd as >=0.8.1, aligning with the updated constraint in the Chart.yaml.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

25-25: Bare URL used
null

(MD034, no-bare-urls)


73-73: Enhanced Description for defaultDatastoreName

The description now clearly states that if specified, all Kamaji instances with an unassigned DataStore will inherit this default value. This improved clarity helps users better understand the configuration behavior.

packages/system/kamaji/charts/kamaji/crds/kamaji.clastix.io_tenantcontrolplanes.yaml (7)

6415-6420: Enhanced documentation for the dataStore field

The updated description improves clarity by providing more detailed information about default values and migration capabilities for the dataStore field. This is a valuable improvement for users trying to understand how dataStore selection works.


6422-6432: Well-designed new dataStoreSchema field with proper immutability guarantees

The introduction of the dataStoreSchema field provides important configuration flexibility while maintaining appropriate safeguards. The immutability enforcement through validation rules is particularly important as changing the schema after creation could lead to data access issues.


6554-6562: Good default and validation for the new clusterDomain field

The new clusterDomain field properly sets a sensible default of "cluster.local" and includes a pattern validation to ensure it contains at least one period. The immutability validation is critical since changing the cluster domain after creation would break communication between pods.


6563-6570: Improved clarity for dnsServiceIPs field description

The enhanced description for the dnsServiceIPs field now clearly explains how the DNS Service IP is automatically computed when not specified, providing examples for both IPv4 and IPv6 addresses. This makes the behavior more predictable for users.


6571-6580: New loadBalancerClass field with proper constraints

The addition of the loadBalancerClass field with immutability constraints is well-designed. The validation ensures it can only be used with LoadBalancer service types, preventing configuration errors.


6581-6591: Security-enhancing loadBalancerSourceRanges field

This new field allows restricting the IP ranges that can access the LoadBalancer service, which is an important security feature. The clear documentation includes a helpful example format, making it easier for users to understand how to use this feature.


6610-6621: Comprehensive validation rules strengthen configuration integrity

The added Kubernetes validation rules provide important guardrails to prevent misconfiguration. These rules help ensure:

  1. dataStore and dataStoreSchema cannot be unset once defined
  2. LoadBalancer-specific fields are only used with the appropriate service type
  3. LoadBalancerClass setting consistency is maintained at runtime

This significantly improves the robustness of the tenant control plane configuration.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 5, 2025
@kvaps kvaps merged commit 266d097 into main Mar 5, 2025
1 of 2 checks passed
@kvaps kvaps deleted the upd-kamaji-chart branch March 5, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants