Import environment and openAPI into starlark fn runtime

This commit is contained in:
Phillip Wittrock
2020-04-01 17:45:37 -07:00
parent 091964c2c4
commit 691c11d520
4 changed files with 239 additions and 27 deletions

View File

@@ -50,7 +50,7 @@ def run(items):
for item in items:
item["metadata"]["annotations"]["foo"] = "bar"
run(resourceList["items"])
run(ctx.resource_list["items"])
`,
}
@@ -139,7 +139,7 @@ def run(items, value):
for item in items:
item["metadata"]["annotations"]["foo"] = value
run(resourceList["items"], resourceList["functionConfig"]["spec"]["value"])
run(ctx.resource_list["items"], ctx.resource_list["functionConfig"]["spec"]["value"])
`,
FunctionConfig: fc,
}
@@ -233,7 +233,7 @@ def run(items):
for item in items:
item["metadata"]["annotations"]["foo"] = "bar"
run(resourceList["items"])
run(ctx.resource_list["items"])
`), 0600)
if err != nil {
log.Fatal(err)