Thread
#feature-discussions
    o

    Oliver Nguyen

    1 month ago
    Hi everyone. I don't know if I can use flyte-pod-webhook to send workflow status notifications to discord app?. Thanks all
    Ketan (kumare3)

    Ketan (kumare3)

    1 month ago
    not flyte-pod-webhook, but you can send status notifications using Flyte event egress
    Another option is to simply use the Discord Email address to send notifications
    this is available out of the box
    o

    Oliver Nguyen

    1 month ago
    Thanks, @Ketan (kumare3). I will try it
    I'm getting the error
    function "workflow" not defined
    when configuring the values file. Do I need to define it somewhere? @Ketan (kumare3)
    y

    Yuvraj

    1 month ago
    @Oliver Nguyen Can you make your body in double quotes ? I think helm is thinking it’s helm syntax.
    o

    Oliver Nguyen

    1 month ago
    I did add double quotes in the body and tried to remove the vertical line. it's still doesn't solve
    y

    Yuvraj

    1 month ago
    oh i found the issue, It exist in our helm chart here https://github.com/flyteorg/flyte/blob/43ae9b335df08f7c642a03e4020a8337da7f9d71/charts/flyte-core/templates/admin/configmap.yaml#L46 We have a helm function
    tpl
    for substituting the
    .values.usersettings
    and because of that helm is also evaluating the
    {{ workflow.project }}
    and it is not available in helm chart helper
    o

    Oliver Nguyen

    1 month ago
    so how to fix them? @Yuvraj
    y

    Yuvraj

    1 month ago
    In your chart replace this line https://github.com/flyteorg/flyte/blob/43ae9b335df08f7c642a03e4020a8337da7f9d71/charts/flyte-core/templates/admin/configmap.yaml#L46 with
    notifications.yaml: | {{ toYaml . | nindent 4 }}
    And in your values file for notification please don’t use
    .values.usersettings,
    Use direct values
    I mean this config should not have any
    values.usersettings
    , substitute them manually
    workflow_notifications:
      enabled: false
      config:
        notifications:
          type: aws
          region: "{{ .Values.userSettings.accountRegion }}"
          publisher:
            topicName: "arn:aws:sns:{{ .Values.userSettings.accountRegion }}:{{ .Values.userSettings.accountNumber }}:flyte-notifications-topic"
          processor:
            queueName: flyte-notifications-queue
            accountId: "{{ .Values.userSettings.accountNumber }}"
          emailer:
            subject: "Flyte: {{ project }}/{{ domain }}/{{ launch_plan.name }} has '{{ phase }}'"
            sender: "<mailto:flyte@example.com|flyte@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 }}
    Ketan (kumare3)

    Ketan (kumare3)

    1 month ago
    Cc @Oliver Nguyen / @Yuvraj let's file a docs issue please
    o

    Oliver Nguyen

    1 month ago
    Hi all. after fixing according to the solution of @Yuvraj, I have successfully configured flyte notifications for sending the workflow status message to Email.
    Ketan (kumare3)

    Ketan (kumare3)

    1 month ago
    Can you contribute to the docs
    y

    Yuvraj

    1 month ago
    It need fix in helm chart, I created a issue https://github.com/flyteorg/flyte/issues/2761