From 156d995ea70f80a8ab30f50428a6a72b8c21f012 Mon Sep 17 00:00:00 2001 From: empath-nirvana <86739375+empath-nirvana@users.noreply.github.com> Date: Fri, 22 Mar 2024 10:15:15 -0400 Subject: [PATCH 1/2] actually include observed resources --- fn.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fn.go b/fn.go index 074e994..4d98a90 100644 --- a/fn.go +++ b/fn.go @@ -16,7 +16,6 @@ import ( "github.com/crossplane-contrib/function-kcl/input/v1beta1" pkgresource "github.com/crossplane-contrib/function-kcl/pkg/resource" - "sigs.k8s.io/yaml" ) @@ -98,7 +97,7 @@ func (f *Function) RunFunction(_ context.Context, req *fnv1beta1.RunFunctionRequ return rsp, nil } log.Debug(fmt.Sprintf("ObservedComposed resources: %d", len(observed))) - in.Spec.Params["ocds"], err = pkgresource.ObjToRawExtension(desired) + in.Spec.Params["ocds"], err = pkgresource.ObjToRawExtension(observed) if err != nil { response.Fatal(rsp, err) return rsp, nil From 97162a8110ad5e52052d28741e5eed3dde490781 Mon Sep 17 00:00:00 2001 From: empath-nirvana <86739375+empath-nirvana@users.noreply.github.com> Date: Fri, 22 Mar 2024 10:17:20 -0400 Subject: [PATCH 2/2] don't change whitespace --- fn.go | 1 + 1 file changed, 1 insertion(+) diff --git a/fn.go b/fn.go index 4d98a90..8c4a0ae 100644 --- a/fn.go +++ b/fn.go @@ -16,6 +16,7 @@ import ( "github.com/crossplane-contrib/function-kcl/input/v1beta1" pkgresource "github.com/crossplane-contrib/function-kcl/pkg/resource" + "sigs.k8s.io/yaml" )