Skip to content

Commit 4d6d430

Browse files
committed
Add GVK to error message
Signed-off-by: Marcel Boehm <[email protected]>
1 parent a8c7cc1 commit 4d6d430

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/controller/kustomization_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ func (r *KustomizationReconciler) build(ctx context.Context,
771771
if obj.Spec.Decryption != nil {
772772
outRes, err := dec.DecryptResource(res)
773773
if err != nil {
774-
return nil, fmt.Errorf("decryption failed for '%s': %w", res.GetName(), err)
774+
return nil, fmt.Errorf("decryption failed for '%s/%s': %w", res.GetGvk(), res.GetName(), err)
775775
}
776776

777777
if outRes != nil {
@@ -787,7 +787,7 @@ func (r *KustomizationReconciler) build(ctx context.Context,
787787
outRes, err := generator.SubstituteVariables(ctx, r.Client, u, res,
788788
generator.SubstituteWithStrict(r.StrictSubstitutions))
789789
if err != nil {
790-
return nil, fmt.Errorf("post build failed for '%s': %w", res.GetName(), err)
790+
return nil, fmt.Errorf("post build failed for '%s/%s': %w", res.GetGvk(), res.GetName(), err)
791791
}
792792

793793
if outRes != nil {

0 commit comments

Comments
 (0)