Skip to content

[platform] Prevent version cm from deletion#2112

Merged
kvaps merged 1 commit intomainfrom
fix/version-configmap
Feb 27, 2026
Merged

[platform] Prevent version cm from deletion#2112
kvaps merged 1 commit intomainfrom
fix/version-configmap

Conversation

@myasnikovdaniil
Copy link
Contributor

@myasnikovdaniil myasnikovdaniil commented Feb 27, 2026

What this PR does

Release note

[platform] Prevent cozystack-version configmap from deletion 

Summary by CodeRabbit

  • Chores
    • Updated deployment resource configuration to improve system reliability by ensuring critical components are properly retained and protected during system operations and maintenance activities.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 27, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request implements a critical safeguard for the cozystack-version ConfigMap by applying a Helm resource policy. This ensures that the ConfigMap, which stores essential versioning information, remains persistent across various deployment lifecycle events, preventing accidental data loss.

Highlights

  • ConfigMap Deletion Prevention: The cozystack-version ConfigMap now includes the helm.sh/resource-policy: keep annotation, which prevents it from being deleted during Helm operations like upgrades or uninstalls.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • packages/core/platform/templates/cozystack-version.yaml
    • Added a Helm annotation to prevent the cozystack-version ConfigMap from being deleted.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 75f2e23 and c05dd5e.

📒 Files selected for processing (1)
  • packages/core/platform/templates/cozystack-version.yaml

📝 Walkthrough

Walkthrough

The pull request adds a Helm resource policy annotation (helm.sh/resource-policy: keep) to the cozystack-version ConfigMap metadata. This directs Helm to retain the resource during lifecycle operations. The change is metadata-only, affecting no ConfigMap data or functional behavior.

Changes

Cohort / File(s) Summary
Helm Resource Policy Configuration
packages/core/platform/templates/cozystack-version.yaml
Added helm.sh/resource-policy: keep annotation to ConfigMap metadata to preserve the resource during Helm operations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A ConfigMap stands guard with a keeper's embrace,
Helm's resource policy keeps it in place!
No deletion shall dare to make it goodbye,
Through upgrades and deletions, it's safe and won't die! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding Helm resource policy to prevent the cozystack-version ConfigMap from being deleted during deployments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/version-configmap

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
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to prevent the cozystack-version ConfigMap from being deleted by adding the helm.sh/resource-policy: keep annotation. While the change is correct, its placement within a conditional block means it will not be applied to existing installations during an upgrade. I've suggested a change to address this, ensuring the ConfigMap is fully managed by Helm while preserving the version data that is updated by the migration process. This will make the change effective for both new and existing installations.

Copy link
Member

@kvaps kvaps left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 27, 2026
@kvaps kvaps added the backport Should change be backported on previus release label Feb 27, 2026
@kvaps kvaps merged commit c393cf9 into main Feb 27, 2026
14 of 15 checks passed
@kvaps kvaps deleted the fix/version-configmap branch February 27, 2026 12:03
@github-actions
Copy link

Successfully created backport PR for release-1.0:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Should change be backported on previus release lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants