Hi guys is this how to deploy a prefect-worker wit...
# ask-community
m
Hi guys is this how to deploy a prefect-worker with helm to access a private registry ? I keep getting access forbidden when running a flow (inside a kube job)
Copy code
worker:
  apiConfig: server
  image:
    pullSecrets:
      - gitlab-registry-secret
  config:
    workPool: minikube-work-pool
  serverApiConfig:
    apiUrl: <http://prefect-server.prefect.svc.cluster.local:4200/api>
r
This will just set the pull secret for the worker itself, not the pod it launches to run the flow. You probably need to set a pod template on the workpool
m
ok @Rob Rati I guess it should be provided under section
baseJobTemplate
👍 1
r
That is the name of the configuration that needs to be set. I haven't done it via a helm chart, just in the UI.
t
@Mehdi do you mind paste the
yaml
block you used under
baseJobTemplate
? is it exactly this?
Copy code
worker:
  config:
    baseJobTemplate:
       image:
        pullSecrets:
          - gitlab-registry-secret
m
No, @Tony Lim you have to do that through a serviceaccount I’ve run this command ‘prefect-worker’ being my service account, I think it defaults to prefect
Copy code
k patch serviceaccount prefect-worker -n prefect -p '{"imagePullSecrets": [{"name": "gitlab-registry-secret"}]}'
🙏 1