-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the local source type #464
Comments
Added to current milestone |
Are we putting a line in the sand that we don't want to support local (e.g. ConfigMap) bundle sources, or is this something we can re-evaluate over time? Do we have an idea of any explicit use cases for why users want/need to be able to use ConfigMaps to house bundle contents? |
I imagine both can be useful -- some users will be more comfortable with configmaps then tar.gz files as a source type. I don't see why adding binary necessarily involves ripping out local. Furthermore, from a planning perspective, local bundle support was on the radar for a while, triaged, groomed, added to a milestone, and delivered. The binary feature sort of came from nowhere and is removing that local feature in the very next release. I'm not convinced this is optimal. |
Yeah, that's a good point. It's possible I'm missing some context on why we're pursuing this implementation though during my brief hiatus from rukpak. Maybe this is something that SDK can immediately hook into as well, which implies that we'd want to pursue a more robust local bundle content implementation? |
That's true, SDK could wrap the binary type and produce a Bundle without any concerns in regards to size. From a GitOps perspective though, checking in a configmap and a bundle that references it is more transparent than a tar.gz |
Even if we kept the configmap-based source in, I think we'd want to solve problem 2 that I mention in the issue description (configmaps don't natively support directory hierarchy). That's very limiting since most bundle formats will very likely end up evolving to use a directory somewhere. My perspective is that we're currently trying to solve the problem of "how does a developer work with an arbitrary local bundle?" and I feel like the
This seems like a different use case, and one that I'm definitely interested in discussing more. I think Perhaps we should step back and enumerate the problems we're trying to solve before we proceed? |
Another point that we discussed earlier today was the limitation in ConfigMaps where you can't easily mock a directory structure, which may be prohibitive when expanded to other bundle formats. Should we re-title this issue to be centered around "Introducing the binary source type", so there's some signal in the release notes for what's being added here? That issue title may need some work as there's potential for removal of the source type entirely. |
local
source implementation has a few drawbacks
I'm also not a huge fan of the name |
Regarding GitOps, I was referring to the general scenario where you check in some k8s objects into a repository, that then get synced down into the cluster, and the status of those objects is then updated as they get reconciled. |
I'm actually not either. I think I picked that up from the OpenShift My thought was
So you're thinking fully I did notice that the OpenShift source:
configmaps:
- destinationPath: "/"
configMapName: my-bundle-root
- destinationPath: "/manifests"
configMapName: my-bundle-root-manifests
- destinationPath: "/metadata"
configMapName: my-bundle-root-metadata What would folks think about the following?
I think this would completely solve the issue of the directory hierarchy AND with item 5, we could essentially end up supporting arbitrary size bundles and arbitrary size bundle directories with the one limitation that no single file can be greater than the etcd value size limit. |
I think the proposed API is reasonable -- slightly more complex, but if we document it it should be fine. If a user just wants to use a plain configmap bundle, they can just use one For item 3 -- this would be done via an update to the core webhook, right? It may be expensive to query for all configmaps, the webhook should probably have to cache configmaps, at least those with a specified label. We can require that label to be present on the configmap on creation. For item 5 -- this could also potentially just return an error. It's hard to guess what the user's intention is when they have conflicting |
For 5, you're saying allow multiple configmaps to refer to the same directory, but forbid configmaps mounted in the same location from sharing the same key? |
I think 3 would happen in the unpack stage. We'd just have a bundle unpack failure if the underlying configmaps didn't meet the requirements. I think 4 would require a validating webhook on configmap deletion. I think we should limit bundle configmaps to only be allowed in the rukpak-system namespace, so that would mean the validating webhook could at least be scoped there. If we wanted to further scope to require |
Should we check with the build API team on whether they've run into any issues with this API design? What Joe outlined seems like a reasonable approach to me, although I worry about the additional complexity we're introducing here. Maybe we have some rope though with the API design given the v1alpha1 versioning. I think I'm favor of this new approach though, and have the added benefit of an easy way to expose resolveset bundle contents through ConfigMap resources (and therefore we also have a record of resolution outcomes?) while providing an escape hatch for bundles that have larger size needs. And an attempt at putting it all together:
Thoughts? I'm still trying to get up-to-speed on the binary/upload manager aspect, so it's possible I'm missing some context over these past couple of weeks. |
I repurposed the description of this issue to focus primarily on the improvements we could make to the Should we bump this out of the 0.8 milestone? |
Works for me 👍 |
This issue has become stale because it has been open 60 days with no activity. The maintainers of this repo will remove this label during issue triage or it will be removed automatically after an update. Adding the |
Getting a simple source implementation in place to support local bundle content is a major quality of life improvement from the current
local
source that uses a configmap to store bundle contents. However, this implementation has two major drawbacks:To improve the local source type, while still enabling the flexibility of storing bundle contents in configmaps, I would propose a few updates:
local
toconfigmaps
to make it clear that the backing storage is based on the configmap APIimmutable: true
, don't allow configmaps to be deleted if they are referenced by a bundle).This solution improves on item 1 above in that it effectively changes the bundle size maximum from "1MB for the entire bundle" to "1MB for each file in the bundle". It's still not quite as good as the solution proposed in #472, but it will be a vast improvement over the current
local
limitation.This solution completely solves 2 because it enables arbitrary directory hierarchies to be described in the API.
The text was updated successfully, but these errors were encountered: