Skip to content

[operations] Describe upgrade to v1.0#409

Open
nbykov0 wants to merge 2 commits intomainfrom
upgrade-1.0
Open

[operations] Describe upgrade to v1.0#409
nbykov0 wants to merge 2 commits intomainfrom
upgrade-1.0

Conversation

@nbykov0
Copy link
Collaborator

@nbykov0 nbykov0 commented Feb 2, 2026

Describe upgrade to v1.0

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive v1.0 upgrade guide: prerequisites (new management tools and required utilities), step‑by‑step upgrade path from v0.4x, how to apply the operator and package, monitoring guidance during the transition, cleanup/finalization steps, and notes about workload and release behavior.

@nbykov0 nbykov0 self-assigned this Feb 2, 2026
@netlify
Copy link

netlify bot commented Feb 2, 2026

Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit ced3eb7
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/698299e444360d0008ad9572
😎 Deploy Preview https://deploy-preview-409--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 2, 2026

📝 Walkthrough

Walkthrough

Adds a new documentation page describing the Cozystack v1.0 upgrade pathway, including prerequisites (cozyhr, cozypkg, Flux, jq, kubectl), steps to apply CRDs/operator and run the migration script, monitoring via HelmRelease, and final cleanup instructions. (≤50 words)

Changes

Cohort / File(s) Summary
Upgrade Documentation
content/en/docs/operations/upgrades/_index.md
New page detailing the v1.0 upgrade pathway: prerequisites (cozyhr, cozypkg, Flux, jq, kubectl), upgrade steps (upgrade to recent v0.4x, apply cozystack CRDs and operator, run /hack/migrate-to-version-1.0.sh which pulls values from cozy-system ConfigMaps, apply main Package), monitoring via HelmRelease statuses, notes that workloads are not recreated and underlying entities remain Helm releases, plus cleanup/finalization steps.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 I hopped through docs with nimble feet,

Guided upgrades, tidy and neat,
CRDs, an operator, a migration song,
HelmRelease watching all along,
And that's the hop—v1.0, bravo! 🥕✨

🚥 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 specifically summarizes the main change: adding documentation for upgrading to v1.0 in the operations section.
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 upgrade-1.0

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.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @nbykov0, 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 introduces comprehensive documentation for upgrading Cozystack to its v1.0 release. The new guide details the significant architectural shifts in the control plane, moving towards a modular, package-based system managed by a new operator. It provides users with a clear, step-by-step process, covering prerequisites, the upgrade procedure itself, and necessary cleanup actions to ensure a smooth transition to the new version.

Highlights

  • New Upgrade Documentation: A new documentation page has been added detailing the comprehensive upgrade process for Cozystack to version 1.0.
  • Architectural Changes in v1.0: The documentation highlights major architectural shifts in Cozystack v1.0, including a modular control-plane, the introduction of cozystack-operator replacing the previous installer, and assets now being served via a single OCI image.
  • Prerequisites and Tools: The guide outlines necessary prerequisites for the upgrade, such as the new cozyhr and cozypkg tools, along with standard tools like flux, jq, and kubectl.
  • Step-by-Step Upgrade Process: Detailed steps are provided for the upgrade, including upgrading to the latest v0.4x version, applying new CRDs, generating a main package, scaling down old components, deploying the cozystack-operator, and performing post-upgrade cleanup.

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

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.

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 adds a new documentation page for upgrading to Cozystack v1.0. The guide is well-structured and provides the necessary steps for the upgrade. My review includes several suggestions to fix typos, correct grammar, and improve markdown formatting for better clarity and readability. Specifically, I've pointed out issues with code block formatting and inconsistent use of backticks for technical terms.

@nbykov0 nbykov0 force-pushed the upgrade-1.0 branch 4 times, most recently from fb29e80 to 9635137 Compare February 2, 2026 14:36
Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
@nbykov0 nbykov0 marked this pull request as ready for review February 2, 2026 16:00
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

🤖 Fix all issues with AI agents
In `@content/en/docs/operations/upgrades/_index.md`:
- Around line 18-19: Replace the bare URLs in the upgrade notes by turning the
two lines referencing cozypkg and cozyhr into markdown link syntax (e.g.,
"[cozypkg](https://github.com/cozystack/cozystack/releases)" and
"[cozyhr](https://github.com/cozystack/cozyhr/releases)") so the text for the
items remains the same but the links are properly formatted; update the lines
that contain the literals "cozypkg" and "cozyhr" to use the bracketed link form.
- Line 35: The one-liner using backticks to run `kubectl -n cozy-system get hr
bootbox-rd -o yaml | grep -q HelmRepository && flux -n cozy-system suspend hr
bootbox-rd && flux -n cozy-system delete hr bootbox-rd` can fail when grep
returns non-zero and aborts the chain; change it to explicitly test for the
presence of "HelmRepository" by running `kubectl -n cozy-system get hr
bootbox-rd -o yaml 2>/dev/null | grep -q HelmRepository` in an if-statement and
only then call `flux -n cozy-system suspend hr bootbox-rd` and `flux -n
cozy-system delete hr bootbox-rd`, ensuring stderr is silenced and the flux
commands are not skipped due to grep’s exit code.
🧹 Nitpick comments (3)
content/en/docs/operations/upgrades/_index.md (3)

25-26: Clarify the script location and execution.

The instruction references /hack/migrate-to-version-1.0.sh but doesn't specify where users should obtain the Cozystack repository or from which directory to run the script. Users may be confused about whether they need to clone the repository and which version/branch to use.

📝 Suggested clarification
-- Generate and apply the main package for your installation with the `/hack/migrate-to-version-1.0.sh` script from the Cozystack repository.  
-  It will gather values from existing configmaps in the `cozy-system` namespace, and assemble a `Package` resource with all the values.
+- Clone the Cozystack repository at the v1.0 release tag, and run the `/hack/migrate-to-version-1.0.sh` script from the repository root.  
+  It will gather values from existing configmaps in the `cozy-system` namespace, and assemble a `Package` resource with all the values. Review and apply the generated resource.

28-29: Consider using code blocks for multi-line commands.

While the inline backticks are functional, placing these commands in a code block would improve readability and make them easier to copy-paste.

♻️ Suggested formatting improvement
-- Scale down `installer` and `assets-server` so that they do not interfere with the new control-plane:  
-  `kubectl -n cozy-system scale deploy/cozystack --replicas=0`  
-  `kubectl -n cozy-system scale sts/cozystack-assets --replicas=0`
+- Scale down `installer` and `assets-server` so that they do not interfere with the new control-plane:
+  ```bash
+  kubectl -n cozy-system scale deploy/cozystack --replicas=0
+  kubectl -n cozy-system scale sts/cozystack-assets --replicas=0
+  ```

22-36: Consider adding verification steps and troubleshooting guidance.

For a major version upgrade, users would benefit from:

  • Verification steps after each critical operation (e.g., checking that CRDs are applied, operator is running)
  • Backup/snapshot recommendations before starting the upgrade
  • A troubleshooting section for common issues
  • Expected timeline or progress indicators

This would significantly improve the user experience and reduce support burden.

Comment on lines +18 to +19
- Take `cozypkg` from the Cozystack Releases page: https://github.com/cozystack/cozystack/releases
- Take `cozyhr` from its repository: https://github.com/cozystack/cozyhr/releases
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Format URLs as proper markdown links.

The bare URLs should be formatted as proper markdown links for better readability and to comply with markdown standards.

📝 Proposed fix
-- Take `cozypkg` from the Cozystack Releases page: https://github.com/cozystack/cozystack/releases
-- Take `cozyhr` from its repository: https://github.com/cozystack/cozyhr/releases  
+- Take `cozypkg` from the [Cozystack Releases page](https://github.com/cozystack/cozystack/releases)
+- Take `cozyhr` from its [repository releases](https://github.com/cozystack/cozyhr/releases)
📝 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
- Take `cozypkg` from the Cozystack Releases page: https://github.com/cozystack/cozystack/releases
- Take `cozyhr` from its repository: https://github.com/cozystack/cozyhr/releases
- Take `cozypkg` from the [Cozystack Releases page](https://github.com/cozystack/cozystack/releases)
- Take `cozyhr` from its [repository releases](https://github.com/cozystack/cozyhr/releases)
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

[warning] 18-18: Bare URL used

(MD034, no-bare-urls)


[warning] 19-19: Bare URL used

(MD034, no-bare-urls)

🤖 Prompt for AI Agents
In `@content/en/docs/operations/upgrades/_index.md` around lines 18 - 19, Replace
the bare URLs in the upgrade notes by turning the two lines referencing cozypkg
and cozyhr into markdown link syntax (e.g.,
"[cozypkg](https://github.com/cozystack/cozystack/releases)" and
"[cozyhr](https://github.com/cozystack/cozyhr/releases)") so the text for the
items remains the same but the links are properly formatted; update the lines
that contain the literals "cozypkg" and "cozyhr" to use the bracketed link form.

`kubectl get hr -A`
- After the upgrade is complete, it's time for a cleanup:
`flux -n cozy-system suspend hr cozystack-resource-definition-crd && flux -n cozy-system delete hr cozystack-resource-definition-crd`
`kubectl -n cozy-system get hr bootbox-rd -o yaml | grep -q HelmRepository && flux -n cozy-system suspend hr bootbox-rd && flux -n cozy-system delete hr bootbox-rd`
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

The conditional cleanup command may fail unexpectedly.

The command uses grep -q to check for HelmRepository and conditionally executes flux commands. If grep fails (exit code 1 when pattern not found), the entire command chain will stop due to shell error handling, potentially causing confusion. Consider adding explicit instructions or error handling.

🛡️ Proposed fix for robustness
-  `kubectl -n cozy-system get hr bootbox-rd -o yaml | grep -q HelmRepository && flux -n cozy-system suspend hr bootbox-rd && flux -n cozy-system delete hr bootbox-rd`
+  ```bash
+  # Only cleanup bootbox-rd if it uses HelmRepository
+  if kubectl -n cozy-system get hr bootbox-rd -o yaml 2>/dev/null | grep -q HelmRepository; then
+    flux -n cozy-system suspend hr bootbox-rd
+    flux -n cozy-system delete hr bootbox-rd
+  fi
+  ```

Alternatively, provide clearer guidance:

-  `kubectl -n cozy-system get hr bootbox-rd -o yaml | grep -q HelmRepository && flux -n cozy-system suspend hr bootbox-rd && flux -n cozy-system delete hr bootbox-rd`
+  - If `bootbox-rd` HelmRelease exists and uses HelmRepository, clean it up:  
+    `kubectl -n cozy-system get hr bootbox-rd -o yaml | grep -q HelmRepository && flux -n cozy-system suspend hr bootbox-rd && flux -n cozy-system delete hr bootbox-rd`  
+    (It's safe to ignore errors if this resource doesn't exist)
📝 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
`kubectl -n cozy-system get hr bootbox-rd -o yaml | grep -q HelmRepository && flux -n cozy-system suspend hr bootbox-rd && flux -n cozy-system delete hr bootbox-rd`
🤖 Prompt for AI Agents
In `@content/en/docs/operations/upgrades/_index.md` at line 35, The one-liner
using backticks to run `kubectl -n cozy-system get hr bootbox-rd -o yaml | grep
-q HelmRepository && flux -n cozy-system suspend hr bootbox-rd && flux -n
cozy-system delete hr bootbox-rd` can fail when grep returns non-zero and aborts
the chain; change it to explicitly test for the presence of "HelmRepository" by
running `kubectl -n cozy-system get hr bootbox-rd -o yaml 2>/dev/null | grep -q
HelmRepository` in an if-statement and only then call `flux -n cozy-system
suspend hr bootbox-rd` and `flux -n cozy-system delete hr bootbox-rd`, ensuring
stderr is silenced and the flux commands are not skipped due to grep’s exit
code.

Migrations now automatically clean up legacy components:
- Old installer deployment
- Assets-server statefulset
- Obsolete HelmReleases (cozystack-resource-definition-crd, bootbox-rd)

Manual cleanup steps are no longer required.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
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.

2 participants