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

chore: Update notifications engine to 7a06976 #3384

Merged
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/generated/notification-services/alertmanager.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ You should turn off "send_resolved" or you will receive unnecessary recovery not
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
Copy link
Contributor Author

@kzap kzap Feb 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generated by running make docs

These were recently renamed upstream to a argocd specific name :/

data:
service.alertmanager: |
targets:
Expand All @@ -58,7 +58,7 @@ If your alertmanager has changed the default api, you can customize "apiPath".
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.alertmanager: |
targets:
Expand All @@ -70,7 +70,7 @@ data:

### Send high availability alertmanager with auth

Store auth token in `argocd-notifications-secret` Secret and use configure in `argocd-notifications-cm` ConfigMap.
Store auth token in `argo-rollouts-notification-secret` Secret and use configure in `argo-rollouts-notification-configmap` ConfigMap.

```yaml
apiVersion: v1
Expand All @@ -89,7 +89,7 @@ stringData:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.alertmanager: |
targets:
Expand All @@ -110,7 +110,7 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.alertmanager: |
targets:
Expand Down
23 changes: 18 additions & 5 deletions docs/generated/notification-services/awssqs.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# AWS SQS
# AWS SQS

## Parameters

This notification service is capable of sending simple messages to AWS SQS queue.
This notification service is capable of sending simple messages to AWS SQS queue.

* `queue` - name of the queue you are intending to send messages to. Can be overridden with target destination annotation.
* `region` - region of the sqs queue can be provided via env variable AWS_DEFAULT_REGION
Expand Down Expand Up @@ -30,7 +30,7 @@ metadata:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.awssqs: |
region: "us-east-2"
Expand Down Expand Up @@ -63,7 +63,7 @@ stringData:

### Minimal configuration using AWS Env variables

Ensure following list of environment variables are injected via OIDC, or other method. And assuming SQS is local to the account.
Ensure the following list of environment variables are injected via OIDC, or another method. And assuming SQS is local to the account.
You may skip usage of secret for sensitive data and omit other parameters. (Setting parameters via ConfigMap takes precedent.)

Variables:
Expand All @@ -89,7 +89,7 @@ metadata:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.awssqs: |
queue: "myqueue"
Expand All @@ -104,3 +104,16 @@ data:
- oncePer: obj.metadata.annotations["generation"]

```

## FIFO SQS Queues

FIFO queues require a [MessageGroupId](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageGroupId) to be sent along with every message, every message with a matching MessageGroupId will be processed one by one in order.

To send to a FIFO SQS Queue you must include a `messageGroupId` in the template such as in the example below:

```yaml
template.deployment-ready: |
message: |
Deployment {{.obj.metadata.name}} is ready!
messageGroupId: {{.obj.metadata.name}}-deployment
```
6 changes: 3 additions & 3 deletions docs/generated/notification-services/email.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The following snippet contains sample Gmail service configuration:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.email.gmail: |
username: $email-username
Expand All @@ -36,7 +36,7 @@ Without authentication:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.email.example: |
host: smtp.example.com
Expand All @@ -52,7 +52,7 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
template.app-sync-succeeded: |
email:
Expand Down
7 changes: 4 additions & 3 deletions docs/generated/notification-services/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ The GitHub notification service changes commit status using [GitHub Apps](https:
3. Generate a private key, and download it automatically
![3](https://user-images.githubusercontent.com/18019529/108397926-d4a36300-725b-11eb-83fe-74795c8c3e03.png)
4. Install app to account
5. Store privateKey in `argocd-notifications-secret` Secret and configure GitHub integration
in `argocd-notifications-cm` ConfigMap
5. Store privateKey in `argo-rollouts-notification-secret` Secret and configure GitHub integration
in `argo-rollouts-notification-configmap` ConfigMap

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.github: |
appID: <app-id>
Expand Down Expand Up @@ -76,6 +76,7 @@ template.app-deployed: |
logURL: "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true"
requiredContexts: []
autoMerge: true
transientEnvironment: false
pullRequestComment:
content: |
Application {{.app.metadata.name}} is now running new version of deployments manifests.
Expand Down
4 changes: 2 additions & 2 deletions docs/generated/notification-services/googlechat.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ The Google Chat notification service send message notifications to a google chat
3. Under **Incoming Webhooks**, click **Add Webhook**
4. Give a name to the webhook, optionally add an image and click **Save**
5. Copy the URL next to your webhook
6. Store the URL in `argocd-notification-secret` and declare it in `argocd-notifications-cm`
6. Store the URL in `argocd-notification-secret` and declare it in `argo-rollouts-notification-configmap`

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.googlechat: |
webhooks:
Expand Down
4 changes: 2 additions & 2 deletions docs/generated/notification-services/grafana.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Available parameters :
3. Click "Add API Key"
4. Fill the Key with name `ArgoCD Notification`, role `Editor` and Time to Live `10y` (for example)
5. Click on Add button
6. Store apiKey in `argocd-notifications-secret` Secret and Copy your API Key and define it in `argocd-notifications-cm` ConfigMap
6. Store apiKey in `argo-rollouts-notification-secret` Secret and Copy your API Key and define it in `argo-rollouts-notification-configmap` ConfigMap

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.grafana: |
apiUrl: https://grafana.example.com/api
Expand Down
6 changes: 3 additions & 3 deletions docs/generated/notification-services/mattermost.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
![1](https://user-images.githubusercontent.com/18019529/111499520-62ed0500-8786-11eb-88b0-d0aade61fed4.png)
2. Invite team
![2](https://user-images.githubusercontent.com/18019529/111500197-1229dc00-8787-11eb-98e5-587ee36c94a9.png)
3. Store token in `argocd-notifications-secret` Secret and configure Mattermost integration
in `argocd-notifications-cm` ConfigMap
3. Store token in `argo-rollouts-notification-secret` Secret and configure Mattermost integration
in `argo-rollouts-notification-configmap` ConfigMap

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.mattermost: |
apiURL: <api-url>
Expand Down
4 changes: 2 additions & 2 deletions docs/generated/notification-services/newrelic.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
## Configuration

1. Create a NewRelic [Api Key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#user-api-key)
2. Store apiKey in `argocd-notifications-secret` Secret and configure NewRelic integration in `argocd-notifications-cm` ConfigMap
2. Store apiKey in `argo-rollouts-notification-secret` Secret and configure NewRelic integration in `argo-rollouts-notification-configmap` ConfigMap

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.newrelic: |
apiURL: <api-url>
Expand Down
48 changes: 42 additions & 6 deletions docs/generated/notification-services/opsgenie.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,58 @@ To be able to send notifications with argocd-notifications you have to create an
3. Click "Teams" in the Menu on the left
4. Select the team that you want to notify
5. In the teams configuration menu select "Integrations"
6. click "Add Integration" in the top right corner
6. Click "Add Integration" in the top right corner
7. Select "API" integration
8. Give your integration a name, copy the "API key" and safe it somewhere for later
9. Make sure the checkboxes for "Create and Update Access" and "enable" are selected, disable the other checkboxes to remove unnecessary permissions
10. Click "Safe Integration" at the bottom
11. Check your browser for the correct server apiURL. If it is "app.opsgenie.com" then use the US/international api url `api.opsgenie.com` in the next step, otherwise use `api.eu.opsgenie.com` (European API).
12. You are finished with configuring opsgenie. Now you need to configure argocd-notifications. Use the apiUrl, the team name and the apiKey to configure the Opsgenie integration in the `argocd-notifications-secret` secret.
9. Click "Edit" in the integration settings
10. Make sure the checkbox for "Create and Update Access" is selected, disable the other checkboxes to remove unnecessary permissions
11. Click "Save" at the bottom
12. Click "Turn on integration" in the top right corner
13. Check your browser for the correct server apiURL. If it is "app.opsgenie.com" then use the US/international api url `api.opsgenie.com` in the next step, otherwise use `api.eu.opsgenie.com` (European API).
14. You are finished with configuring Opsgenie. Now you need to configure argocd-notifications. Use the apiUrl, the team name and the apiKey to configure the Opsgenie integration in the `argo-rollouts-notification-secret` secret.
15. You can find the example `argo-rollouts-notification-configmap` configuration at the below.

| **Option** | **Required** | **Type** | **Description** | **Example** |
| ------------- | ------------ | -------- | -------------------------------------------------------------------------------------------------------- | -------------------------------- |
| `description` | True | `string` | Description field of the alert that is generally used to provide a detailed information about the alert. | `Hello from Argo CD!` |
| `priority` | False | `string` | Priority level of the alert. Possible values are P1, P2, P3, P4 and P5. Default value is P3. | `P1` |
| `alias` | False | `string` | Client-defined identifier of the alert, that is also the key element of Alert De-Duplication. | `Life is too short for no alias` |
| `note` | False | `string` | Additional note that will be added while creating the alert. | `Error from Argo CD!` |

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.opsgenie: |
apiUrl: <api-url>
apiKeys:
<your-team>: <integration-api-key>
template.opsgenie: |
message: |
[Argo CD] Application {{.app.metadata.name}} has a problem.
opsgenie:
description: |
Application: {{.app.metadata.name}}
Health Status: {{.app.status.health.status}}
Operation State Phase: {{.app.status.operationState.phase}}
Sync Status: {{.app.status.sync.status}}
priority: P1
alias: {{.app.metadata.name}}
note: Error from Argo CD!
trigger.on-a-problem: |
- description: Application has a problem.
send:
- opsgenie
when: app.status.health.status == 'Degraded' or app.status.operationState.phase in ['Error', 'Failed'] or app.status.sync.status == 'Unknown'
```

16. Add annotation in application yaml file to enable notifications for specific Argo CD app.
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
annotations:
notifications.argoproj.io/subscribe.on-a-problem.opsgenie: <your-team>
```
4 changes: 2 additions & 2 deletions docs/generated/notification-services/overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The notification services represent integration with services such as slack, email or custom webhook. Services are configured in `argocd-notifications-cm` ConfigMap
using `service.<type>.(<custom-name>)` keys and might reference sensitive data from `argocd-notifications-secret` Secret. Following example demonstrates slack
The notification services represent integration with services such as slack, email or custom webhook. Services are configured in `argo-rollouts-notification-configmap` ConfigMap
using `service.<type>.(<custom-name>)` keys and might reference sensitive data from `argo-rollouts-notification-secret` Secret. Following example demonstrates slack
service configuration:

```yaml
Expand Down
4 changes: 2 additions & 2 deletions docs/generated/notification-services/pagerduty.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ stringData:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.pagerduty: |
token: $pagerdutyToken
Expand All @@ -41,7 +41,7 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
template.rollout-aborted: |
message: Rollout {{.rollout.metadata.name}} is aborted.
Expand Down
4 changes: 2 additions & 2 deletions docs/generated/notification-services/pagerduty_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ stringData:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.pagerdutyv2: |
serviceKeys:
Expand All @@ -43,7 +43,7 @@ data:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
template.rollout-aborted: |
message: Rollout {{.rollout.metadata.name}} is aborted.
Expand Down
4 changes: 2 additions & 2 deletions docs/generated/notification-services/pushover.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Pushover

1. Create an app at [pushover.net](https://pushover.net/apps/build).
2. Store the API key in `<secret-name>` Secret and define the secret name in `<config-map-name>` ConfigMap:
2. Store the API key in `<secret-name>` Secret and define the secret name in `argo-rollouts-notification-configmap` ConfigMap:

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.pushover: |
token: $pushover-token
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/notification-services/rocketchat.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ stringData:
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.rocketchat: |
email: $rocketchat-email
Expand Down
7 changes: 4 additions & 3 deletions docs/generated/notification-services/slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The Slack notification service configuration includes following settings:
| `signingSecret` | False | `string` | | `8f742231b10e8888abcd99yyyzzz85a5` |
| `token` | **True** | `string` | The app's OAuth access token. | `xoxb-1234567890-1234567890123-5n38u5ed63fgzqlvuyxvxcx6` |
| `username` | False | `string` | The app username. | `argocd` |
| `disableUnfurl` | False | `bool` | Disable slack unfurling links in messages | `true` |

## Configuration

Expand All @@ -31,7 +32,7 @@ The Slack notification service configuration includes following settings:

1. Create a public or private channel, for this example `my_channel`
1. Invite your slack bot to this channel **otherwise slack bot won't be able to deliver notifications to this channel**
1. Store Oauth access token in `argocd-notifications-secret` secret
1. Store Oauth access token in `argo-rollouts-notification-secret` secret

```yaml
apiVersion: v1
Expand All @@ -42,13 +43,13 @@ The Slack notification service configuration includes following settings:
slack-token: <Oauth-access-token>
```

1. Define service type slack in data section of `argocd-notifications-cm` configmap:
1. Define service type slack in data section of `argo-rollouts-notification-configmap` configmap:

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: <config-map-name>
name: argo-rollouts-notification-configmap
data:
service.slack: |
token: $slack-token
Expand Down
Loading
Loading