Jacob Hall
03/15/2023, 7:08 PMredsquare
03/15/2023, 7:35 PMJacob Hall
03/15/2023, 7:49 PM>>> from prefect.infrastructure.kubernetes import KubernetesJob
>>> job_block = KubernetesJob.load("my-k8s-block")
>>> type(job_block.customizations)
<class 'prefect.utilities.pydantic.JsonPatch'>
I'm willing to work with this, but wanted to see if there is an easier way. Another downside of this approach is that I'd have to re-deploy each of my deployments if I were to change the defaults in my Kubernetes Job block's customizations.job_block.customizations.patch
returns a list of patch dicts that I can add to and submit inside infra_overrides. Hooray! The big downside to this approach is that I'll have to re-deploy each time I update my infrastructure block (as noted above), but this is a workable solution.redsquare
03/15/2023, 8:18 PMJacob Hall
03/15/2023, 8:23 PM