-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add ServiceMonitor for hub metrics (#242)
* Adds a ServiceMonitor to allow the in-cluster monitoring to scrape Hub metrics (requires an OpenShift cluster) * Adds a NetworkPolicy to expose the Hub's metrics port. * Adds RBAC roles to allow the operator to manage ServiceMonitors I'm not sure if there's a better way to test if the monitoring operator is available, or if there's a way to more tightly restrict the network policy. I'll need to backport this to release-0.2 once it is merged. Related to https://issues.redhat.com/projects/MTA/issues/MTA-402 Signed-off-by: Sam Lucidi <slucidi@redhat.com>
- Loading branch information
Showing
6 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ hub_service_name }} | ||
app.kubernetes.io/component: {{ hub_component_name }} | ||
app.kubernetes.io/part-of: {{ app_name }} | ||
name: {{ hub_service_name }} | ||
namespace: {{ app_namespace }} | ||
spec: | ||
endpoints: | ||
- interval: 30s | ||
port: metrics | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ hub_service_name }} | ||
app.kubernetes.io/component: {{ hub_component_name }} | ||
app.kubernetes.io/part-of: {{ app_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters