Skip to content

refactor: move DependencyReference to apis/meta#1212

Open
vecil wants to merge 1 commit into
fluxcd:mainfrom
vecil:refactor/extract-dependencyreference-type-to-meta
Open

refactor: move DependencyReference to apis/meta#1212
vecil wants to merge 1 commit into
fluxcd:mainfrom
vecil:refactor/extract-dependencyreference-type-to-meta

Conversation

@vecil
Copy link
Copy Markdown

@vecil vecil commented May 22, 2026

Extract DependencyReference to apis/meta (Fix #1034)

Summary

This PR moves the duplicated DependencyReference type from controller-specific APIs into apis/meta to provide a single shared implementation across Flux components.

Changes

  • Added DependencyReference to apis/meta
  • Updated ObjectWithDependencies to use []DependencyReference
  • Added MakeDependsOn helper with CEL (@expr) support
  • Updated dependency sorting logic and tests accordingly
  • Added deepcopy implementations for the new type

Motivation

DependencyReference was duplicated across KC and HC APIs. Centralizing it in apis/meta removes duplication and enables consistent dependency handling, including CEL-based readiness expressions used by the Flux CLI.

Notes

  • Backward behavior preserved.
  • Follow-up update will be required in fluxcd/flux2 to use the shared type in utils.MakeDependsOn.
  • Follow-up update will be required in fluxcd/kustomize-controller and fluxcd/helm-controller to use the shared type in meta.DependencyReference.
  • Cherry-picked from refactor: move DependencyReference to apis/meta #1129, thank you very much @Iam-Karan-Suresh 🚀

Signed-off-by: Iam-karan-suresh <karansuresh.info@gmail.com>
Co-authored-by: Vincent Dely <vincent.dely@ik.me>
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.

Extract DependencyReference to apis/meta

2 participants