Repository navigation
[cozystack] Major Architecture Refactoring - #1641
Andrei Kvapil (kvaps) wants to merge 48 commits into
Conversation
…ate pod Signed-off-by: Andrei Kvapil <[email protected]>
Signed-off-by: Andrei Kvapil <[email protected]>
|
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 160 files out of 299 files are above the max files limit of 100. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the ✨ Finishing touches
🧪 Generate unit tests (beta)
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 |
3f9a966 to
98da8a4
Compare
Signed-off-by: Andrei Kvapil <[email protected]>
98da8a4 to
222b582
Compare
Signed-off-by: Andrei Kvapil <[email protected]>
Signed-off-by: Andrei Kvapil <[email protected]>
Signed-off-by: Andrei Kvapil <[email protected]>
5ae9115 to
002a0f7
Compare
Signed-off-by: Andrei Kvapil <[email protected]>
1b90089 to
fb924e7
Compare
Signed-off-by: Andrei Kvapil <[email protected]>
d8a115d to
71484d1
Compare
Signed-off-by: Andrei Kvapil <[email protected]>
Signed-off-by: Andrei Kvapil <[email protected]>
Signed-off-by: Andrei Kvapil <[email protected]>
71484d1 to
ea9d44b
Compare
Signed-off-by: Andrei Kvapil <[email protected]>
Signed-off-by: Andrei Kvapil <[email protected]>
Signed-off-by: Andrei Kvapil <[email protected]>
f33a75f to
977e633
Compare
Signed-off-by: Andrei Kvapil <[email protected]>
fd54abd to
1e8de3c
Compare
|
I'm not sure how well-supported the flux-aio distribution is. (For sure it will make the distribution incompatible with Flux Operator.) Are there other reasons for this switch than the CNI dependency? I'm working on getting to be a Control Plane customer, to purchase Flux Enterprise - with Flux Operator it's very easy to drop in the Zero-CVE images distribution link. New flux patch releases (even without the Flux Enterprise) can be installed automatically and safely as soon as they become available, and we already do this with the Still, Control Plane updates flux-operator with every Flux release, and it's the fastest way to get the latest version of Flux. With flux-aio, we will have to wait for Stefan Prodan to do the flux-aio release - which sometimes comes a bit later. For example, Flux 2.7.4 was released two days ago, but flux-aio is still on Flux 2.7.3. I don't think this is necessarily a deal-breaker but I want to take a breath and make some contact so I confirm that Flux-AIO is really going to be supported into the future before I let you make this change without comment :) In reality, Flux 2.7 has been released for over a month and we're (Cozystack is) still on Flux 2.6, and that's partially conservativeness, I heard there were some regressions in the earlier 2.7 releases, but also partially just my fault, (been busy lately!) - I don't think Cozystack users have a high expectation of getting the latest Flux release instantly after it comes out, so maybe this is all fine. If there are other reasons than CNI, I would like to understand them better before this architecture change is finalized. I think that dropping the Flux Operator will also lose us the new (upcoming) Flux Status Page feature, that was announced at FluxCon. |
|
Also, I was excited to see the inclusion of I should also mention:
In case you haven't seen it in the Flux 2.7 upgrade notes: The Flux Operator simplifies upgrades, see this section "Upgrade Procedure" This is about migrating etcd storage. It isn't likely to have any impact on the way that Flux is used in Cozystack, based on the way it's currently used. Flux 2.7 is the first release to have this upgrade procedure requirement, the CLI now adds Anyway, in the general case, if your storage is in Git, and you upgrade your API versions on each resource by changing the API version in the file in the Git repository and pushing the change to Flux, that doesn't necessarily upgrade the storage version of the Flux resource in Etcd - until there is a change in resource version, Kubernetes will not touch the storage in etcd and the release will still be the same version, it is a "migrate-on-upgrade." The This is important when old beta APIs are finally deleted (really something that is maybe happening for the first time in Flux 2.7), in case the resources as they're defined in the cluster haven't changed since the API version moved from v1betaX to v1, then the storage won't be automatically migrated, and the upgrade will likely fail. It's just one extra step, not really a reason to not use flux-aio. I think that Stefan is going to continue building timoni and flux-aio - I think I can support this move. I just want to double-check and confirm everything so we're doing this as responsibly as possible. |
d6a8a40 to
49f86a9
Compare
Signed-off-by: Andrei Kvapil <[email protected]>
49f86a9 to
66ab048
Compare
|
One major negative downside to removing Flux Operator, is it removes also the opportunity for Flux Enterprise users. (I just got my Flux Enterprise subscription, and am about to test enabling it on Cozystack) This distro enables faster CVE responses, FIPS encryption, and other compliance checkboxes that would potentially be a blocker for example at my employer if they can't be covered. Flux Enterprise only covers these needs, Flux Upstream does just what the open source project supports. I'm not sure if your mind is made up about this already Andrei Kvapil (@kvaps) |
|
I guess this is free for the user to customize, if you will adopt flux-aio then I will support in my fork flux-operator and that is fine A-OK (it is a reversible decision and it will be easy enough for the user to switch it for themselves, whether they used a hypothetical distro-A or distro-B of Cozystack) |
|
Kingdon Barrett (@kingdonb) I'd like to preserve the opportunity of using flux enterprise with Cozystack. Right now you have the option to disable flux management by cozystack-operator: This way, you can install Flux manually via flux-operator and just let Cozystack use it. Another idea is to provide oportunity to the user to specify kustomize patches for flux-aio. It could be preserved in |
|
I think so, yes. Have to come back to this when I can put hands on it. I had some troubles upgrading to 0.38 but they're all resolved now! The changelog is big this time 😅 BYO Flux sounds like a very reasonable interface! I think that flux-aio is probably also compatible with the images from the Flux Enterprise distribution, but that's something I'll need to check out for myself yet as well. |
|
We have decided to not merge this PR as-is, and go apply changes one-by-one. The plan:
|
|
closed in favor #1816 |
Overview
This PR introduces a significant architectural refactoring of Cozystack, moving from a static bundle-based configuration system to a dynamic, Kubernetes-native resource-driven architecture using custom resources and operators.
Major Changes
1. Introduction of New Custom Resources
Bundle API (
cozystack.io/v1alpha1.Bundle)dependsOnmechanismPlatform API (
cozystack.io/v1alpha1.Platform)2. New Cozystack Operator Component
cozystack-operator(separate fromcozystack-controller)Bundleresources and creates corresponding HelmReleasesPlatformresources3. ApplicationDefinition Refactoring
CozystackResourceDefinitioncontroller withApplicationDefinitioncontroller4. Artifact Generation System
5. FluxCD Integration Improvements
flux-aio(All-In-One) package added to core6. Bundle Architecture Migration
distro-full.yaml,paas-full.yaml)iaas/bundle.yaml- Infrastructure-as-a-Service bundlenaas/bundle.yaml- Network-as-a-Service bundlepaas/bundle.yaml- Platform-as-a-Service bundlesystem/bundle-*.yaml- System bundles (minimal, hosted, full)7. Platform Package Restructuring
8. Migration System
packages/core/platform/images/migrations/9. Telemetry Relocation
cozystack-controllertocozystack-operator10. Build System Improvements
scripts/tohack/directoryhack/for better organization11. API and Controller Changes
system_helm_reconciler.go,tenant_helm_reconciler.gonamespace_helm_reconciler.go,applicationdefinition_controller.go12. Application Package Updates
Technical Details
New Dependencies
Removed Components
New Components
Impact
This refactoring provides:
Release note