Sam Garvis
08/11/2022, 4:05 PMNate
08/11/2022, 4:12 PMk8s helm deployment.yamlI've used the helm chart for deploying a k8s agent and successfully built and applied a deployment, and then spun up flow runs (on their corresponding pods) if this isn't the helm chart you mean, can you link it here?
Sam Garvis
08/11/2022, 5:53 PMapiVersion : apps/v1
kind: Deployment
metadata:
name: prefect-dev-agent-1
labels:
app: prefect-dev-agent-1
spec:
replicas: 4
selector:
matchLabels:
app: prefect-dev-agent-1
template:
metadata:
labels:
app: prefect-dev-agent-1
spec:
imagePullSecrets:
- name: Always
serviceAccountName: prefect-2.0-dev
containers:
- name: prefect-agent
image: samgarvis/prefect20_dockerfile:latest
imagePullPolicy: Always
command: ["prefect", "agent", "start", "xxx_XXXXXXXXXXXXXXXXXXX"]
env:
- name: PREFECT_DEBUG_MODE
value: ''
- name: PREFECT_API_URL
valueFrom:
secretKeyRef:
name: prefect-dev-service-secret
key: prefect-dev-service-url
- name: PREFECT_API_KEY
valueFrom:
secretKeyRef:
name: prefect-dev-service-secret
key: prefect-dev-service-key
---
apiVersion: <http://rbac.authorization.k8s.io/v1|rbac.authorization.k8s.io/v1>
kind: Role
metadata:
namespace: default
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: default
subjects:
- kind: ServiceAccount
name: default
namespace: default
roleRef:
kind: Role
name: flow-runner
apiGroup: <http://rbac.authorization.k8s.io|rbac.authorization.k8s.io>
Nate
08/11/2022, 6:04 PMkubectl apply
these resources manually
have you seen these directions? in your example, you can replace <chart> with prefect-agent
and then you'd just need to make sure you're in the desired context & namespace and run the helm
commands I linkedSam Garvis
08/11/2022, 7:52 PMError: INSTALLATION FAILED: failed to download "prefecthq/prefect-agent"
Also, super minor but for consistency I feel like the repo name should stay prefecthq or prefect in the Readme.md if y'all wanna changeNate
08/11/2022, 7:57 PM$ helm repo add prefecthq <https://prefecthq.github.io/prefect-helm/>
and wrt the name, the helm search command is fuzzy serach afaik so prefect
is just a natural search term someone might use to find our chartsSam Garvis
08/11/2022, 7:59 PMNate
08/11/2022, 8:01 PMhelm repo list
output looks good, can you try specifying --version 0.3.1
in your install command as well?Sam Garvis
08/11/2022, 8:02 PMNate
08/11/2022, 8:03 PM