-
Notifications
You must be signed in to change notification settings - Fork 0
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
OCI Registry support for App Platform #391
Comments
Ok, time for a report. This is what I've worked out so far. Providers tested for OCI supportQuay
GitHub Container Registry
Azure Container Registry
DockerHub
AWS ECR
What does it all mean
Key takeawaysAzure Container Registry (azurecr.io) looks like the one with the most mature OCI support of the tested registries, up there with AWS ECR. Since we are already using azurecr.io as a fallback mirror for quay.io, I'd suggest using it for our operations. GitHub Container Registry looks promising, but only as far as Helm charts go. We cannot store artifacts with ORAS there just yet. In other important news, OCI registries have limited chart discovery support.
Our current App Platform setup
Open questions
Also, we can extend helmclient to support OCI registries with |
@giantswarm/team-honeybadger we should discuss and resolve the "open questions" part before moving forward with this issue. I think integrating with OCI registries is doable, just needs some extra design/UX work to fit in the App Platform nicely. |
Towards the open questions:
Kind of taking a pragmatic approach here haha |
Nice write up. I agree Azure Container Registry makes sense since it's the most feature complete. On the open questions.
We could also use the Oras libraries directly but being on the latest Helm would be good. |
What about harbor? I don't see it mentioned here. I know it is fully OCI compliant. We've had discussions about having a local registry eg for edge setups in the management clusters in the long run. This would also make sense to make an installation even more independent in the sense of being its own failure domain. I don't want to bring in the harbor (or local registry) story as a dependency on this. But just for context how the product might develop in the future. |
@piontec and for posteriority: regarding search capabilities, there are none defined in OCI spec. We have to rely on image registy API or third-party tools. Relevant issues: helm/helm#10782 and helm/helm#10312 (comment) |
@teemow True, Harbor is fully OCI compliant and actively trying to pass official OCI Conformance test suite. However it was not included in this breakdown because it seemed out-of-scope for the purpose of us extending App Platform. |
Nice summary, Kuba!
|
|
Note to self: need to figure out Azure permission model so that the push to |
If I get it right (see example: https://docs.microsoft.com/en-us/azure/container-registry/container-registry-oci-artifacts) you can push anything to ORAS registries, and you just set artifact data type (like here https://docs.microsoft.com/en-us/azure/container-registry/container-registry-oci-artifacts#push-an-artifact).
In both cases, we can download the YAML files just from github pages, but this creates additional dependency: for chart downloading (in flux) we need to have both ORAS registry and github page operational. I'd like to have a solution, where full information is available in OCI/ORAS and doesn't need github pages at all. WDYT? |
@piontec What you have outlined is possible, but outside of the scope of OCI support for App Platform. A registry has to be fully OCI compliant, preferably passing OCI conformance test suite, to support ORAS without hiccups. Azure does that, that part works. However, additional changes need to be made to app-operator (possibly chart-operator as well) to allow them to correctly pull artifacts from registries supporting ORAS. Catalog CRs contain storage URL and type, so we'd have to accommodate for that URL to point to a ORAS-based Also, there is no clear indication of what Helm is planning in regard to OCI/ORAS catalogs. I think they are not ready to dive fully into ORAS and may go another route. I can see us adding that support, just in another ticket, because that would be something custom. |
OK, I agree, although a bit reluctantly... this solution that that needs two highly coupled services instead of one is a bit ugly, but I like the limited scope here. I just think we shouldn't treat that as a final solution and really follow up with more changes. Especially when people are already starting to use OCI registries almost the same way as git repos - just store your stuff there and set the correct metadata. With Zack, we're already talking about storing artifact signatures for delivery pipeline security that way, and it already has some support in community tools. So, I think the custom part of it is not much more custom than the |
Keeping the index.yaml served by GitHub Pages until it's clearer what direction Helm goes in for catalogs makes sense to me. Since the index.yaml has multiple apps and is updated over time finding a replacement for git or at least some kind of locking mechanism is needed. Our initial approach is also similar to the helm chart releaser. It maintains an index.yaml but the URLs point at GitHub releases. https://github.com/helm/chart-releaser-action |
Testing viability of OCI registry for App updatesThe repository: https://github.com/kubasobon/test-catalog/tree/image-update-public The setupYou need a GitRepository pointing to your GitHub repository, and a Kustomization to have it constantly in sync. Then you should create an ImageRepository, which tells Flux where to look for images. Next, create an ImagePolicy, which tells it which images and tags to watch for in the ImageRepository. Finally, create an ImageUpdateAutomation with all the details of where in the GitRepository to look for resources to update and how to update them. The App CR's version: 0.2.1 # {"$imagepolicy": "flux-giantswarm:kuba-hello-world:tag"} Please note the The experiment logs
|
It works 🚀 |
Nice! 🚀 |
Proposed structure for automatic app upgrades: https://github.com/giantswarm/automatic-app-upgrades. PTAL |
@giantswarm/team-honeybadger PTAL at the structure, we'll discuss next steps tomorrow. LMK if you need more context. |
It generalyl seems sensible to me - I am thinking how we can fix this nicely into the |
We already have automation example there, we just have to edit it to match the one here (mostly |
What remains now is making sure we have supported OCI catalogs. Based on the example of FADI apps:
Either we add support for catalog redundancy (GitHub - OCI), or they have to switch App CRs from one catalog to another (GitHub - OCI). |
Closing the issue. We have follow-up tickets ready. |
Business value:
User value: Make it easier to use app platform by supporting any OCI compatible registry.
Helm 3 has experimental support for OCI Registries but in our helmclient we only support Helm repositories.
A possible use for this is as a fallback registry for if GitHub Pages is unavailable. A challenge is how to add metadata files which we currently commit to the catalog git repo.
The text was updated successfully, but these errors were encountered: