Skip to content

Commit

Permalink
Kontena Storage: add ceph-prom-exporter (#1407)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnummelin authored and jakolehm committed Jun 14, 2019
1 parent a9c754c commit fd9c6ce
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: ceph-prom-exporter
namespace: kontena-storage
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: ceph-prom-exporter
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs:
- get
- apiGroups: [""]
resources: ["pods"]
verbs:
- get
- list
- apiGroups: [""]
resources: ["pods/exec"]
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: ceph-prom-exporter
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: ceph-prom-exporter
subjects:
- name: ceph-prom-exporter
namespace: kontena-storage
kind: ServiceAccount
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ceph-prom-exporter
namespace: kontena-storage
spec:
replicas: 1
selector:
matchLabels:
app: ceph-prom-exporter
template:
metadata:
labels:
app: ceph-prom-exporter
annotations:
prometheus.io/path: "/metrics"
prometheus.io/scrape: 'true'
prometheus.io/port: '9292'
spec:
serviceAccountName: ceph-prom-exporter
containers:
- name: ceph-prom-exporter
image: "<%= image_repository %>/ceph-prom-exporter:0.1.0"
ports:
- containerPort: 9292
resources:
requests:
cpu: 100m
memory: 100M
limits:
cpu: 200m
memory: 100M

0 comments on commit fd9c6ce

Please sign in to comment.