Hi everyone. I don't know if I can use flyte-pod-w...
# feature-discussions
a
Hi everyone. I don't know if I can use flyte-pod-webhook to send workflow status notifications to discord app?. Thanks all
f
not flyte-pod-webhook, but you can send status notifications using Flyte event egress
👍 1
Another option is to simply use the Discord Email address to send notifications
this is available out of the box
a
Thanks, @freezing-airport-6809. 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? @freezing-airport-6809
g
@adamant-zoo-87864 Can you make your body in double quotes ? I think helm is thinking it’s helm syntax.
a
I did add double quotes in the body and tried to remove the vertical line. it's still doesn't solve
g
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
❤️ 1
a
so how to fix them? @great-school-54368
g
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
❤️ 1
I mean this config should not have any
values.usersettings
, substitute them manually
Copy code
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 }}
👍 1
f
Cc @adamant-zoo-87864 / @great-school-54368 let's file a docs issue please
👍 2
a
Hi all. after fixing according to the solution of @great-school-54368, I have successfully configured flyte notifications for sending the workflow status message to Email.
❤️ 1
f
Can you contribute to the docs
g
It need fix in helm chart, I created a issue https://github.com/flyteorg/flyte/issues/2761
❤️ 1