K8S Patch Json Workflow Note This example is a replication of an Argo Workflow example in Hera. The upstream example can be found here. HeraYAML 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18from hera.workflows import Resource, Workflow manifest = """- op: add path: /metadata/labels/foo value: bar """ with Workflow( generate_name="k8s-patch-json-workflow-", entrypoint="main", ) as w: Resource( name="main", action="patch", merge_strategy="json", flags=["workflow", "{{workflow.name}}"], manifest=manifest, ) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18apiVersion: argoproj.io/v1alpha1 kind: Workflow metadata: generateName: k8s-patch-json-workflow- spec: entrypoint: main templates: - name: main resource: action: patch manifest: | - op: add path: /metadata/labels/foo value: bar mergeStrategy: json flags: - workflow - '{{workflow.name}}' Comments