Porch Roadmap #450
Replies: 8 comments 3 replies
-
cc @mortent @henderiw @tliron @s3wong @nephio-project/sig-automation |
Beta Was this translation helpful? Give feedback.
-
So much to discuss. :) Some very quick thoughts --
|
Beta Was this translation helpful? Give feedback.
-
Sure, that works.
Yeah, that's a good point. The Package Revision though is a "container" of other resources, though, and its size will be relatively constant. That is, it aggregates resources on average probably > 10:1 ratio. Still, that may still be an issue with etcd at high scale. We could consider backing it with something else. But it sure is nice to get all the free behavior from CRs - without that you have ti implement it all yourself (metadata, watches, etc. etc.). I wonder if anyone has created a generalized aggregated API server backed by SQL...? But it is really important to get out of the business of maintaining a cache on top of git/oci the way we do today. I think we could probably do the PR-to-CR move, and then even later move to a new and better aggregated API server to back PRs in the future for scalability. I think trying to implement a new and different aggregated API server to back package revisions is ~ 10x the work. But I would love to be proven wrong.
Yeah, we can think about how to make it flexible to support different options. |
Beta Was this translation helpful? Give feedback.
-
Taking over porch sounds exciting and definitely makes it easier for us (Nephio community) to contribute code to it. At the same time I am surprised that the kpt project is willing to give up control on porch and decided to focus on the CLI side of things instead. To be honest kpt seems to me quite hollow without porch (especially if they also remove ConfigSync, as well). But that's just me thinking out loud, however I have some actual questions, as well:
|
Beta Was this translation helpful? Give feedback.
-
I plan to put it as a directory under nephio, unless folks have some objections. I think it's simpler that way.
I think we do not want to encourage external users for now. Maybe someday, but we have enough to do already! So, yes, it would cease to be a sovereign project and just be part of Nephio.
Correct. But I expect they will change a little as well, and that in fact we may have lots of packages without any of these resources. We will not need them if they in-cluster resources give us what we need and we do not need to reconcile those resources in the CLI. On the other hand, I could see a fully CLI-based version of PackageVariant as well...so...I think this part is much less clear, and we'll have to discuss it and decide what's best. A concern here is really that it is a "Kptfile" resource, again outside of our control, and ties us directly to kpt as a hard dependency. |
Beta Was this translation helpful? Give feedback.
-
I'm a "Unix philosophy" guy, so I have a personal preference to put it in a separate repo, called "porch". At least for now, it's a generic orchestrator, not Nephio-specific. This of course may evolve, perhaps some things would move to "nephio", some things remain in "porch". |
Beta Was this translation helpful? Give feedback.
-
I admit not to have engaged in all the meetings lately; but I'm surprised by this direction. I understand Porch is a key component of Nephio today. Should Nephio be in the business of supplying orchestration related tooling? Nephio scope is about infra and nf LCM. |
Beta Was this translation helpful? Give feedback.
-
Maybe, maybe not. But we have the dependency now, so tactically we need to continue its support since the original project is not planning to do so. To mitigate the risks you raise, the plan includes 1) removal of all code we don't actually need; 2) not promoting it for use outside of Nephio (for now at least). We can decide to migrate to something else later, but we need the continuity now.
I actually disagree with that statement ("about infra and nf LCM") and others in the community also have a different opinion (and therefore we have the Enterprise discussion in the TSC, for example). In order to manage multiple domains, it's clear that a general purpose tool is needed; there is nothing super special about NF and NF infra - mostly it is the same stuff, just harder / more complex. I agree though with the basic point - that we should identify exactly what we need and scope it to that. I also think it makes sense to see if we should transition away from Porch (this plan already reduces dependency on kpt). But those are strategic questions we will address over time. The first part of this plan is tactical, and the second, less developed, is strategic. Tal has talked about abstracting this part into an interface and then Porch can just be a reference implementation. I think that's viable. A couple words of caution, though:
Along the lines of the interface, though, I think the key thing to recognize is our K8s APIs. I think the core pieces we need are:
I think it should be possible to implement these concepts with different tooling. But it's a bigger question that we will need to answer later ... likely post-R3. |
Beta Was this translation helpful? Give feedback.
-
As discussed in Nov 15, 2023 SIG Automation meeting, the kpt project is focusing on the CLI side of things, which means they are giving us the Porch pieces. I will be moving that code over to the nephio repository. This allows us to evolve it in the ways that are most useful to us. I want to document my current thinking in this area, and get the community feedback and ideas.
High-level Migration Plan
nephioctl
Tool. Thekpt alpha rpkg
functions would move to this new tool, along with the tests associated with them.Porch Evolution In Nephio
Here's where it gets fun. There's a lot of stuff that we can do to improve Nephio functioning. The first step will be some clean up. There are a number of parts of Porch that we do not use, and therefore no longer need to maintain. The idea here is to simplify before making some of the other architectural changes that Wim, Tal, me, and others have been discussing.
Clean Up
Architectural Improvements
PackageRevision to CRD
Right now, PackageRevisions are served up by the Porch aggregated API server. They are discovered in the Git or OCI repository, and cached in memory by the Porch server. API requests to retrieve these package revisions are served out of that cache. Additionally, some metadata (e.g., labels) are associated with a
packagerev
CR. That is, the data about a package revision is split across the API server and git.Porch is constantly polling to see if there have been out-of-band changes to the underlying repository, and refreshing the cache. This is expensive (as is maintaining it in memory). In the most recent few PRs I have improved this so that all mutations are done on the underlying repo, and then the cache refreshed. But it's really not the right architecture.
The plan is to move to PackageRevisions as ordinary custom resources. See kptdev/kpt#3630 for more discussion, this is an ongoing design discussion (please join in!). But the basic idea is that a PackageRevision becomoes a simple pointer into a repo - either to a commit, tag, or branch (for drafts in particular), and a directory. If we want it, we can have a package discovery controller that works something like what the Porch server does for package discovery today, but it will be asynchronously reconciling an ordinary CR rather than trying to maintain a consistent cache. In fact it probably just needs to populate rather than fully reconcile them (we can discuss what we need). It really is probably totally unnecessary. You will be able to create and manage PackageRevisions like any other resource (and the names will become more sensible).
With this change, the only thing served out of the aggregated API server would be the PackageRevisionResources.
Eliminate Hard Dependency on kpt
Requiring
kpt
has been a friction for Nephio from Day 1. We don't really needkpt
, we need "config-as-data". The move of Porch to Nephio makes this viable. You can still usekpt
for client-side mutations, but it won't be required (since therpkg
commands will be innephioctl
).To complete this, we need to stop requiring a Kptfile in our packages. The Kptfile is used for a few things today:
The change in how a PackageRevision is defined described above makes it possible to change all of this. If a PackageRevision is a pointer into a repo directory at a given tag/branch/commit, we don't need the first one at all. If we want to make a package discoverable, we could have some resource we add to the package and have controller that does package discovery. I am not sure we want to do that, and it won't be mandatory. We can now just create those PackageRevision like any other resource. There's also a lot of other stuff we might want to discover about a package, which would be used to feed the dependency management system. But that's all open for future discussion.
The upstream identity can be captured in an in-package resource, or in an in-cluster PackageRevision resource. As the current plan stands, a PackageRevision resource would still need an associated Repository, so if we want to be able to just point to a git or OCI instance as an upstream, we would need a little more flexibility here. I think it's still open to discussion whether this lives in-package or in-cluster (in-package things can be manipulated by CLIs locally, without server access).
The pipelines can just be another resource that Porch interprets when saving a package, as it does today. Wim also has some ideas and prototypes that would eliminate the need for the pipeline altogether.
Readiness gates and package conditions, should probably become part of the PackageRevision resource itself, like other K8s resources. For pipeline execution, we may want to project these down to the package resource list. That would be needed to support our existing function pipelines, for example. But it's not too hard to do.
Functional Enhancements
We have discussed bunch of functional enhancements. These probably should wait on the architectural changes. But here they are for discussion:
As I mentioned, Wim has some additional prototypes that may replace some of these enhancements.
Logistics
I am working on the migration and plan to have it mostly done by the end of the year. I hope to have some help with the architectural improvements, and show some progress on those in January. The target would be to have all of those done around the end of 2024Q1; I would hope to get to some of the functional enhancements as well, certainly for R3.
Beta Was this translation helpful? Give feedback.
All reactions