Skip to content

Prefect Deployment CRD #164

@marcm-ml

Description

@marcm-ml

I think this operator could also manage Prefect Deployments.
The operator would manage deployments by creating, updating and deleting them.
This would also aid managing prefect deployment in GitOps workflows like flux/argo. The resource could implement a similar interface to flux's HelmRelease:

apiVersion: prefect.io/v1
kind: PrefectDeployment
metadata:
  labels:
    app.kubernetes.io/name: prefect-operator
    app.kubernetes.io/managed-by: kustomize
  name: myDeployment
status:
  deploymentID: "f31ba293-4028-4492-9219-c4eddf56707e"
  flowID: "e1e69e4b-f767-445e-8cd0-900a3dcbfc2f"
spec:
  interval: 10m # reconcile interval
  deletionPolicy: "delete"
  retryInterval: 5m # retry if reconcile fails
  prefectApiUrl: "http://prefect-server:4200/api"
  deploymentSpec:
    schedule: "0 * * * *"
    entrypoint: "path/to/flow:func"
    storage: None
    tags: 
      - myTag
    jobVariables:
       image: "myimage:latest"
       labels:
         myLabel: myValue
       command: ["prefect.engine"]
       ...

What do you think?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions