File: annotate.star

package info (click to toggle)
golang-k8s-sigs-kustomize-cmd-config 0.20.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 996 kB
  • sloc: makefile: 198; sh: 50
file content (7 lines) | stat: -rw-r--r-- 355 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
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"])