forked from Azure/ARO-RP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable cluster to read/emit ARO Operator metrics
- Loading branch information
Showing
10 changed files
with
154 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Original source from OSD/ROSA managed-cluster-config, see https://github.com/openshift/managed-cluster-config/blob/master/deploy/sre-prometheus/100-managed-upgrade-operator.PrometheusRule.yaml | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
labels: | ||
prometheus: aro-operator-alerts | ||
role: alert-rules | ||
name: aro-operator-alerts | ||
namespace: openshift-monitoring | ||
spec: | ||
groups: | ||
- name: aro-operator-alerts | ||
rules: | ||
- alert: AROServicePrincipalInvalid | ||
expr: arooperator_service_principal_valid == 0 | ||
for: 10m | ||
labels: | ||
severity: warning | ||
annotations: | ||
summary: Cluster Service Principal is invalid | ||
description: > | ||
Your cluster's service principal is invalid. | ||
Please refer to {TODO FIND DOCUMENTATION} in order to refresh your service principal. | ||
- alert: ARORequiredEndpointInaccessible | ||
expr: arooperator_required_endpoint_accessible == 0 | ||
for: 10m | ||
labels: | ||
severity: warning | ||
annotations: | ||
summary: Required endpoint {{$labels.endpoint_url}} is not accessible from {{$labels.role}} | ||
description: > | ||
The required endpoint {{$labels.endpoint_url}} is not accessible within your cluster's {{$labels.role}} nodes. | ||
If you are restricting egress traffic on your cluster, please refer to https://learn.microsoft.com/en-us/azure/openshift/howto-restrict-egress and ensure your networking configuration allows the cluster to access the specified endpoints. | ||
- alert: AROIngressCertificateInvalid | ||
expr: arooperator_ingress_certificate_valid == 0 | ||
for: 10m | ||
labels: | ||
severity: warning | ||
annotations: | ||
summary: Cluster ingress certificate is invalid | ||
description: > | ||
Your cluster's ingress certificate is expired, invalid, or missing. | ||
Please refer to {TODO FIND DOCUMENTATION} in order to provide a valid certificate. | ||
- alert: ARODNSConfigurationInvalid | ||
expr: arooperator_dns_configuration_valid == 0 | ||
for: 10m | ||
labels: | ||
severity: warning | ||
annotations: | ||
summary: Cluster DNS configuration is invalid | ||
description: > | ||
Your cluster's custom DNS configuration is invalid. | ||
Please refer to https://learn.microsoft.com/en-us/azure/openshift/howto-custom-dns in order to configure custom DNS for your cluster. |
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
17 changes: 17 additions & 0 deletions
17
pkg/operator/deploy/staticresources/master/metrics_service.yaml
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,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: aro-operator-master-metrics | ||
namespace: openshift-azure-operator | ||
labels: | ||
name: aro-operator | ||
role: master | ||
spec: | ||
selector: | ||
name: aro-operator | ||
role: master | ||
ports: | ||
- name: http-metrics | ||
port: 8383 | ||
targetPort: 8383 | ||
protocol: TCP |
17 changes: 17 additions & 0 deletions
17
pkg/operator/deploy/staticresources/master/servicemonitor.yaml
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,17 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: aro-operator-master-metrics | ||
namespace: openshift-azure-operator | ||
labels: | ||
name: aro-operator | ||
role: master | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: aro-operator | ||
role: master | ||
endpoints: | ||
- port: http-metrics | ||
scheme: http | ||
|
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,16 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: prometheus-k8s | ||
namespace: openshift-azure-operator | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- services | ||
- endpoints | ||
- pods | ||
verbs: | ||
- get | ||
- list | ||
- watch |
12 changes: 12 additions & 0 deletions
12
pkg/operator/deploy/staticresources/prometheus_rolebinding.yaml
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,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: prometheus-k8s | ||
namespace: openshift-azure-operator | ||
roleRef: | ||
kind: Role | ||
name: prometheus-k8s | ||
subjects: | ||
- kind: ServiceAccount | ||
name: prometheus-k8s | ||
namespace: openshift-monitoring |
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
17 changes: 17 additions & 0 deletions
17
pkg/operator/deploy/staticresources/worker/metrics_service.yaml
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,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: aro-operator-worker-metrics | ||
namespace: openshift-azure-operator | ||
labels: | ||
name: aro-operator | ||
role: worker | ||
spec: | ||
selector: | ||
name: aro-operator | ||
role: worker | ||
ports: | ||
- name: http-metrics | ||
port: 8383 | ||
targetPort: 8383 | ||
protocol: TCP |
16 changes: 16 additions & 0 deletions
16
pkg/operator/deploy/staticresources/worker/servicemonitor.yaml
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,16 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: aro-operator-worker-metrics | ||
namespace: openshift-azure-operator | ||
labels: | ||
name: aro-operator | ||
role: worker | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: aro-operator | ||
role: worker | ||
endpoints: | ||
- port: http-metrics | ||
scheme: http |