Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-4303

Can't configure notification context via NotificationsConfigurations CR

XMLWordPrintable

    • 5
    • False
    • None
    • False
    • Hide
      Before this update Context was not supported by NotificationsConfiguration custom resource. Users could not configure notification context that is used to define some shared context between all templates. This updates adds a field to allow users to add context in the NotificationsConfiguration CR. Now, context for notifications is handled in our operator. Example -

      Add context to the NotificationsConfiguration CR. By default there is no context set in the CR. Example -

      spec:
        context:
          key1: value1
          key2: value2
        templates:
          template.app-created: |-
            email:
              subject: Application {{.app.metadata.name}} has been created.
            message: Application {{.app.metadata.name}} has been created.
            teams:
              title: Application {{.app.metadata.name}} has been created.
          template.app-deleted: |-
           ...
           ...
      Show
      Before this update Context was not supported by NotificationsConfiguration custom resource. Users could not configure notification context that is used to define some shared context between all templates. This updates adds a field to allow users to add context in the NotificationsConfiguration CR. Now, context for notifications is handled in our operator. Example - Add context to the NotificationsConfiguration CR. By default there is no context set in the CR. Example - spec:   context:     key1: value1     key2: value2   templates:     template.app-created: |-       email:         subject: Application {{.app.metadata.name}} has been created.       message: Application {{.app.metadata.name}} has been created.       teams:         title: Application {{.app.metadata.name}} has been created.     template.app-deleted: |-      ...      ...
    • GITOPS Sprint 3254, GitOps Crimson - Sprint 3255

      Description of problem:

      The NotificationsConfigurations CRD introduced in v1.12.0 doesn't provide option to set user-defined context in argocd-notifications-cm . 

      Docs: https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/templates/#defining-user-defined-context 

       

      This blocks users who use notification context from upgrading to v1.12.0, as there is no known workaround other than updating all context references in templates with their actual value, which doesn't sound like a feasible workaround. 

      Prerequisites (if any, like setup, operators/versions):

      gitops operator v1.12.0

      Steps to Reproduce

       # <steps>

      Actual results:

      Expected results:

      Reproducibility (Always/Intermittent/Only Once):

      Acceptance criteria: 

       

      Definition of Done:

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

       

       *

              saumeyakatyal Saumeya Katyal
              rh-ee-sghadi Siddhesh Ghadi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: