17.2. Integrating with email on RHACS Cloud Service
You can use your existing email provider or the built-in email notifier in RHACS Cloud Service to send email alerts about policy violations.
- To use your own email provider, you must configure the email provider as described in the section Configuring the email plugin.
- To use the built-in email notifier, you must configure the RHACS Cloud Service email plugin.
17.2.1. Configuring the RHACS Cloud Service email plugin 링크 복사링크가 클립보드에 복사되었습니다!
The RHACS Cloud Service notifier sends an email to a recipient. You can specify the recipient in the integration, or RHACS Cloud Service can use annotation keys to find the recipient.
- You can only send 250 emails per 24-hour rolling period. If you exceed this limit, RHACS Cloud Service sends emails only after the 24-hour period ends.
- Because of rate limits, Red Hat recommends using email notifications only for critical alerts or vulnerability reports.
Procedure
-
Go to Platform Configuration
Integrations. - Under the Notifier Integrations section, select RHACS Cloud Service Email.
- Select New Integration.
- In the Integration name field, enter a name for your email integration.
- Specify the email address to which you want to send the email notifications in the Default recipient field.
Optional: Enter an annotation key in Annotation key for recipient. You can use annotations to dynamically determine an email recipient. To do this:
Add an annotation similar to the following example in your namespace or deployment YAML file, where
emailis theAnnotation keythat you specify in your email integration. You can create an annotation for the deployment or the namespace.annotations: email: <email_address>-
Use the annotation key
emailin the Annotation key for recipient field.
If you configured the deployment or namespace with an annotation, the RHACS Cloud Service sends the alert to the email specified in the annotation. Otherwise, it sends the alert to the default recipient.
The following rules govern how RHACS Cloud Service determines the recipient of an email notification:
- If the deployment has an annotation key, the annotation’s value overrides the default value.
- If the namespace has an annotation key, the namespace’s value overrides the default value.
- If a deployment has an annotation key and a defined audience, RHACS Cloud Service sends an email to the audience specified in the key.
- If a deployment does not have an annotation key, RHACS Cloud Service checks the namespace for an annotation key and sends an email to the specified audience.
- If no annotation keys exist, RHACS Cloud Service sends an email to the default recipient.
17.2.2. Configuring policy notifications 링크 복사링크가 클립보드에 복사되었습니다!
Enable alert notifications for system policies.
Procedure
-
In the RHACS portal, go to Platform Configuration
Policy Management. - Select one or more policies for which you want to send alerts.
- Under Bulk actions, select Enable notification.
In the Enable notification window, select the RHACS Cloud Service Email notifier.
참고If you have not configured any other integrations, the system displays a message that no notifiers are configured.
- Click Enable.
- Red Hat Advanced Cluster Security for Kubernetes sends notifications on an opt-in basis. To receive notifications, you must first assign a notifier to the policy.
- Notifications are only sent once for a given alert. If you have assigned a notifier to a policy, you will not receive a notification unless a violation generates a new alert.
Red Hat Advanced Cluster Security for Kubernetes creates a new alert for the following scenarios:
- A policy violation occurs for the first time in a deployment.
- A runtime-phase policy violation occurs in a deployment after you resolved the previous runtime alert for a policy in that deployment.