Support publishing starlark functions from urls

This commit is contained in:
Phillip Wittrock
2020-05-13 11:36:19 -07:00
parent 0a8d367633
commit 6ae53cb732
6 changed files with 142 additions and 30 deletions

View File

@@ -0,0 +1,7 @@
def run(r, fc):
for resource in r:
resource["metadata"]["annotations"]["a-string-value"] = fc["data"]["stringValue"]
resource["metadata"]["annotations"]["a-int-value"] = fc["data"]["intValue"]
resource["metadata"]["annotations"]["a-bool-value"] = fc["data"]["boolValue"]
run(ctx.resource_list["items"], ctx.resource_list["functionConfig"])