Skip to content

Instantly share code, notes, and snippets.

@cheethoe
Created August 17, 2018 21:58
Show Gist options
  • Save cheethoe/40b1f2d783a7a0b84e8891dccf8b6478 to your computer and use it in GitHub Desktop.
Save cheethoe/40b1f2d783a7a0b84e8891dccf8b6478 to your computer and use it in GitHub Desktop.
Ceph exporter pod for use with rook-ceph cluster
apiVersion: v1
kind: Pod
metadata:
name: ceph-exporter
namespace: rook-ceph
labels:
app: ceph-exporter
spec:
dnsPolicy: ClusterFirstWithHostNet
containers:
- name: rook-ceph-tools
image: rook/ceph-toolbox:master
imagePullPolicy: IfNotPresent
env:
- name: ROOK_ADMIN_SECRET
valueFrom:
secretKeyRef:
name: rook-ceph-mon
key: admin-secret
volumeMounts:
- mountPath: /lib/modules
name: libmodules
- name: mon-endpoint-volume
mountPath: /etc/rook
- name: etc-ceph-shared
mountPath: /etc/ceph
- name: ceph-exporter
image: digitalocean/ceph_exporter:latest
imagePullPolicy: IfNotPresent
env:
- name: ROOK_ADMIN_SECRET
valueFrom:
secretKeyRef:
name: rook-ceph-mon
key: admin-secret
ports:
- containerPort: 9128
name: http-metrics
protocol: TCP
volumeMounts:
- name: etc-ceph-shared
mountPath: /etc/ceph
hostNetwork: true
volumes:
- name: libmodules
hostPath:
path: /lib/modules
- name: mon-endpoint-volume
configMap:
name: rook-ceph-mon-endpoints
items:
- key: data
path: mon-endpoints
- name: etc-ceph-shared
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
labels:
app: ceph-exporter
name: ceph-exporter
namespace: rook-ceph
spec:
ports:
- name: http-metrics
port: 9128
protocol: TCP
targetPort: 9128
selector:
app: ceph-exporter
type: ClusterIP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment