PrefectHQ / prefect-operator

A Kubernetes operator for managing Prefect servers and work pools
8 stars 0 forks source link

Support for `PrefectWorkPool` pointing to external Prefect servers and Prefect Cloud #42

Closed chrisguidry closed 2 weeks ago

chrisguidry commented 4 weeks ago

From the discussion in Prefect: https://github.com/PrefectHQ/prefect/discussions/15050#discussioncomment-10422048

How to spell this in the most K8s-native way is something we should work out, but roughly:

apiVersion: prefect.io/v1
kind: PrefectWorkPool
metadata:
  namespace: my-team
  name: my-k8s-pool
spec:
  version: 3.0.0rc17
  type: kubernetes
  server:
    apiUrl: https://api.prefect.cloud/accounts/.....
    apiKey:
      valueFrom:
        secretKeyRef:
          name: a-secret
          key: my-prefect-api-key
  workers: 2

The idea being that you can either specify namespace/name to point to an in-cluster server, or apiUrl/apiKey to point to an external server and/or Prefect Cloud.

chrisguidry commented 2 weeks ago

Closed in #64