https://prefect.io logo
#prefect-community
Title
# prefect-community
r

Rajvir Jhawar

09/06/2022, 1:20 PM
Hi Prefect team, I can't seem to figure out how to override the customizations using the cli, I always end up with an error. Is it even possible to override the customizations using the cli?
deployment build --override customizations = resource_object
1
a

Andreas Nigg

09/06/2022, 1:35 PM
Have you tried it without spaces around the equal sign? ``deployment build --override customizations=resource_object``
c

Christopher Boyd

09/06/2022, 1:44 PM
What does the full “customizations” line look like?
r

Rajvir Jhawar

09/06/2022, 1:57 PM
@Christopher Boyd
prefect deployment build /app/script.py:main -n "script_deploy" -o /app/script.yaml -sb gcs/flow-store -ib kubernetes-job/generic --override image_pull_policy=Always --override restart_policy=OnFailure --override customizations=[{'op': 'add', 'path': '/spec/template/spec/resources', 'value': {'limits': {'memory': '512Gi','cpu': '250m', 'ephemeral-storage': '500Mi'}}}] -q "test" -v "1.0.2" --apply
1
c

Christopher Boyd

09/06/2022, 2:18 PM
Try :
Copy code
[{
	"op": "add",
	"path": "/spec/template/spec/resources",
	"value": {
		"limits": {
			"memory": "512Gi",
			"cpu": "250m",
			"ephemeral-storage": "500Mi"
		}
	}
}]
r

Rajvir Jhawar

10/10/2022, 1:26 PM
@Christopher Boyd just a heads up and apologies for the super late reply: This code you provided doesn't work and still leads to the same error. I think a bug report is necessary to address the issue. I got around it by creating a k8 job block and adding customizations to that:
k8s = KubernetesJob(
customizations=resource_limits,
finished_job_ttl=TTL_VALUE,
image_pull_policy="IfNotPresent")
k8s.save(profile_name, overwrite=True)
Created a new issue for it here: https://github.com/PrefectHQ/prefect/issues/7125
4 Views