Conversation
Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Stepan Paksashvili <81509933+ipaqsa@users.noreply.github.com>
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
Signed-off-by: Michail Sinelnikov <72449391+RottenRat@users.noreply.github.com>
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
4 tasks
ipaqsa
reviewed
Feb 2, 2026
ipaqsa
reviewed
Feb 2, 2026
Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
Signed-off-by: Stepan Paksashvili <stepan.paksashvili@flant.com>
ipaqsa
approved these changes
Feb 2, 2026
LazarenkoA
approved these changes
Feb 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces support for application-specific hooks that are automatically scoped to their namespace. It achieves this by creating separate configuration types (ApplicationHookConfig and ApplicationKubernetesConfig) that don't include NamespaceSelector, relying on external components (shell-operator/addon-operator) to inject namespace filtering based on the APPLICATION_NAMESPACE environment variable.
Changes:
- Introduced
ApplicationHookConfigandApplicationKubernetesConfigtypes for application hooks that omit namespace selection capabilities - Refactored hook configuration handling to support both module and application hooks through a common
Configtype constraint interface - Updated
Executor.Config()to returnanyinstead of typed pointer to accommodate both config types - Added conversion functions to translate both module and application configs to shell-operator format
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/hook.go | Adds ApplicationHookConfig and ApplicationKubernetesConfig types with validation; removes kebabCaseRegexp validation and NameSelector/NamespaceSelector validation methods |
| pkg/registry/registry.go | Updates hook registration to handle both module and application hooks with generic type parameters; adds validation and type-switching logic |
| internal/executor/executor.go | Changes Config() method to return any instead of typed pointer; adds documentation |
| internal/executor/module.go | Updates to use generic Hook type with both config and input type parameters |
| internal/executor/application.go | Updates to use generic Hook type for application hooks |
| internal/executor/registry/registry.go | Updates method signatures to use new generic Hook types |
| internal/executor/executor_test.go | Updates test to use new generic Hook type signature |
| internal/controller/controller.go | Adds helper functions for metadata extraction and config conversion; implements separate conversion for application vs module kubernetes configs |
| pkg/registry/registry_test.go | Adds test for application hook registration |
| examples/single-file-app-example/hooks/main.go | Updates example to use ApplicationHookConfig and ApplicationKubernetesConfig |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
added 4 commits
February 11, 2026 10:17
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
ldmonster
approved these changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added support for application hooks so that app subscriptions can monitor Kubernetes resources only in their namespace, and also performed a minor refactoring of configurations/interfaces for this purpose.
Tests:
Command to check triggers:
kubectl run trigger --image=%image-name% --restrat=Never -n %app-ns% --labels=[trigger.io/trigger=trigger](http://trigger.io/trigger=trigger)Before:
Start:
Run trigger of other ns:
Run trigger of app ns:
After:
Start:
Run trigger of other ns:
Run trigger of app ns: