Created attachment 1664309 [details]
Description of problem:
Create alert receiver from console, user could create receivers with same name, and routing labels shown on list is a combination of routing labels from all these receivers.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Create slack type alert receiver with name "test1" and routing label "test=one".
2.Create webhook type alert receiver with name "test1" and routing label "new=two"
3.Delete one receiver "test1" by clicking "Delete Receiver" in kebab.
1. Receiver "test1" is created.
2. Another receiver "test1" is created, and routing label for both "test1" receiver are "test=one new=two"
3. All receivers named "test1" are deleted.
2. Not sure if it's legal to have receivers with same name.
3. If receivers with same name could co-exist, should not delete all receivers when delete one of them.
I suggest we wait on implementing a whole bunch of UI/frontend receiver form validations. The issue is that other k8s yaml is validated via the backend, since the alertmanger.yaml is stored in a Secret, it currently doesn't go through any yaml validation.
There is a JIRA story to investigate an overall alertmanger yaml schema validation strategy:
In the JIRA story, Sam P. mentions: ".. the monitoring guys are probably going to move [alertmanager] to a CRD in 4.5 if they do, we'd have the backend to validate for us so i'd probably hold off on [implementing more frontend validation]".
Receiver's names should be unique:
# The unique name of the receiver.
After some discussions it was determined that this will be fixed in console UI.
We do not know when/if monitoring team will switch alertmanager to a CRD, so until such time console will handle alertmanager.yaml validations.
Checked on OCP 4.5 cluster with payload 4.5.0-0.ci-2020-03-04-223611.
Create a alert receiver with name"test", then create another receiver, set name as "test" again, there is prompt info "A receiver with that name already exists.", and "Create" button is disabled.
The bug is fixed, so move it to Verified.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.