-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Description
Summary
Currently, Argo CD supports obtaining manifests from either a Git repository, a Helm chart repository, or a Helm chart stored within an OCI registry. Given that OCI registries are more frequently being used to store content aside from container images, introduce a mechanism for storing and retrieving manifests that can be used by any of the existing supported tools in any of the supported methods of representing assets that are to be applied to a Kubernetes environment.
Motivation
Implementation of the Native OCI Support proposal.
Proposal
High Level Plan
Define baseline primitives
Prior to the implementation of this proposal, several baseline primitives need to be discussed and agreed upon.
-
Tooling for managing OCI Content
ORAS (OCI Registry as Storage) is a CLI tool and library for managing arbitrary content in OCI registries. Not only does it contain the features necessary for implementing OCI support in Argo CD, it is already being used both in several other Open Source projects, including Helm as well as Argo CD itself.
.
ORAS/Argo CD Integration
. -
Packaging Format
To enable maximum compatibility with the existing features of Argo CD, content stored within OCI artifacts should be in a format representable as to current methods for managing content. The result is a gzipped compressed tar archive containing resources that can be utilized by any of the supported tools in Argo CD.. -
OCI Attributes
The Open Container Initiative makes extensive use of Media Types in order to describe content and how they should be managed. The OCI Image Specification (image-spec) provides guidelines for how Artifacts should be organized and described.
.
Given that the goal of this effort is to provide first class support for OCI content, two (2) new OCI Media Types will be introduced:
application/vnd.cncf.argoproj.argocd.content.v1.tar+gzip
- Primary asset stored within the OCI artifact containing a gzip compressed tar archive of Argo CD resources. Further details are outlined in the prior section.application/vnd.cncf.argoproj.argocd.config.v1+json
- An OCI Image Configuration
Task Breakdown
-
Developing an OCI Client (using ORAS (OCI Registry as Storage))
a. Pulling from OCI registry
b. Packaging
c. Creation and extraction
d. Publishing to OCI registry -
ArgoCD to accept OCI repository sources
We can start by supporting the OCI repositories without CLI and GUI support. Users can apply an ArgoCD application via kubectl commands. We did a similar exercise for Multiple sources application. UI and CLI support can be included as a follow-up to the OCI support itself. To support OCI, we would need the below changes:- Credential Management (Repository Secret)
- Investigate appropriate methods for managing authentication to OCI registries
- Introduce new mechanisms or build upon existing functionality
- Differentiation between OCI based Helm Charts?
- repo-creds secret type can probably be reused
- Investigate appropriate methods for managing authentication to OCI registries
- Repo Server Integration
- Investigate feasibility of defining new interface for managing content sources (Git/Helm/OCI)
- Develop capabilities to generate manifests from OCI source
- Ensure path transversal is maintained/handled
- Webhook Integration
- Accept reception via invocation from OCI registries
- Investigate payloads from major OCI registries (DockerHub, Quay, GitHub Container Registry, Google Container Registry, etc) to determine requirements
- Define new key(s) in argocd-secret for OCI webhook support
- Credential Management (Repository Secret)
-
Argo CD CLI support / integration
- Check / Update existing commands to work for OCI registries
- Add oci subcommand (additional enhancement to make it easier for users)
- Packaging
- Publishing
- Optionally accept content produced/provided by external tooling/process
- Retrieving
- Optional extraction
-
User Interface Enhancements
- Application Create and Details page to be updated
- Implementation of enhancements to user interface
- Credentials
- Certificates
- Investigate where additional changes are required to support native OCI management
Metadata
Metadata
Assignees
Labels
Type
Projects
Status