Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Custom templates and Webhooks #384

Open
joaogl opened this issue Feb 23, 2022 · 0 comments
Open

Custom templates and Webhooks #384

joaogl opened this issue Feb 23, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@joaogl
Copy link

joaogl commented Feb 23, 2022

Summary

I think there should be a better way to specific the webhook used in a template, or rather, a template should not have a webhook defined in it. This should be more generic to be reusable.

Use Cases

Looking at this config I think highlights the issue even tho this example is quite simple, for bigger and larger templates it might become less easy to maintain.

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-notifications-cm
data:
  service.webhook.discord-channel-1: |
    url: https://<hostname>/<optional-path>
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-notifications-cm
data:
  service.webhook.discord-channel-2: |
    url: https://<hostname>/<optional-path>
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-notifications-cm
data:
  template.app-deployed: |
    webhook:
      discord-channel-1:
        method: POST 
        body: |
          My super awesome message
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-notifications-cm
data:
  template.app-deployed: |
    webhook:
      discord-channel-2:
        method: POST 
        body: |
          My super awesome message

This means, if I want to sent the same message, to 2 different channels, I simply have to duplicate the entire thing.
If I want to send it to 10 channels I have to duplicate 10 times the same thing.
If I then simply want to change the message, I have to change it 10 times because it's not generic.

For this case, I believe we should have to duplicate the service, since it's a different URL for each channel, but for the template we should be able to specify the same template to be used by any service essentially.


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@joaogl joaogl added the enhancement New feature or request label Feb 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant