Nico Neumann
06/15/2023, 7:11 AMoverrides = {
    "customizations": [
        {
            "op": "add",
            "path": "/spec/template/spec/containers/0/resources",
            "value": {"requests": {"memory": "...", "cpu": "..."}, "limits": {"memory": "...", "cpu": "..."}},
        },
        {
            "op": "add",
            "path": "/spec/template/spec/nodeSelector",
            "value": {"partition": "..."},
        },
    ]
}
infrastructure = KubernetesJob(
    # ...
    customizations=overrides,
)
deployment = Deployment.build_from_flow(
    # ...
    infrastructure=infrastructure,
)
deployment.apply()
paramters = {"s3_file": "example/..."}
customizations = get_customizations_based_on(parameters)
flow_run = run_deployment(
    name=name,
    parameters=parameters,
    # set customizations/overrides somehow here?
)redsquare
06/15/2023, 8:25 AM