-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable operator metrics collection (#273)
* Enable operator metrics collection * Added operator metrics ssl and auth configuration
- Loading branch information
1 parent
84c7fe8
commit 4e15d42
Showing
16 changed files
with
154 additions
and
32 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
bundle/manifests/netobserv-metrics-monitor_monitoring.coreos.com_v1_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,19 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
control-plane: controller-manager | ||
name: netobserv-metrics-monitor | ||
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: netobserv-metrics-service.openshift-operators.svc | ||
selector: | ||
matchLabels: | ||
control-plane: controller-manager |
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,21 @@ | ||
# Prometheus Monitor Service (Metrics) | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
control-plane: controller-manager | ||
name: metrics-monitor | ||
namespace: system | ||
spec: | ||
endpoints: | ||
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
path: /metrics | ||
interval: 30s | ||
port: https | ||
scheme: https | ||
tlsConfig: | ||
caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt | ||
serverName: netobserv-metrics-service.openshift-operators.svc | ||
selector: | ||
matchLabels: | ||
control-plane: controller-manager |
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,27 @@ | ||
# Check that the 0 container is the expected one | ||
- op: test | ||
path: /spec/template/spec/containers/1/name | ||
value: kube-rbac-proxy | ||
|
||
- op: add | ||
path: "/spec/template/spec/volumes/-" | ||
value: | ||
name: manager-metric-tls | ||
secret: | ||
secretName: manager-metrics-tls | ||
defaultMode: 420 | ||
|
||
- op: add | ||
path: "/spec/template/spec/containers/1/volumeMounts" | ||
value: | ||
- name: manager-metric-tls | ||
readOnly: true | ||
mountPath: /etc/tls/private | ||
|
||
- op: add | ||
path: "/spec/template/spec/containers/1/args/-" | ||
value: '--tls-cert-file=/etc/tls/private/tls.crt' | ||
|
||
- op: add | ||
path: "/spec/template/spec/containers/1/args/-" | ||
value: '--tls-private-key-file=/etc/tls/private/tls.key' |
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,27 @@ | ||
# Check that the 0 container is the expected one | ||
- op: test | ||
path: /spec/template/spec/containers/1/name | ||
value: kube-rbac-proxy | ||
|
||
- op: add | ||
path: "/spec/template/spec/volumes/-" | ||
value: | ||
name: manager-metric-tls | ||
secret: | ||
secretName: manager-metrics-tls | ||
defaultMode: 420 | ||
|
||
- op: add | ||
path: "/spec/template/spec/containers/1/volumeMounts" | ||
value: | ||
- name: manager-metric-tls | ||
readOnly: true | ||
mountPath: /etc/tls/private | ||
|
||
- op: add | ||
path: "/spec/template/spec/containers/1/args/-" | ||
value: '--tls-cert-file=/etc/tls/private/tls.crt' | ||
|
||
- op: add | ||
path: "/spec/template/spec/containers/1/args/-" | ||
value: '--tls-private-key-file=/etc/tls/private/tls.key' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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