Skip to content

Commit 1a9f82c

Browse files
committed
Add fio-standalone Helm chart v0.1.0
1 parent cfa943e commit 1a9f82c

File tree

10 files changed

+227
-0
lines changed

10 files changed

+227
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,53 @@ Note: a single benchmark for FIO will take about 6 minutes to finish.
123123
124124
See [./deploy/fio.yaml](https://github.com/yasker/benchmark/blob/main/deploy/fio.yaml) for available options.
125125
126+
### Deploy Single Volume Benchmark via Helm
127+
128+
All defaults are the same as in the YAML installation method.
129+
Use the following steps to prep for installation:
130+
```bash
131+
# add helm repo
132+
helm repo add yasker-benchmark https://raw.githubusercontent.com/yasker/benchmark/main/helm
133+
134+
# create namespace for needed resources
135+
kubectl create ns fio-benchmarks
136+
```
137+
138+
To deploy with all defaults:
139+
```bash
140+
helm upgrade --install fio-benchmark-default \
141+
yasker-benchmark/fio-standalone \
142+
-n fio-benchmarks \
143+
--version v0.1.0
144+
```
145+
146+
To customize the installation, create a values.yaml or use `--set` flags:
147+
```bash
148+
# --set flags
149+
helm upgrade --install fio-benchmark-a \
150+
yasker-benchmark/fio-standalone \
151+
-n fio-benchmarks \
152+
--version v0.1.0 \
153+
--set pvc.size=11Gi \
154+
--set benchmark.size=10G
155+
156+
# values file
157+
cat <<EOF > fio-benchmark-b-values.yaml
158+
pvc:
159+
storageClassName: "local-path"
160+
size: "22Gi"
161+
volumeMode: "Block"
162+
benchmark:
163+
size: "20G"
164+
EOF
165+
166+
helm upgrade --install fio-benchmark-b \
167+
yasker-benchmark/fio-standalone \
168+
-n fio-benchmarks \
169+
--version v0.1.0 \
170+
-f ./fio-benchmark-b-values.yaml
171+
```
172+
126173
### Deploy Comparison Benchmark in Kubernetes cluster
127174

128175
1. Get a local copy of `fio-cmp.yaml`

helm/assets/fio-standalone-0.1.0.tgz

1.93 KB
Binary file not shown.
Lines changed: 23 additions & 0 deletions
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/
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v2
2+
name: fio-standalone
3+
description: Benchmark a single Kubernetes StorageClass
4+
type: application
5+
version: 0.1.0
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Benchmark against StorageClass {{ .Values.pvc.storageClassName }} is running!
2+
3+
Check the status of the Job to see when the benchmark is complete:
4+
kubectl get jobs -n {{ .Release.Namespace }}
5+
6+
View logs of the completed benchmark:
7+
kubectl logs -n {{ .Release.Namespace }} job/{{ include "fio-standalone.fullname" . }}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "fio-standalone.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 "fio-standalone.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 "fio-standalone.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "fio-standalone.labels" -}}
37+
helm.sh/chart: {{ include "fio-standalone.chart" . }}
38+
{{ include "fio-standalone.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 "fio-standalone.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "fio-standalone.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 "fio-standalone.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "fio-standalone.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: batch/v1
2+
kind: Job
3+
metadata:
4+
name: {{ include "fio-standalone.fullname" . }}
5+
spec:
6+
template:
7+
metadata:
8+
labels:
9+
benchmark: fio
10+
spec:
11+
containers:
12+
- name: benchmark
13+
image: {{ .Values.benchmark.image.repository }}:{{ .Values.benchmark.image.tag }}
14+
imagePullPolicy: {{ .Values.benchmark.image.pullPolicy }}
15+
env:
16+
{{- if .Values.benchmark.quickMode }}
17+
- name: QUICK_MODE # for debugging
18+
value: "1"
19+
{{- end }}
20+
- name: FILE_NAME
21+
value: "/volume/test"
22+
- name: SIZE
23+
value: "2G" # must be smaller or match the PVC size
24+
volumeMounts:
25+
- name: vol
26+
mountPath: /volume/
27+
imagePullSecrets: {{ .Values.benchmark.imagePullSecrets }}
28+
restartPolicy: Never
29+
volumes:
30+
- name: vol
31+
persistentVolumeClaim:
32+
claimName: {{ include "fio-standalone.fullname" . }}
33+
backoffLimit: 0
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
kind: PersistentVolumeClaim
2+
apiVersion: v1
3+
metadata:
4+
name: {{ include "fio-standalone.fullname" . }}
5+
spec:
6+
volumeMode: {{ .Values.pvc.volumeMode | quote }}
7+
{{- if .Values.pvc.storageClassName }}
8+
storageClassName: {{ .Values.pvc.storageClassName | quote }}
9+
{{- end }}
10+
accessModes:
11+
- ReadWriteOnce
12+
resources:
13+
requests:
14+
storage: {{ .Values.pvc.size | quote }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
pvc:
2+
# specify storage class to test;
3+
# "" will use the default StorageClass for the cluster
4+
storageClassName: ""
5+
# size of PVC; must be larger than benchmark.size
6+
# NOTE the format: 3Gi, 5Gi, etc.
7+
size: "3Gi"
8+
# mode for PVC - "Filesystem" or "Block"
9+
volumeMode: "Filesystem"
10+
11+
benchmark:
12+
# size of benchmark tests; must be smaller than pvc.size
13+
# NOTE the format: 2G, 4G, etc.
14+
size: "2G"
15+
image:
16+
repository: "yasker/benchmark"
17+
pullPolicy: "IfNotPresent"
18+
tag: "latest"
19+
imagePullSecrets: []
20+
quickMode: false
21+
22+
nameOverride: ""
23+
fullnameOverride: ""

helm/index.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
entries:
3+
fio-standalone:
4+
- apiVersion: v2
5+
created: "2021-07-23T02:12:49.792704-04:00"
6+
description: Benchmark a single Kubernetes StorageClass
7+
digest: f847c4e45bb4187810313a48e0ed4884eb1130c65cda9c165725ddedd25673fc
8+
name: fio-standalone
9+
type: application
10+
urls:
11+
- assets/fio-standalone-0.1.0.tgz
12+
version: 0.1.0
13+
generated: "2021-07-23T02:12:49.791916-04:00"

0 commit comments

Comments
 (0)