Hi everyone, How do I set an annotation on the kub...
# ask-community
m
Hi everyone, How do I set an annotation on the kubernetes job pods that prefect-worker runs? I deployed prefect via helm chart (2024.12.11173517) on aws eks cluster. I am using
selfHostedServer
.
r
Have you tried using the workpool job template?
m
Yes, I tried using the work pool job template. I added the following configuration to the
prefect-worker
Helm chart values.yaml, but it doesn't seem to apply the annotation to the job pods:
Copy code
baseJobTemplate:
  configuration: |
    {
      "job_configuration": {
        "job_manifest": {
          "apiVersion": "batch/v1",
          "kind": "Job",
          "metadata": {
            "annotations": {
              "test": "test"
            }
          }
        }
      }
    }
r
What shows up in the server for the work pool template? I've been able to create a pod spec with anything information from the server/api. I've not tried using the template in the worker chart.
j
can you share your full values file?
you'd need to provide the full base job template, not just part of it, to the helm chart
m
Thank you, I successfully resolved the issue by deploying the complete base job template. I wish Prefect had more detailed documentation for this. Additionally, @Marvin did not provide the correct information to accomplish it.
m
It seems you've managed to resolve your issue by deploying the complete base job template. Prefect's documentation can sometimes be a bit sparse on specifics, especially for complex tasks like deployment. If there's anything else you need assistance with or if you have specific questions about Prefect, feel free to ask. I'm here to help.