Skip to content

Commit 2bbf4ea

Browse files
committed
Release nvidia-gpu-exporter chart version 0.1.0
1 parent 82bd411 commit 2bbf4ea

15 files changed

+598
-1
lines changed

docs/index.yaml

+35-1
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,40 @@ entries:
682682
urls:
683683
- https://utkuozdemir.org/helm-charts/jellyfin-1.0.0.tgz
684684
version: 1.0.0
685+
nvidia-gpu-exporter:
686+
- annotations:
687+
artifacthub.io/changes: |
688+
- Initial release of the chart
689+
artifacthub.io/images: |
690+
- name: utkuozdemir/nvidia_gpu_exporter
691+
image: docker.io/utkuozdemir/nvidia_gpu_exporter:0.1.5
692+
artifacthub.io/license: MIT
693+
apiVersion: v2
694+
appVersion: 0.1.5
695+
created: "2021-06-20T23:11:56.368443+02:00"
696+
description: Nvidia GPU exporter for prometheus using `nvidia-smi` binary to gather
697+
metrics.
698+
digest: 4d694e011dbe7f0bd38a91fb3d109f279fbdfdbb1977d4bac70dfac27c61e1b4
699+
home: https://github.com/utkuozdemir/nvidia_gpu_exporter
700+
icon: https://utkuozdemir.org/helm-charts/nvidia.png
701+
keywords:
702+
- nvidia
703+
- gpu
704+
- exporter
705+
- nvidia-smi
706+
- nvidia-gpu-exporter
707+
- prometheus
708+
maintainers:
709+
710+
name: Utku Özdemir
711+
url: https://utkuozdemir.org
712+
name: nvidia-gpu-exporter
713+
sources:
714+
- https://github.com/utkuozdemir/helm-charts
715+
type: application
716+
urls:
717+
- https://utkuozdemir.org/helm-charts/nvidia-gpu-exporter-0.1.0.tgz
718+
version: 0.1.0
685719
plex:
686720
- annotations:
687721
artifacthub.io/changes: |
@@ -1112,4 +1146,4 @@ entries:
11121146
urls:
11131147
- https://utkuozdemir.org/helm-charts/transmission-openvpn-0.1.0.tgz
11141148
version: 0.1.0
1115-
generated: "2021-06-20T22:18:39.814554+02:00"
1149+
generated: "2021-06-20T23:11:56.367123+02:00"

docs/nvidia-gpu-exporter-0.1.0.tgz

5.11 KB
Binary file not shown.

docs/nvidia.png

271 KB
Loading

nvidia-gpu-exporter/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

nvidia-gpu-exporter/Chart.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apiVersion: v2
2+
name: nvidia-gpu-exporter
3+
description: Nvidia GPU exporter for prometheus using `nvidia-smi` binary to gather metrics.
4+
type: application
5+
version: 0.1.0
6+
appVersion: 0.1.5
7+
home: https://github.com/utkuozdemir/nvidia_gpu_exporter
8+
keywords:
9+
- nvidia
10+
- gpu
11+
- exporter
12+
- nvidia-smi
13+
- nvidia-gpu-exporter
14+
- prometheus
15+
sources:
16+
- https://github.com/utkuozdemir/helm-charts
17+
icon: https://utkuozdemir.org/helm-charts/nvidia.png
18+
maintainers:
19+
- name: Utku Özdemir
20+
21+
url: https://utkuozdemir.org
22+
annotations:
23+
artifacthub.io/license: MIT
24+
artifacthub.io/changes: |
25+
- Initial release of the chart
26+
artifacthub.io/images: |
27+
- name: utkuozdemir/nvidia_gpu_exporter
28+
image: docker.io/utkuozdemir/nvidia_gpu_exporter:0.1.5

nvidia-gpu-exporter/README.md

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# nvidia-gpu-exporter
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.5](https://img.shields.io/badge/AppVersion-0.1.5-informational?style=flat-square)
4+
5+
Nvidia GPU exporter for prometheus using `nvidia-smi` binary to gather metrics.
6+
7+
**Homepage:** <https://github.com/utkuozdemir/nvidia_gpu_exporter>
8+
9+
## Maintainers
10+
11+
| Name | Email | Url |
12+
| ---- | ------ | --- |
13+
| Utku Özdemir | [email protected] | https://utkuozdemir.org |
14+
15+
## Source Code
16+
17+
* <https://github.com/utkuozdemir/helm-charts>
18+
19+
## Values
20+
21+
| Key | Type | Default | Description |
22+
|-----|------|---------|-------------|
23+
| affinity | object | `{}` | |
24+
| fullnameOverride | string | `""` | |
25+
| image.pullPolicy | string | `"IfNotPresent"` | |
26+
| image.repository | string | `"docker.io/utkuozdemir/nvidia_gpu_exporter"` | |
27+
| image.tag | string | `""` | |
28+
| imagePullSecrets | list | `[]` | |
29+
| ingress.annotations | object | `{}` | |
30+
| ingress.className | string | `""` | |
31+
| ingress.enabled | bool | `false` | |
32+
| ingress.hosts[0].host | string | `"chart-example.local"` | |
33+
| ingress.hosts[0].paths[0].path | string | `"/"` | |
34+
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
35+
| ingress.tls | list | `[]` | |
36+
| log.format | string | `"logfmt"` | |
37+
| log.level | string | `"info"` | |
38+
| nameOverride | string | `""` | |
39+
| nodeSelector | object | `{}` | |
40+
| nvidiaGpuDevices[0] | string | `"/dev/nvidia0"` | |
41+
| nvidiaSmiCommand | string | `"nvidia-smi"` | |
42+
| nvidiaSmiHostPath | string | `"/usr/bin/nvidia-smi"` | |
43+
| podAnnotations | object | `{}` | |
44+
| podSecurityContext | object | `{}` | |
45+
| port | int | `9835` | |
46+
| queryFieldNames[0] | string | `"AUTO"` | |
47+
| resources | object | `{}` | |
48+
| securityContext.privileged | bool | `true` | |
49+
| service.port | int | `9835` | |
50+
| service.type | string | `"ClusterIP"` | |
51+
| serviceAccount.annotations | object | `{}` | |
52+
| serviceAccount.create | bool | `true` | |
53+
| serviceAccount.name | string | `""` | |
54+
| serviceMonitor.additionalLabels | object | `{}` | |
55+
| serviceMonitor.bearerTokenFile | string | `nil` | |
56+
| serviceMonitor.enabled | bool | `false` | |
57+
| serviceMonitor.proxyUrl | string | `""` | |
58+
| serviceMonitor.relabelings | list | `[]` | |
59+
| serviceMonitor.scheme | string | `"http"` | |
60+
| serviceMonitor.scrapeTimeout | string | `"10s"` | |
61+
| serviceMonitor.tlsConfig | object | `{}` | |
62+
| telemetryPath | string | `"/metrics"` | |
63+
| tolerations | list | `[]` | |
64+
| volumeMounts[0].mountPath | string | `"/dev/nvidiactl"` | |
65+
| volumeMounts[0].name | string | `"nvidiactl"` | |
66+
| volumeMounts[1].mountPath | string | `"/dev/nvidia0"` | |
67+
| volumeMounts[1].name | string | `"nvidia0"` | |
68+
| volumeMounts[2].mountPath | string | `"/usr/bin/nvidia-smi"` | |
69+
| volumeMounts[2].name | string | `"nvidia-smi"` | |
70+
| volumeMounts[3].mountPath | string | `"/usr/lib/x86_64-linux-gnu/libnvidia-ml.so"` | |
71+
| volumeMounts[3].name | string | `"libnvidia-ml-so"` | |
72+
| volumeMounts[4].mountPath | string | `"/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1"` | |
73+
| volumeMounts[4].name | string | `"libnvidia-ml-so-1"` | |
74+
| volumes[0].hostPath.path | string | `"/dev/nvidiactl"` | |
75+
| volumes[0].name | string | `"nvidiactl"` | |
76+
| volumes[1].hostPath.path | string | `"/dev/nvidia0"` | |
77+
| volumes[1].name | string | `"nvidia0"` | |
78+
| volumes[2].hostPath.path | string | `"/usr/bin/nvidia-smi"` | |
79+
| volumes[2].name | string | `"nvidia-smi"` | |
80+
| volumes[3].hostPath.path | string | `"/usr/lib/x86_64-linux-gnu/libnvidia-ml.so"` | |
81+
| volumes[3].name | string | `"libnvidia-ml-so"` | |
82+
| volumes[4].hostPath.path | string | `"/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1"` | |
83+
| volumes[4].name | string | `"libnvidia-ml-so-1"` | |
84+
85+
----------------------------------------------
86+
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
1. Get the application URL by running these commands:
2+
{{- if .Values.ingress.enabled }}
3+
{{- range $host := .Values.ingress.hosts }}
4+
{{- range .paths }}
5+
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
6+
{{- end }}
7+
{{- end }}
8+
{{- else if contains "NodePort" .Values.service.type }}
9+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "nvidia-gpu-exporter.fullname" . }})
10+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
11+
echo http://$NODE_IP:$NODE_PORT
12+
{{- else if contains "LoadBalancer" .Values.service.type }}
13+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
14+
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "nvidia-gpu-exporter.fullname" . }}'
15+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "nvidia-gpu-exporter.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
16+
echo http://$SERVICE_IP:{{ .Values.service.port }}
17+
{{- else if contains "ClusterIP" .Values.service.type }}
18+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "nvidia-gpu-exporter.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
19+
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
20+
echo "Visit http://127.0.0.1:8080 to use your application"
21+
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
22+
{{- end }}
+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "nvidia-gpu-exporter.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "nvidia-gpu-exporter.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "nvidia-gpu-exporter.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "nvidia-gpu-exporter.labels" -}}
37+
helm.sh/chart: {{ include "nvidia-gpu-exporter.chart" . }}
38+
{{ include "nvidia-gpu-exporter.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "nvidia-gpu-exporter.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "nvidia-gpu-exporter.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "nvidia-gpu-exporter.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "nvidia-gpu-exporter.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
apiVersion: apps/v1
2+
kind: DaemonSet
3+
metadata:
4+
name: {{ include "nvidia-gpu-exporter.fullname" . }}
5+
labels:
6+
{{- include "nvidia-gpu-exporter.labels" . | nindent 4 }}
7+
spec:
8+
selector:
9+
matchLabels:
10+
{{- include "nvidia-gpu-exporter.selectorLabels" . | nindent 6 }}
11+
template:
12+
metadata:
13+
{{- with .Values.podAnnotations }}
14+
annotations:
15+
{{- toYaml . | nindent 8 }}
16+
{{- end }}
17+
labels:
18+
{{- include "nvidia-gpu-exporter.selectorLabels" . | nindent 8 }}
19+
spec:
20+
{{- with .Values.imagePullSecrets }}
21+
imagePullSecrets:
22+
{{- toYaml . | nindent 8 }}
23+
{{- end }}
24+
serviceAccountName: {{ include "nvidia-gpu-exporter.serviceAccountName" . }}
25+
securityContext:
26+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
27+
containers:
28+
- name: {{ .Chart.Name }}
29+
securityContext:
30+
{{- toYaml .Values.securityContext | nindent 12 }}
31+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
32+
imagePullPolicy: {{ .Values.image.pullPolicy }}
33+
args:
34+
- --web.listen-address
35+
- :{{ .Values.port }}
36+
- --web.telemetry-path
37+
- {{ .Values.telemetryPath }}
38+
- --nvidia-smi-command
39+
- {{ .Values.nvidiaSmiCommand }}
40+
- --query-field-names
41+
- {{ join "," .Values.queryFieldNames }}
42+
- --log.level
43+
- {{ .Values.log.level }}
44+
- --log.format
45+
- {{ .Values.log.format }}
46+
ports:
47+
- name: http
48+
containerPort: {{ .Values.port }}
49+
protocol: TCP
50+
livenessProbe:
51+
httpGet:
52+
path: /
53+
port: http
54+
readinessProbe:
55+
httpGet:
56+
path: /
57+
port: http
58+
volumeMounts:
59+
{{- toYaml .Values.volumeMounts | nindent 12 }}
60+
resources:
61+
{{- toYaml .Values.resources | nindent 12 }}
62+
volumes:
63+
{{- toYaml .Values.volumes | nindent 8 }}
64+
{{- with .Values.nodeSelector }}
65+
nodeSelector:
66+
{{- toYaml . | nindent 8 }}
67+
{{- end }}
68+
{{- with .Values.affinity }}
69+
affinity:
70+
{{- toYaml . | nindent 8 }}
71+
{{- end }}
72+
{{- with .Values.tolerations }}
73+
tolerations:
74+
{{- toYaml . | nindent 8 }}
75+
{{- end }}

0 commit comments

Comments
 (0)