https://prefect.io logo
t

Tanishq Hooda

07/27/2023, 2:45 PM
Hi, How to define
--override customizations=[{'op': 'add', 'path': '/spec/template/spec/containers/0/resources', 'value': {'requests': {'cpu': '500m', 'memory': '1Gi'}, 'limits': {'cpu': '2000m', 'memory': '4Gi'}}}]
in
prefect build deployment
cmd, I get error with []
I don't want to do it via python code
r

redsquare

07/27/2023, 3:07 PM
need to quote the customizations
e.g customizations='[{"op": "add","path": "/spec/template/spec/containers/0/resources/limits", "value": {"memory": "8Gi","cpu": "4000m"}}]'
t

Tanishq Hooda

07/27/2023, 3:15 PM
I did that before and in my deployment.yaml. the value was also create with quotes which I guess is incorrect ?
Copy code
cron: 0 2 * * *
  timezone: null
  day_or: true
is_schedule_active: false
infra_overrides:
  image: my-image:latest
  customizations: '[{op: add, path: /spec/template/spec/containers/0/resources, value:
    {requests: {cpu: 500m, memory: 1Gi}, limits: {cpu: 2000m, memory: 4Gi}}}]'