Sensor agent

The sensor agent enables users to continuously check for a file or a condition to be met periodically.

When the condition is met, the sensor will complete.

This guide provides an overview of how to set up the sensor agent in your Flyte deployment.

Spin up a cluster

You can spin up a demo cluster using the following command:

flytectl demo start

Or install Flyte using the flyte-binary helm chart.

Note

Add the Flyte chart repo to Helm if you’re installing via the Helm charts.

helm repo add flyteorg https://flyteorg.github.io/flyte

Specify agent configuration

Enable the sensor agent by adding the following config to the relevant YAML file(s):

Edit the relevant YAML file to specify the agent.

kubectl edit configmap flyte-sandbox-config -n flyte
tasks:
  task-plugins:
    enabled-plugins:
      - container
      - sidecar
      - k8s-array
      - agent-service
    default-for-task-types:
      - container: container
      - container_array: k8s-array
      - sensor: agent-service

plugins:
  agent-service:
    supportedTaskTypes:
    - sensor

Upgrade the deployment

kubectl rollout restart deployment flyte-sandbox -n flyte

Wait for the upgrade to complete.

You can check the status of the deployment pods by running the following command:

kubectl get pods -n flyte