Chris Hansen07/28/2022, 10:52 PM
runs flows in a local subprocess. •
runs flows in a Docker container. •
runs flows in a Kubernetes Job.
Chris Hansen07/28/2022, 11:10 PM
Chris Hansen07/28/2022, 11:47 PM
Tom Klein07/28/2022, 11:54 PM
? in prefect 1.0, prefect itself provided an easy way to do it:
prefect agent run
(this is taken directly from the prefect 1.0 docs) Have things regressed so that now users need to manually create & deploy a container in k8s that would start the agent, ourselves?
prefect agent kubernetes install -k API_KEY | kubectl apply --namespace=my-namespace -f -
Christopher Boyd07/28/2022, 11:58 PM
Ilya Galperin07/29/2022, 12:15 AM
Tom Klein07/29/2022, 12:15 AM
files rather than to rely on python config-as-code? for example, why shouldn't the different deployment(s) of each flow just be first-class python objects that are registered the same way flows were registered in 1.0, e.g. via a simple python API? is that something that's planned and just not ready yet? or not planned at all? • can you provide an example for this manifest?
Christopher Boyd07/29/2022, 12:44 AM
apiVersion: apps/v1 kind: Deployment metadata: name: cloud2-agent namespace: orion spec: selector: matchLabels: app: prefect-agent replicas: 1 template: metadata: labels: app: prefect-agent spec: containers: - name: agent image: prefecthq/prefect:2.0.0-python3.9 command: ["prefect", "agent", "start", "kubernetes"] imagePullPolicy: "IfNotPresent" env: - name: PREFECT_API_URL value: <https://api.prefect.cloud/api/accounts/><account id>/workspaces/<workspace id> - name: PREFECT_API_KEY valueFrom: secretKeyRef: name: prefectapi key: PREFECT_API_KEY --- apiVersion: <http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1> kind: Role metadata: namespace: orion name: flow-runner rules: - apiGroups: [""] resources: ["pods", "pods/log", "pods/status"] verbs: ["get", "watch", "list"] - apiGroups: ["batch"] resources: ["jobs"] verbs: [ "get", "list", "watch", "create", "update", "patch", "delete" ] --- apiVersion: <http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1> kind: RoleBinding metadata: name: flow-runner-role-binding namespace: orion subjects: - kind: ServiceAccount name: default namespace: orion roleRef: kind: Role name: flow-runner apiGroup: <http://rbac.authorization.k8s.io|rbac.authorization.k8s.io>
Tom Klein07/29/2022, 12:47 AM
Christopher Boyd07/29/2022, 12:48 AM
Tom Klein07/29/2022, 12:50 AM