Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow templating Slack NotifyBroadcast #338

Open
mkantzer opened this issue Sep 9, 2024 · 0 comments
Open

Allow templating Slack NotifyBroadcast #338

mkantzer opened this issue Sep 9, 2024 · 0 comments

Comments

@mkantzer
Copy link

mkantzer commented Sep 9, 2024

I've got a slack notification that I send that alerts me to argocd events, and I'm using grouping keys to thread related notifications.

However, I only want to use notifyBroadcast under certain circumstances.

Currently, you cannot use any templating on that field: I can't do, for example:

    template.app-health-degraded-every: |
      slack:
        notifyBroadcast: {{ if .isProduction }}true{{ else }}false{{ end }}
        deliveryPolicy: PostAndUpdate

I have to provide a concrete true or false.

I recognize that there's likely some string vs bool typing issues here, but it would be really great if we could add some text templating to include notifyBroadcast. (And maybe deliveryPolicy?)

I'm also happy to have this be accomplished in any other way (perhaps a new field notifyBroadcastExpr where you can provide an expr test, similar to how the triggers are executed?), as long as I can re-use a template but change these settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant