Skip to content

Conversation

@Priyankasaggu11929
Copy link
Contributor

@Priyankasaggu11929 Priyankasaggu11929 commented Mar 23, 2021

Description

The PR make changes to add custom details under PagerDuty config in alertmanager template.

Related JIRA ticket: https://issues.redhat.com/browse/MGDAPI-1186
Files updated:

  • controllers/rhmi/rhmi_controller.go ~ add rbac marker to include clusterversions object verbs/permissions.
  • pkg/products/monitoring/reconciler.go ~ add cluster information parameters (cluster_name, cluster_ID, console) in the templateUtil helper function.
  • pkg/products/monitoring/reconciler_test.go ~ add tests around changes made in the above file.
  • templates/monitoring/alertmanager/alertmanager-application-monitoring.yaml ~ add custom details under PagerDuty config to include cluster information passed as params in the reconciler.go file.

How to Verify

  • Install RHOAM using this PR branch.
  • Confirm that the alertmanager config has this following section:

am_PD

  • As a result of the above config changes, any incident triggered in PagerDuty will contain the three new fields as well, in the custom details section.

pagerduty_custom_details

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added a test case that will be used to verify my changes
  • Verified independently on a cluster by reviewer

@openshift-ci-robot
Copy link

Hi @Priyankasaggu11929. Thanks for your PR.

I'm waiting for a integr8ly member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Priyankasaggu11929
Copy link
Contributor Author

/assign @laurafitzgerald

@Priyankasaggu11929
Copy link
Contributor Author

/assign @briangallagher

@carlkyrillos
Copy link
Contributor

/lgtm Verified on cluster.

@Priyankasaggu11929
Copy link
Contributor Author

Priyankasaggu11929 commented Mar 31, 2021

Thank you @carlkyrillos for verifying the changes. Could you also mark it /ok-to-test so the required prow tests run as well.

/assign @carlkyrillos

Also, since I just assigned you the PR, I feel marking /ltgtm would be required again as well.

@briangallagher
Copy link
Contributor

/ok-to-test

Co-authored-by: Laura Fitzgerald <lfitzger@redhat.com>
@laurafitzgerald
Copy link
Contributor

laurafitzgerald commented Apr 1, 2021

@Priyankasaggu11929 thanks for the quick change, you'll need to rename the variable everywhere it's used or things wont work.

also running make kubebuilder/fix make code/gen and commit the change will resolve the failing test.

@Priyankasaggu11929
Copy link
Contributor Author

Thank you for the review, @laurafitzgerald. I'll update the code for the suggested changes.

@laurafitzgerald
Copy link
Contributor

@carlkyrillos did you see a change locally after running the verification? I suspect you saw a change to an rbac file?

Priyankasaggu11929 and others added 2 commits April 1, 2021 14:02
Co-authored-by: Laura Fitzgerald <lfitzger@redhat.com>
Co-authored-by: Laura Fitzgerald <lfitzger@redhat.com>
@laurafitzgerald
Copy link
Contributor

Strange. I see myself as co-author now. Did you commit in the github UI?

@Priyankasaggu11929
Copy link
Contributor Author

Strange. I see myself as co-author now. Did you commit in the github UI?

Yes, I committed the suggestion patches you mentioned above.

Also, have ran made code/gen to fix failing test. It regenerated the config/rbac/role.yaml to add the clusterversions object this time.

@laurafitzgerald
Copy link
Contributor

great @Priyankasaggu11929
thanks for the changes
/lgtm
will let @carlkyrillos take a look before approval as there are changes since his verification.

@carlkyrillos
Copy link
Contributor

@carlkyrillos did you see a change locally after running the verification? I suspect you saw a change to an rbac file?

@Priyankasaggu11929 ran make code/gen and added a commit that includes the rbac change.

@carlkyrillos
Copy link
Contributor

/lgtm

@openshift-ci-robot
Copy link

@carlkyrillos: changing LGTM is restricted to collaborators

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jessesarn
Copy link
Contributor

/lgtm

@jessesarn
Copy link
Contributor

/approve

1 similar comment
@jessesarn
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jessesarn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit da3e59f into integr8ly:master Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants