Skip to content

Commit f67d152

Browse files
authored
Merge pull request #89 from negz/crump
2 parents 0d69580 + e2d77c2 commit f67d152

File tree

3 files changed

+2
-167
lines changed

3 files changed

+2
-167
lines changed

fn.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
"google.golang.org/protobuf/types/known/structpb"
77
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
8+
"k8s.io/apimachinery/pkg/util/json"
89

910
"github.com/crossplane/crossplane-runtime/pkg/errors"
1011
"github.com/crossplane/crossplane-runtime/pkg/fieldpath"
@@ -154,7 +155,7 @@ func (f *Function) RunFunction(ctx context.Context, req *fnv1beta1.RunFunctionRe
154155
// We want to return this resource unmutated if rendering fails.
155156
dcd.Resource = cd.Resource.DeepCopy()
156157
default:
157-
if err := RenderFromJSON(dcd.Resource, t.Base.Raw); err != nil {
158+
if err := json.Unmarshal(t.Base.Raw, dcd.Resource); err != nil {
158159
response.Fatal(rsp, errors.Wrapf(err, "cannot parse base template of composed resource %q", t.Name))
159160
return rsp, nil
160161
}

render.go

Lines changed: 0 additions & 49 deletions
This file was deleted.

render_test.go

Lines changed: 0 additions & 117 deletions
This file was deleted.

0 commit comments

Comments
 (0)