feat: add oci generator for applicationsets #26121
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces OCI generator support for ApplicationSets.
Design Decisions
For getting the content of the OCI Artifact, requests to the repo-server via the gRPC API is needed by adding dedicated OCI-specific gRPC APIs (GetOciDirectories and GetOciFiles) to the repo-server.
Why not reuse existing Git APIs?
While it would be technically possible to reuse the existing GetGitDirectories and GetGitFiles APIs for OCI artifacts with checking the repoURL on repo-server side, this would be a misuse of the API semantics. These APIs are explicitly designed for Git repositories, and overloading them for OCI artifacts would violate the principle of clear API boundaries and make the codebase harder to understand and maintain.
Why not generalize to GetDirectories/GetFiles?
A more elegant solution would be to generalize these APIs to source-agnostic methods like GetDirectories and GetFiles. However, this would be a breaking change to the gRPC API, requiring updates to all clients and potentially breaking external integrations.
Chosen approach: Shared logic with dedicated APIs
To balance maintainability and API stability, this implementation:
Closes #26055
Checklist: