Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
manifests/0000_90_cluster-storage-operator_01_prometheusrbac.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,32 @@ | ||
# Role for accessing metrics exposed by the cluster-storage-operator | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: prometheus | ||
namespace: openshift-cluster-storage-operator | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- services | ||
- endpoints | ||
- pods | ||
verbs: | ||
- get | ||
- list | ||
- watch | ||
--- | ||
# Grant cluster-monitoring access to openshift-cluster-storage-operator metrics | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: prometheus | ||
namespace: openshift-cluster-storage-operator | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: prometheus | ||
subjects: | ||
- kind: ServiceAccount | ||
name: prometheus-k8s | ||
namespace: openshift-monitoring |
20 changes: 20 additions & 0 deletions
20
manifests/0000_90_cluster-storage-operator_02_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,20 @@ | ||
# Configure cluster-monitoring for cluster-storage-operator | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: cluster-storage-operator | ||
namespace: openshift-cluster-storage-operator | ||
spec: | ||
endpoints: | ||
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
interval: 30s | ||
path: /metrics | ||
port: https | ||
scheme: https | ||
tlsConfig: | ||
caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt | ||
serverName: metrics.openshift-cluster-storage-operator.svc | ||
jobLabel: component | ||
selector: | ||
matchLabels: | ||
name: cluster-storage-operator |
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,23 @@ | ||
# Expose operator metrics | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
include.release.openshift.io/ibm-cloud-managed: "true" | ||
include.release.openshift.io/self-managed-high-availability: "true" | ||
include.release.openshift.io/single-node-developer: "true" | ||
service.alpha.openshift.io/serving-cert-secret-name: serving-cert | ||
labels: | ||
app: cluster-storage-operator | ||
name: metrics | ||
namespace: openshift-cluster-storage-operator | ||
spec: | ||
ports: | ||
- name: https | ||
port: 443 | ||
protocol: TCP | ||
targetPort: 8443 | ||
selector: | ||
name: cluster-storage-operator | ||
sessionAffinity: None | ||
type: ClusterIP |
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
File renamed without changes.