Add base alert management API#657
Add base alert management API#657machadovilaca wants to merge 14 commits intoopenshift:alerts-management-apifrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: machadovilaca The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/cc @simonpasquier |
There was a problem hiding this comment.
Can we have a separate PR on main for the golangci-lint addition? It's very much appreciated but it'd be easier to review separately. Can we also have a minimal golangci-lint configuration? Once this is done we should also consider adding a job to openshift/release to enforce the verification.
Regarding goimports, I'd recommend using the gci linter which does the same IIUC.
cfc4748 to
dc61cb7
Compare
Signed-off-by: machadovilaca <machadovilaca@gmail.com>
dc61cb7 to
5aad6ea
Compare
removed for now, will create a PR to add it separately |
Signed-off-by: machadovilaca <machadovilaca@gmail.com>
Signed-off-by: machadovilaca <machadovilaca@gmail.com>
cmd/plugin-backend.go
Outdated
| certArg = flag.String("cert", "", "cert file path to enable TLS (disabled by default)") | ||
| keyArg = flag.String("key", "", "private key file path to enable TLS (disabled by default)") | ||
| featuresArg = flag.String("features", "", "enabled features, comma separated.\noptions: ['acm-alerting', 'incidents', 'dev-config', 'perses-dashboards']") | ||
| featuresArg = flag.String("features", "", "enabled features, comma separated.\noptions: ['acm-alerting', 'incidents', 'dev-config', 'perses-dashboards', 'management-api']") |
There was a problem hiding this comment.
| featuresArg = flag.String("features", "", "enabled features, comma separated.\noptions: ['acm-alerting', 'incidents', 'dev-config', 'perses-dashboards', 'management-api']") | |
| featuresArg = flag.String("features", "", "enabled features, comma separated.\noptions: ['acm-alerting', 'incidents', 'dev-config', 'perses-dashboards', 'alert-management-api']") |
|
|
||
| if managementClient != nil { | ||
| managementRouter := managementrouter.New(managementClient) | ||
| router.PathPrefix("/api/v1/alerting").Handler(managementRouter) |
There was a problem hiding this comment.
we've discussed before that we wanted an API scheme similar to https://prometheus.io/docs/prometheus/latest/querying/api/#rules so it can be used as a drop-in replacement?
| State string `form:"state"` | ||
| } | ||
|
|
||
| type GetAlertsResponse struct { |
There was a problem hiding this comment.
this response should match the alerting API response: https://github.com/prometheus/alertmanager/blob/main/api/v2/openapi.yaml#L423
Signed-off-by: machadovilaca <machadovilaca@gmail.com>
Signed-off-by: alitman <alitman@alitman-thinkpadp1gen7.raanaii.csb> Signed-off-by: Aviv Litman <alitman@alitman-thinkpadp1gen7.raanaii.csb> Co-authored-by: Aviv Litman <alitman@alitman-thinkpadp1gen7.raanaii.csb>
Signed-off-by: alitman <alitman@alitman-thinkpadp1gen7.raanaii.csb> Co-authored-by: João Vilaça <machadovilaca@gmail.com>
Signed-off-by: Shirly Radco <sradco@redhat.com>
Signed-off-by: Shirly Radco <sradco@redhat.com>
Signed-off-by: alitman <alitman@alitman-thinkpadp1gen7.raanaii.csb> Co-authored-by: Aviv Litman <alitman@alitman-thinkpadp1gen7.raanaii.csb>
Signed-off-by: machadovilaca <machadovilaca@gmail.com>
Co-authored-by: Aviv Litman <alitman@alitman-thinkpadp1gen7.raanaii.csb>
Signed-off-by: machadovilaca <machadovilaca@gmail.com>
There was a problem hiding this comment.
you can't have GitHub actions on github.com/openshift
Signed-off-by: alitman <alitman@alitman-thinkpadp1gen7.raanaii.csb> Co-authored-by: Aviv Litman <alitman@alitman-thinkpadp1gen7.raanaii.csb>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Aviv Litman <alitman@redhat.com>
No description provided.