argoproj / argoproj/notifications-engine

context in template shows no value

Open
#108 1 comment 5 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
334
Forks
217
PR merge metrics
No merged PRs in 30d

Description

Defined a context in the configmap and the notification was trigger. However the .context.fieldname always shows this is with Argo rollouts. Here is the configmap for the notification
...
data:
context: |
region: "east"
environmentName: "staging"

service.webhook.form: |
url: http://172.20.2.210:4566/00000000000/canary-status-queue
headers:
- name: Content-Type
value: application/x-www-form-urlencoded

template.rollout-completed: |
webhook:
form:
method: POST
body: Action=SendMessage&MessageBody={"environment":"{{ .context.environmentName }}","rollout":"{{.rollout.metadata.name}}","status":"completed"}

{{.context.xxx}} are in several sample templates, does this field only work for ArgoCD?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the notification ConfigMap's context and template.rollout-completed entries, then trace how context values reach template rendering for Argo Rollouts. Compare the sample templates using .context with this configuration and verify whether environmentName renders as staging; done means the configured context value appears in the webhook body or the limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.