From ae04af46728183165432e9b2d443009cb4c12ea3 Mon Sep 17 00:00:00 2001 From: Tim <32556895+Avarei@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:20:00 +0200 Subject: [PATCH 1/2] use cache dir Signed-off-by: Tim <32556895+Avarei@users.noreply.github.com> --- internal/function/fn.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/function/fn.go b/internal/function/fn.go index 3ad1be0..cbbaa64 100644 --- a/internal/function/fn.go +++ b/internal/function/fn.go @@ -65,6 +65,7 @@ func (f *Function) RunFunction(ctx context.Context, req *fnv1beta1.RunFunctionRe case "local": evaluator, err = f.EvaluatorManager.NewProjectEvaluator(ctx, in.Spec.Local.ProjectDir, pkl.PreconfiguredOptions, + pkl.WithDefaultCacheDir, reader.WithCrossplane(&reader.CrossplaneReader{ ReaderScheme: "crossplane", Request: &helper.CompositionRequest{ @@ -77,6 +78,7 @@ func (f *Function) RunFunction(ctx context.Context, req *fnv1beta1.RunFunctionRe default: evaluator, err = f.EvaluatorManager.NewEvaluator(ctx, pkl.PreconfiguredOptions, + pkl.WithDefaultCacheDir, reader.WithCrossplane(&reader.CrossplaneReader{ ReaderScheme: "crossplane", Request: &helper.CompositionRequest{ From 924a15979c0c37808d8c2b10015e43619b4dd2da Mon Sep 17 00:00:00 2001 From: Tim <32556895+Avarei@users.noreply.github.com> Date: Fri, 5 Jul 2024 10:20:19 +0200 Subject: [PATCH 2/2] fix makefile build image Signed-off-by: Tim <32556895+Avarei@users.noreply.github.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3b5706b..e24f75b 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ generate: pkl-resolve pkl-resolve-hack .PHONY: build-image build-image: - docker build --build-arg -t runtime . + docker build -t runtime . crossplane xpkg build -f package --embed-runtime-image=runtime -o .out/function-pkl.xpkg .PHONY: push-image