-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(metrics): add service monitor config
- Loading branch information
Jeff Peeler
committed
Jan 23, 2019
1 parent
85363e8
commit 581c8b5
Showing
2 changed files
with
103 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
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,102 @@ | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: olm-operator | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: olm-operator | ||
spec: | ||
jobLabel: k8s-app | ||
endpoints: | ||
- port: http-metrics | ||
interval: 30s | ||
scheme: http | ||
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
selector: | ||
matchLabels: | ||
app: olm-operator | ||
namespaceSelector: | ||
matchNames: {{ .Values.namespace }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: olm-operator | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: olm-operator | ||
spec: | ||
ports: | ||
- name: http-metrics | ||
port: 8081 | ||
protocol: TCP | ||
targetPort: http | ||
selector: | ||
app: olm-operator | ||
--- | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: catalog-operator | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: catalog-operator | ||
spec: | ||
jobLabel: k8s-app | ||
endpoints: | ||
- port: http-metrics | ||
interval: 30s | ||
scheme: http | ||
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
selector: | ||
matchLabels: | ||
app: catalog-operator | ||
namespaceSelector: | ||
matchNames: {{ .Values.namespace }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: catalog-operator | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
app: catalog-operator | ||
spec: | ||
ports: | ||
- name: http-metrics | ||
port: 8081 | ||
protocol: TCP | ||
targetPort: http | ||
selector: | ||
app: catalog-operator | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: operator-lifecycle-manager-metrics | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: operator-lifecycle-manager-metrics | ||
subjects: | ||
- kind: ServiceAccount | ||
name: prometheus-k8s | ||
namespace: {{ .Values.namespace }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: prometheus-k8s | ||
namespace: {{ .Values.namespace }} | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
- services | ||
- endpoints | ||
- pods | ||
verbs: | ||
- get | ||
- list | ||
- watch |