Repository navigation
Post upgrade fixes for v1.0 packagesources - #1930
Conversation
Signed-off-by: nbykov0 <[email protected]>
📝 WalkthroughWalkthroughThis PR updates Helm release configurations, deployment namespaces, component dependencies, and template inclusions across platform packages. Changes include releaseName and namespace modifications, a new metrics-server dependency addition, and new package template includes for the system bundle. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
Summary of ChangesHello Nikita (@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 implements several critical fixes for v1.0 package sources following a recent platform upgrade. The changes primarily involve adjusting component configurations, updating namespace assignments, and ensuring correct dependencies and inclusions within the system bundles. These modifications are essential for the stable operation of the platform's services post-upgrade. Highlights
🧠 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 AssistThe 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
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 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 (@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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a series of fixes for v1.0 packagesources, likely following a system upgrade. The changes involve correcting release names and namespaces in package source definitions, adding a missing dependency for monitoring agents, and including necessary packages like linstor-scheduler and metrics-server into the system bundle. Overall, the changes are logical and appear to be necessary corrections. I have one suggestion to improve the maintainability of a template file by reordering package inclusions to better reflect their dependency hierarchy.
| {{include "cozystack.platform.package.default" (list "cozystack.vertical-pod-autoscaler" $) }} | ||
| {{include "cozystack.platform.package.default" (list "cozystack.metrics-server" $) }} | ||
| {{include "cozystack.platform.package.default" (list "cozystack.monitoring-agents" $) }} | ||
| {{include "cozystack.platform.package.default" (list "cozystack.goldpinger" $) }} | ||
| {{include "cozystack.platform.package.default" (list "cozystack.prometheus-operator-crds" $) }} |
There was a problem hiding this comment.
For better readability and maintainability, it's good practice to order package inclusions based on their dependencies. While the deployment order is handled by dependsOn, aligning the order in this file improves clarity for future maintenance.
The dependencies are as follows:
monitoring-agentsdepends onmetrics-server.metrics-serverdepends onprometheus-operator-crds.
I suggest reordering these lines to reflect this dependency chain.
{{include "cozystack.platform.package.default" (list "cozystack.vertical-pod-autoscaler" $) }}
{{include "cozystack.platform.package.default" (list "cozystack.prometheus-operator-crds" $) }}
{{include "cozystack.platform.package.default" (list "cozystack.metrics-server" $) }}
{{include "cozystack.platform.package.default" (list "cozystack.monitoring-agents" $) }}
{{include "cozystack.platform.package.default" (list "cozystack.goldpinger" $) }}There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@packages/core/platform/sources/cozy-proxy.yaml`:
- Around line 19-21: The Helm releaseRename from "cozystack" to "cozy-proxy"
will leave the old release behind and can create duplicate/orphaned
cluster-scoped resources; update the upgrade path to explicitly uninstall or
migrate the old release before installing the new one by adding a
pre-upgrade/uninstall step in your deployment/upgrade script or a Helm
pre-upgrade hook that runs helm uninstall --namespace cozy-system cozystack (or
runs a migration job), and document this manual step in the chart/README so
operators know to remove or reconcile the old "cozystack" release prior to
applying the new releaseName "cozy-proxy".
In `@packages/core/platform/sources/metrics-server.yaml`:
- Around line 20-21: The namespace change of the metrics-server Helm release
from "cozy-metrics-server" to "cozy-monitoring" will create a new release and
leave cluster-scoped resources owned by the old release; add an explicit
migration/upgrade step that detects the prior release in "cozy-metrics-server"
and either uninstalls it or transfers ownership before applying the new manifest
in "cozy-monitoring": implement a pre-install hook or CI job that (1) checks for
the previous release name/namespace "cozy-metrics-server", (2) deletes or
migrates cluster-scoped resources (ClusterRole, ClusterRoleBinding, APIService)
or uses helm --replace/ --cleanup-on-fail patterns to avoid orphaned resources,
and (3) only proceeds to apply the new install namespace "cozy-monitoring" when
the prior release and its cluster-scoped resources are removed or ownership
reconciled.
## What this PR does Fixes v1.0 packagesources. ### Release note ```release-note V1.0 packagesources fixed after an upgrade was performed. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated platform component configurations for cozy-proxy and metrics-server deployments. * Reorganized monitoring component namespace allocation. * Added metrics server as a dependency in the monitoring pipeline. * Integrated new system components (linstor-scheduler and metrics-server) into the platform templates. * Refined HelmRelease chart references for vertical pod autoscaler. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
What this PR does
Fixes v1.0 packagesources.
Release note
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.