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

Enable the email alert #682

Closed

Conversation

athiruma
Copy link
Collaborator

@athiruma athiruma commented Oct 5, 2023

Type of change

Note: Fill x in []

  • bug
  • enhancement
  • documentation
  • dependencies

Description

Enabled the email alert.

For security reasons, all pull requests need to be approved first before running any automated CI

@athiruma athiruma added bug Something isn't working documentation Improvements or additions to documentation ok-to-test PR ok to test labels Oct 5, 2023
@athiruma athiruma requested a review from ebattat October 5, 2023 06:13
@athiruma athiruma self-assigned this Oct 5, 2023
ldap_data = self._ldap.get_user_details(user_name=to)
cc = [self._account_admin, f'{ldap_data.get("managerId")}@redhat.com']
if email_id:
Copy link
Collaborator

Choose a reason for hiding this comment

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

What the purpose of this email adding ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if user name is not in LDAP, we need to check Email tag.

@@ -27,7 +27,7 @@
os.system(f"echo Polices list: {policies_not_in_action}")
for region in regions:
for policy in policies_not_in_action:
os.system(f"""podman run --rm --name cloud-governance-poc-haim --net="host" -e MANAGER_EMAIL_ALERT="False" -e EMAIL_ALERT="False" -e account="{account_name}" -e policy="{policy}" -e AWS_ACCESS_KEY_ID="{access_key}" -e AWS_SECRET_ACCESS_KEY="{secret_key}" -e AWS_DEFAULT_REGION="{region}" -e dry_run="yes" -e LDAP_HOST_NAME="{LDAP_HOST_NAME}" -e es_host="{ES_HOST}" -e es_port="{ES_PORT}" -e policy_output="s3://{s3_bucket}/{LOGS}/{region}" -e log_level="INFO" quay.io/ebattat/cloud-governance:latest""")
os.system(f"""podman run --rm --name cloud-governance-poc-haim --net="host" -e MANAGER_EMAIL_ALERT="True" -e EMAIL_ALERT="True" -e account="{account_name}" -e policy="{policy}" -e AWS_ACCESS_KEY_ID="{access_key}" -e AWS_SECRET_ACCESS_KEY="{secret_key}" -e AWS_DEFAULT_REGION="{region}" -e dry_run="yes" -e LDAP_HOST_NAME="{LDAP_HOST_NAME}" -e es_host="{ES_HOST}" -e es_port="{ES_PORT}" -e policy_output="s3://{s3_bucket}/{LOGS}/{region}" -e log_level="INFO" quay.io/ebattat/cloud-governance:latest""")
Copy link
Collaborator

@ebattat ebattat Oct 5, 2023

Choose a reason for hiding this comment

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

It should be only for Haim's account, Why do you enable it for all the accounts ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is commonfolder, so it should be enabled by default

@athiruma athiruma force-pushed the enable_email_alert branch 2 times, most recently from 3700adf to a18f1e1 Compare October 9, 2023 04:51
@athiruma athiruma force-pushed the enable_email_alert branch from a18f1e1 to 0788eb5 Compare October 9, 2023 04:52
@athiruma athiruma closed this May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation ok-to-test PR ok to test
Projects
Development

Successfully merging this pull request may close these issues.

2 participants