Skip to content

Conversation

@robinlieb
Copy link
Member

@robinlieb robinlieb commented Jan 22, 2026

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:

  • Adds new OCI-specific gRPC methods that mirror the Git API structure (excluding non-related properties)
  • Extracts shared logic into common utility functions (repo_path_utils.go) used by both Git and OCI generators in the ApplicationSet controller
  • Implements parallel OCI-specific methods in the repo-server that share filtering and path discovery logic with their Git counterparts
  • This approach provides a clean API surface while maximizing code reuse through shared utility functions on both the ApplicationSet and repo-server sides.

Closes #26055

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@robinlieb robinlieb requested review from a team as code owners January 22, 2026 19:36
@bunnyshell
Copy link

bunnyshell bot commented Jan 22, 2026

🔴 Preview Environment stopped on Bunnyshell

See: Environment Details | Pipeline Logs

Available commands (reply to this comment):

  • 🔵 /bns:start to start the environment
  • 🚀 /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

Signed-off-by: Robin Lieb <34332703+robinlieb@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OCI Generator for ApplicationSets

1 participant