Hello… I am trying to understand if what I am tryi...
# prefect-kubernetes
a
Hello… I am trying to understand if what I am trying to do should work and if yes why is it not working… I have deployed kubernetes worker in our k8s cluster. I have created
prefect.yaml
with a deployment that uses the worker pool. In the worker pool configurations I have added
customizations
key to the
job_variables
for some reason the patch is never applied. For example
Copy code
deployments:
- name: testtest
  # description: null
  version: testversion1
  # The work queue that will handle this deployment's runs
  path: tespath
  entrypoint: test.py:test_flow
  work_pool:
    name: prefect2-worker
    job_variables:
      customizations:
      - op: "add"
        path: "/spec/parallelism/-"
        value: 6
      - op: "add"
        path: "/spec/template/spec/containers/0/env/-"
        value: 
          name: ENV_VAR
          value: "env value"
The above is just a test case for making sure the API works, in the reality we should have some advanced customizations for our job templates (for each deployment)
For anyone who looks for it in the future (30 days LOL) After looking into the code this whole API of customization is not functional when using work pools. The only possible way that I found is by using the base job template and create a custom job template for the worker pool… This solution is very limited as opposed to true customization. It now introduces a new problem, how to have a declarative solution to define this work pool base job templates. The prefect terraform provider is very immature. PS If the discussions here are mostly answered by us and the community why the heck you limit it for the past 30 days?!
o
I agree the that the history should be longer than 30 days if it’s possible 👍