Skip to content

Conversation

@ipaqsa
Copy link
Member

@ipaqsa ipaqsa commented Dec 18, 2025

It provides ApplicationHookInput with NamespacedObjectPatchCollector and ApplicationDependencyContainer

@ipaqsa ipaqsa requested a review from ldmonster December 18, 2025 22:13
@ipaqsa ipaqsa self-assigned this Dec 18, 2025
@ipaqsa ipaqsa added enhancement New feature or request go Pull requests that update go code labels Dec 18, 2025
@ipaqsa ipaqsa marked this pull request as draft December 18, 2025 22:13
@ipaqsa ipaqsa force-pushed the feature/application-hooks branch from d5d34b8 to a8472f1 Compare January 17, 2026 11:19
Signed-off-by: Stepan Paksashvili <[email protected]>
@ipaqsa ipaqsa force-pushed the feature/application-hooks branch from 4455b24 to 7bd80ba Compare January 17, 2026 20:07
Signed-off-by: Stepan Paksashvili <[email protected]>
@ipaqsa ipaqsa marked this pull request as ready for review January 17, 2026 20:31
@ldmonster ldmonster requested a review from Copilot January 19, 2026 09:54
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces support for application hooks alongside existing module hooks, implementing a generic hook system using Go generics. The main additions include ApplicationHookInput with namespace-scoped operations via NamespacedPatchCollector, and a dedicated ApplicationDependencyContainer interface.

Changes:

  • Introduced generic Hook[T Input] type supporting both module and application hooks
  • Added ApplicationHookInput with Instance interface for application context and NamespacedPatchCollector for namespace-scoped Kubernetes operations
  • Refactored internal architecture with new executor abstraction layer (moduleExecutor and applicationExecutor)

Reviewed changes

Copilot reviewed 33 out of 35 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
pkg/hook.go Introduced generic Hook type with ApplicationHookInput and Instance interface
pkg/dependency.go Added ApplicationDependencyContainer interface (subset of DependencyContainer)
pkg/patch.go Added NamespacedPatchCollector interface and removed deprecated type aliases
pkg/registry/registry.go Refactored to support generic hook registration with type-based routing
internal/executor/*.go New executor abstraction with separate module and application implementations
internal/objectpatch/*.go Implemented PatchCollector and NamespacedPatchCollector with operation types
internal/controller/controller.go Updated to use executor registry instead of direct hook registry
examples/single-file-app-example/ New example demonstrating application hook usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Stepan Paksashvili <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants