Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add disk usage prometheus metrics to jupyterhub-home-nfs deployment #8

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions helm/jupyterhub-home-nfs/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ spec:
metadata:
labels:
app: nfs-server
annotations:
{{- if .Values.prometheusExporter.enabled }}
prometheus.io/scrape: "true"
prometheus.io/port: "9100"
{{- end }}
spec:
containers:
- name: nfs-server
Expand All @@ -35,6 +40,22 @@ spec:
volumeMounts:
- name: home-directories
mountPath: /export
{{- if .Values.prometheusExporter.enabled }}
- name: metrics-exporter
image: "{{ .Values.prometheusExporter.image.repository }}:{{ .Values.prometheusExporter.image.tag }}"
args:
- --collector.disable-defaults
- --path.rootfs=/export
- --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here explaining why these are excluded?

- --collector.filesystem
ports:
- name: metrics
containerPort: 9100
volumeMounts:
- name: home-directories
mountPath: /export
readOnly: true
{{- end }}
volumes:
- name: home-directories
persistentVolumeClaim:
Expand Down
19 changes: 19 additions & 0 deletions helm/jupyterhub-home-nfs/values.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# NFS Ganesha configuration
# NFS Ganesha is the user space NFS server that we use to serve the home directories

nfsServer:
image:
repository: ghcr.io/2i2c-org/nfs-ganesha
tag: 0.0.6

# Quota enforcer configuration
# This container enforces the quota on the home directories

quotaEnforcer:
image:
repository: ghcr.io/2i2c-org/get-quota-your-home
Expand All @@ -11,7 +17,20 @@ quotaEnforcer:
# quota in GB
hardQuota: "10"

# Prometheus exporter configuration
# We export disk usage metrics using the Prometheus node exporter

prometheusExporter:
enabled: true
image:
repository: quay.io/prometheus/node-exporter
tag: v1.8.2

# Persistent volume configuration

persistentVolume:
# The size should match the pre-provisioned disk size
# The pre-provisioned disk ID is specified below in the cloud provider specific configuration
size: 10Gi
storageClass: ""
accessModes:
Expand Down
Loading