From 073167e7c674e7b39f734f02c6bf60a3bf11fc7e Mon Sep 17 00:00:00 2001 From: Nic Cope Date: Sun, 17 Sep 2023 19:23:30 -0700 Subject: [PATCH] Load readiness from RunFunctionRequest Signed-off-by: Nic Cope --- request/request.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/request/request.go b/request/request.go index 740632d..7e75351 100644 --- a/request/request.go +++ b/request/request.go @@ -74,6 +74,14 @@ func GetDesiredComposedResources(req *v1beta1.RunFunctionRequest) (map[resource. if err := resource.AsObject(r.GetResource(), dcd.Resource); err != nil { return nil, err } + switch r.Ready { + case v1beta1.Ready_READY_UNSPECIFIED: + dcd.Ready = resource.ReadyUnspecified + case v1beta1.Ready_READY_TRUE: + dcd.Ready = resource.ReadyTrue + case v1beta1.Ready_READY_FALSE: + dcd.Ready = resource.ReadyFalse + } dcds[resource.Name(name)] = dcd } return dcds, nil