Andrew Korzhuev
01/30/2023, 2:14 PMflyte-core
through Helm on EKS when workflow_notifications
are enabled it produces ill-formatted yaml.
Steps to reproduce, `test-values.yaml`:
userSettings:
accountRegion: us-east-1
accountNumber: 123123123
notifications:
topicName: topic-name
queueName: queue-name
workflow_notifications:
enabled: true
config:
notifications:
type: "aws"
region: "{{ .Values.userSettings.accountRegion }}"
publisher:
topicName: "arn:aws:sns:{{ .Values.userSettings.accountRegion }}:{{ .Values.userSettings.accountNumber }}:{{ .Values.userSettings.notifications.topicName }}"
processor:
queueName: "{{ .Values.userSettings.notifications.queueName }}"
accountId: "{{ .Values.userSettings.accountNumber }}"
emailer:
subject: "Flyte: {{ project }}/{{ domain }}/{{ launch_plan.name }} has '{{ phase }}'"
sender: "{{ .Values.userSettings.notifications.sender }}"
body: |
"Execution {{ workflow.project }}/{{ workflow.domain }}/{{ workflow.name }}/{{ name }} has {{ phase }}.
Details: <https://flyte.example.com/console/projects/{{> project }}/domains/{{ domain }}/executions/{{ name }}.
{{ error }}"
Then run template:
helm template admin flyteorg/flyte-core --version v1.2.1 --values test-values.yaml | grep -A 4 "notifications.yaml"
Which outputs:
notifications.yaml: |
notifications:
type: aws
region:us-east-1
publisher:
By yaml spec the key must be separated with space, so region:us-east-1
breaks the service deployment and should be region: us-east-1
instead. Simple workaround is to put an extra space inside templated string region: " {{ .Values.userSettings.accountRegion }}"
.Samhita Alla
Andrew Korzhuev
01/31/2023, 9:57 AM