Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kamaji version #633

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Update kamaji version #633

wants to merge 3 commits into from

Conversation

lllamnyp
Copy link
Member

@lllamnyp lllamnyp commented Feb 18, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a migration process that upgrades system configurations to the latest release.
  • Chores

    • Upgraded the underlying application version and improved the patch application method.
    • Updated release configuration and version mappings for improved consistency.
    • Revised the installation process with an updated version variable.
  • Refactor

    • Modified network routing settings to remove fixed port assignments from host definitions.

* Stripped port number from KamajiControlPlane hostname due to clastix/kamaji#679
* Bumped versions for kamaji and dependent charts
@lllamnyp lllamnyp requested a review from kvaps as a code owner February 18, 2025 07:52
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 18, 2025
Copy link
Contributor

coderabbitai bot commented Feb 18, 2025

Walkthrough

This pull request updates several configuration and deployment files. It removes a hardcoded port from the hostname in the ingress section, upgrades version numbers in the Kamaji Dockerfile, Kubernetes Chart, installer script, and version mapping, and corrects migration comments. A new migration script has also been added to update application configurations via Kubernetes commands. These changes adjust versioning and patching approaches without altering core functionality.

Changes

File(s) Change Summary
packages/apps/kubernetes/templates/cluster.yaml Removed hardcoded port (:443) from the hostname in the ingress configuration of the KamajiControlPlane resource.
packages/system/kamaji/images/kamaji/Dockerfile Upgraded Kamaji version from edge-24.9.2 to edge-24.12.1 and modified patch application to include all .diff files.
packages/apps/kubernetes/Chart.yaml,
packages/apps/versions_map
Incremented chart version from 0.15.0 to 0.15.1; updated version mapping by tying 0.15.0 to a specific commit hash and adding a new entry for 0.15.1.
scripts/installer.sh,
scripts/migrations/8
Updated installer version from 9 to 10 and corrected migration comment from Migration 7 --> 9 to Migration 8 --> 9.
scripts/migrations/9 Added a new migration script that upgrades the Kubernetes appVersion to 0.15.1 and creates/updates the cozystack-version ConfigMap to version 10.

Sequence Diagram(s)

sequenceDiagram
  participant M as Migration Script
  participant K as Kubernetes API
  M->>K: Update kubernetes.apps.cozystack.io (set appVersion to 0.15.1)
  K-->>M: Acknowledgement
  M->>K: Create/Update ConfigMap (cozystack-version = 10)
  K-->>M: Acknowledgement
Loading

Possibly related PRs

Suggested labels

size:M, lgtm

Suggested reviewers

  • kvaps

Poem

Hopping through code in the moonlit night,
I tweak the configs with all my might.
Ports removed and versions soar,
Patches applied and bugs no more.
A bunny cheers for updates that are just right!

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (Beta)
  • @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 enhancement New feature or request label Feb 18, 2025
hostname: {{ .Values.host | default (printf "%s.%s" .Release.Name $host) }}:443
hostname: {{ .Values.host | default (printf "%s.%s" .Release.Name $host) }}
Copy link
Member

Choose a reason for hiding this comment

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

Please bump version of Chart.yaml for kubernetes application.

Also, if old clusters will continue using :443 in their configuration they will beblocked, how about adding migration script, to bump all Kubernetes clusters to that version?

tag: v0.25.3@sha256:229646a728b58dd0c55dae7abd721ab23e3feecd61f55fa3ad24bb3a614d558f
tag: latest@sha256:04aaf9acb6f49e0315295cd0c24655f28b74c6cf628fc6721758842a41d2deef
Copy link
Member

Choose a reason for hiding this comment

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

Please omit these changes, version will be automatically bumped in release cycle

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Feb 24, 2025
BREAKING: all kuberneteses will be upgraded to chart version 0.15.1
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: 2

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a31c3a5 and b321064.

📒 Files selected for processing (5)
  • packages/apps/kubernetes/Chart.yaml (1 hunks)
  • packages/apps/versions_map (1 hunks)
  • scripts/installer.sh (1 hunks)
  • scripts/migrations/8 (1 hunks)
  • scripts/migrations/9 (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • scripts/migrations/8
  • packages/apps/kubernetes/Chart.yaml
🔇 Additional comments (2)
scripts/installer.sh (1)

6-6: LGTM: Version increment aligns with new migration script.

The version increment from 9 to 10 corresponds to the new migration script in scripts/migrations/9 that handles the upgrade process.

packages/apps/versions_map (1)

47-48: LGTM: Version mapping updates follow established patterns.

The changes correctly:

  • Pin kubernetes 0.15.0 to specific commit cb7b815
  • Add new kubernetes 0.15.1 pointing to HEAD

# Migration 9 --> 10

# Upgrade kubernetes.apps to new chart version
kubectl get kuberneteses.apps.cozystack.io -A -o yaml | sed -r -e 's/^ appVersion: [0-9.]+$/ appVersion: 0.15.1/' | kubectl apply -f-
Copy link
Member

Choose a reason for hiding this comment

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

From my point of view this should be more safe method:

Suggested change
kubectl get kuberneteses.apps.cozystack.io -A -o yaml | sed -r -e 's/^ appVersion: [0-9.]+$/ appVersion: 0.15.1/' | kubectl apply -f-
kubectl get kuberneteses.apps.cozystack.io -A --no-headers --output=custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name' | while read NAMESPACE NAME; do
kubectl patch kuberneteses.apps.cozystack.io -n "$NAMESPACE" "$NAME" --type merge -p '{"appVersion":"0.15.1"}'
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants