<@U06RKAMK0UC> What's the easiest way to connect p...
# ask-ai
r
@ancient-wolf-19325 What's the easiest way to connect pagerduty to flyte-binary deployment?
j
The Flyte documentation I have ingested does not mention how to connect PagerDuty to a flyte-binary deployment. If you are looking to set up PagerDuty notifications for workflow events, it would be helpful to specify whether you are aiming for workflow-level notifications, system alerts, or integration via Flyte's notification system, and to clarify your PagerDuty setup (e.g., email-based integration or API/webhook). If this doesn't help, please reach out to the Flyte support team for further assistance. πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
r
@ancient-wolf-19325 I have flyte-binary deployed with helm charts Want to have pagerduty notifications when workflows or tasks fail
j
To enable PagerDuty notifications in a Flyte-binary deployment using Helm charts, you must configure workflow notifications in your FlyteAdmin config. Flyte supports PagerDuty notifications by sending emails to PagerDuty's integration email address when a workflow reaches a specified phase (e.g., FAILED). You set this up by adding a PagerDuty notification object to your LaunchPlan and ensuring your FlyteAdmin is configured to send notifications via a supported backend (AWS SNS/SQS or GCP Pub/Sub) and email service (SES or SendGrid) as described in the docs. PagerDuty integration is achieved by using the email address provided by PagerDuty for your service (PagerDuty email integration guide). For example, in your workflow code, add a LaunchPlan with a PagerDuty notification:
Copy code
from flytekit import PagerDuty, LaunchPlan, WorkflowExecutionPhase

my_lp = LaunchPlan.get_or_create(
    name="pagerduty_lp",
    workflow=my_workflow,
    notifications=[
        PagerDuty(
            phases=[WorkflowExecutionPhase.FAILED],
            recipients_email=["your-service@your-subdomain.pagerduty.com"],
        )
    ],
)
You must also configure the notification backend in your Helm values (e.g.,
values-eks.yaml
) to enable notifications and set up the emailer as per your cloud provider (Flyte notification config reference). Would you like a step-by-step breakdown of the Helm and PagerDuty configuration? Sources: - Workflow notifications - Flyte LaunchPlan notification example - Flyte notifications user guide πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
r
@ancient-wolf-19325 Yes please, how should the values.yaml look for flyte-binary?
j
To enable PagerDuty notifications in a flyte-binary Helm deployment, set the
workflow_notifications
section in your
values.yaml
to enable notifications and configure the emailer. Flyte sends PagerDuty notifications by emailing your PagerDuty integration address when a workflow fails. The notification backend (AWS or GCP) and emailer (SES or SendGrid) must be set up according to your cloud provider. Here is an example for AWS SES (replace placeholders with your actual values):
Copy code
workflow_notifications:
  enabled: true
  config:
    notifications:
      type: aws
      region: us-east-1
      publisher:
        topicName: "arn:aws:sns:us-east-1:<YOUR_ACCOUNT_ID>:<YOUR_TOPIC>"
      processor:
        queueName: "<YOUR_QUEUE_NAME>"
        accountId: "<YOUR_ACCOUNT_ID>"
      emailer:
        subject: "Flyte: {{ project }}/{{ domain }}/{{ launch_plan.name }} has {{ phase }}"
        sender: "your-verified-ses-sender@example.com"
        body: |
          "Execution {{ workflow.project }}/{{ workflow.domain }}/{{ workflow.name }}/{{ name }} has {{ phase }}.
          Details: https://flyte.example.com/console/projects/{{ project }}/domains/{{ domain }}/executions/{{ name }}.
          {{ error }}"
For GCP/SendGrid, see the Flyte notification configuration docs. Would you like a step-by-step guide for setting up the cloud resources and connecting PagerDuty? Sources: - https://www.union.ai/docs/flyte/deployment/flyte-configuration/configuring-notifications/#code-b622f292465f3c54e8bb347237e8cd6af428c954-1 πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
r
@ancient-wolf-19325 where exactly should this workflow_notifications: block be in values.yaml?
j
The
workflow_notifications:
block should be placed at the top level of your
values.yaml
file for the flyte-binary Helm chart, not nested under any other key. This is consistent with how optional modules like notifications are configured in Flyte's Helm charts (see example in values-eks.yaml). Would you like a full example of a minimal
values.yaml
with this block included? Sources: - flyte-core/values-eks.yaml πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
r
@ancient-wolf-19325 Do I need to have cloud services, publisher and processor? I want a minimal setup and I have sendgrid
j
Yes, you still need to configure a publisher and processor even with SendGrid, as Flyte's notification system requires a pub/sub backend (AWS SNS/SQS or GCP Pub/Sub) to enqueue and process notification eventsβ€”even if SendGrid is used for email delivery. There is no documented minimal mode that bypasses the publisher/processor for direct SendGrid-only notifications in flyte-binary (Flyte notification config reference). Would you like a step-by-step example for configuring SendGrid with AWS SNS/SQS or GCP Pub/Sub? Sources: - Flyte notification config reference πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
r
@ancient-wolf-19325 yes please, how do I set up aws sns?
j
To set up AWS SNS for Flyte notifications, you need to: 1. Create an SNS topic and SQS queue in AWS. 2. Subscribe the SQS queue to the SNS topic. 3. Ensure your FlyteAdmin IAM role has permissions for SNS and SQS. 4. Configure the
workflow_notifications
block in your
values.yaml
with the SNS topic ARN and SQS queue name. Example
values.yaml
snippet:
Copy code
workflow_notifications:
  enabled: true
  config:
    notifications:
      type: aws
      region: us-east-1
      publisher:
        topicName: "arn:aws:sns:us-east-1:<YOUR_ACCOUNT_ID>:<YOUR_TOPIC>"
      processor:
        queueName: "<YOUR_QUEUE_NAME>"
        accountId: "<YOUR_ACCOUNT_ID>"
      emailer:
        sender: "your-verified-ses-sender@example.com"
        subject: "Flyte: {{ project }}/{{ domain }}/{{ launch_plan.name }} has {{ phase }}"
        body: |
          "Execution {{ workflow.project }}/{{ workflow.domain }}/{{ workflow.name }}/{{ name }} has {{ phase }}.
          Details: https://flyte.example.com/console/projects/{{ project }}/domains/{{ domain }}/executions/{{ name }}.
          {{ error }}"
For more details, see the Flyte notification configuration docs. Would you like a step-by-step AWS Console guide for creating the SNS topic and SQS queue? Sources: - Flyte notification config reference πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.
r
@ancient-wolf-19325 where in the chart should I add aws creds? I am already using minio for storage
j
If you are using MinIO for storage, you do not need to add AWS credentials for storage in the chart, as MinIO credentials are typically set via environment variables or the storage config in your
values.yaml
. For AWS SNS/SQS notifications, Flyte expects the pod running FlyteAdmin to have AWS credentials with permissions for SNS and SQS. The recommended approach is to use a Kubernetes service account annotated for IAM roles (IRSA) on EKS, or to inject AWS credentials as environment variables into the FlyteAdmin pod (Flyte notification config reference). If you must use static credentials, you can add them as environment variables in the FlyteAdmin deployment by customizing the Helm chart, but this is not recommended for production. For MinIO storage, keep using your MinIO credentials as configured. Would you like a step-by-step example for setting up IRSA or injecting AWS credentials into the FlyteAdmin pod? Sources: - https://github.com/flyteorg/flyte/pull/3807 - https://www.union.ai/docs/flyte/deployment/flyte-configuration/configuring-notifications/#code-b622f292465f3c54e8bb347237e8cd6af428c954-1 πŸ‘ 0 button πŸ‘Ž 0 button πŸ’‘ Hint: Mention @runllm in the thread for followups.