From 9b897c6d87ec1739062963dbcfd2dce95a2c75a3 Mon Sep 17 00:00:00 2001 From: Stepan Paksashvili Date: Fri, 13 Feb 2026 17:41:50 +0300 Subject: [PATCH 1/3] [fix] return output collectors Signed-off-by: Stepan Paksashvili --- pkg/hook.go | 4 ++-- pkg/patch.go | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/pkg/hook.go b/pkg/hook.go index 49f3c7c..df6bfc1 100644 --- a/pkg/hook.go +++ b/pkg/hook.go @@ -57,7 +57,7 @@ type HookInput struct { Values PatchableValuesCollector ConfigValues PatchableValuesCollector - PatchCollector PatchCollector + PatchCollector OutputPatchCollector MetricsCollector MetricsCollector DC DependencyContainer @@ -72,7 +72,7 @@ type ApplicationHookInput struct { Instance Instance Values PatchableValuesCollector - PatchCollector NamespacedPatchCollector + PatchCollector OutputNamespacedPatchCollector MetricsCollector MetricsCollector DC ApplicationDependencyContainer diff --git a/pkg/patch.go b/pkg/patch.go index 98f8a19..475316d 100644 --- a/pkg/patch.go +++ b/pkg/patch.go @@ -7,9 +7,23 @@ import ( "github.com/deckhouse/module-sdk/pkg/utils" ) -type PatchCollector interface { +type OutputPatchCollector interface { + // Deprecated: use PatchWithMerge instead + PatchCollector + Outputer +} + +type OutputNamespacedPatchCollector interface { + NamespacedPatchCollector Outputer +} +type OutputPatchableValuesCollector interface { + PatchableValuesCollector + Outputer +} + +type PatchCollector interface { // object must be Unstructured, map[string]any or runtime.Object Create(object any) // object must be Unstructured, map[string]any or runtime.Object From d8b5caa9b025b9d0ad60b3521937fb06f94e4cd9 Mon Sep 17 00:00:00 2001 From: Stepan Paksashvili Date: Fri, 13 Feb 2026 17:47:10 +0300 Subject: [PATCH 2/3] [fix] return output collectors Signed-off-by: Stepan Paksashvili --- pkg/hook.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/hook.go b/pkg/hook.go index df6bfc1..902a613 100644 --- a/pkg/hook.go +++ b/pkg/hook.go @@ -55,8 +55,8 @@ type HookFunc[T Input] func(ctx context.Context, input T) error type HookInput struct { Snapshots Snapshots - Values PatchableValuesCollector - ConfigValues PatchableValuesCollector + Values OutputPatchableValuesCollector + ConfigValues OutputPatchableValuesCollector PatchCollector OutputPatchCollector MetricsCollector MetricsCollector @@ -71,7 +71,7 @@ type ApplicationHookInput struct { Instance Instance - Values PatchableValuesCollector + Values OutputPatchableValuesCollector PatchCollector OutputNamespacedPatchCollector MetricsCollector MetricsCollector From 5a696234e4984f0cb9eb5cfb72c768b023d12a93 Mon Sep 17 00:00:00 2001 From: Stepan Paksashvili Date: Fri, 13 Feb 2026 17:59:39 +0300 Subject: [PATCH 3/3] [fix] return output collectors Signed-off-by: Stepan Paksashvili --- pkg/hook.go | 10 +++++----- pkg/metric.go | 5 ----- pkg/patch.go | 16 ---------------- 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/pkg/hook.go b/pkg/hook.go index 902a613..49f3c7c 100644 --- a/pkg/hook.go +++ b/pkg/hook.go @@ -55,9 +55,9 @@ type HookFunc[T Input] func(ctx context.Context, input T) error type HookInput struct { Snapshots Snapshots - Values OutputPatchableValuesCollector - ConfigValues OutputPatchableValuesCollector - PatchCollector OutputPatchCollector + Values PatchableValuesCollector + ConfigValues PatchableValuesCollector + PatchCollector PatchCollector MetricsCollector MetricsCollector DC DependencyContainer @@ -71,8 +71,8 @@ type ApplicationHookInput struct { Instance Instance - Values OutputPatchableValuesCollector - PatchCollector OutputNamespacedPatchCollector + Values PatchableValuesCollector + PatchCollector NamespacedPatchCollector MetricsCollector MetricsCollector DC ApplicationDependencyContainer diff --git a/pkg/metric.go b/pkg/metric.go index 7f13371..e311255 100644 --- a/pkg/metric.go +++ b/pkg/metric.go @@ -1,10 +1,5 @@ package pkg -type OutputMetricsCollector interface { - MetricsCollector - Outputer -} - type MetricsCollector interface { // Inc increments the specified Counter metric Inc(name string, labels map[string]string, opts ...MetricCollectorOption) diff --git a/pkg/patch.go b/pkg/patch.go index 475316d..2302bec 100644 --- a/pkg/patch.go +++ b/pkg/patch.go @@ -7,22 +7,6 @@ import ( "github.com/deckhouse/module-sdk/pkg/utils" ) -type OutputPatchCollector interface { - // Deprecated: use PatchWithMerge instead - PatchCollector - Outputer -} - -type OutputNamespacedPatchCollector interface { - NamespacedPatchCollector - Outputer -} - -type OutputPatchableValuesCollector interface { - PatchableValuesCollector - Outputer -} - type PatchCollector interface { // object must be Unstructured, map[string]any or runtime.Object Create(object any)