mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Support publishing starlark functions from urls
This commit is contained in:
7
cmd/config/internal/commands/e2e/starlark/annotate.star
Normal file
7
cmd/config/internal/commands/e2e/starlark/annotate.star
Normal 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"])
|
||||
Reference in New Issue
Block a user