From 217bef582ef556e122a1eea5e4ac5b627ea4e3c1 Mon Sep 17 00:00:00 2001 From: Matt Nikkel Date: Fri, 23 Jul 2021 02:15:42 -0400 Subject: [PATCH 1/4] Add gitignore for common IDE files --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..674e83f --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +.DS_Store + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? From 049e639daf6c68c40438867dbe9ec67b94458abe Mon Sep 17 00:00:00 2001 From: Matt Nikkel Date: Fri, 23 Jul 2021 02:17:29 -0400 Subject: [PATCH 2/4] Add fio-standalone Helm chart v0.1.0 --- README.md | 49 +++++++++++++- helm/assets/fio-standalone-0.1.0.tgz | Bin 0 -> 1978 bytes helm/charts/fio-standalone/0.1.0/.helmignore | 23 +++++++ helm/charts/fio-standalone/0.1.0/Chart.yaml | 5 ++ .../fio-standalone/0.1.0/templates/NOTES.txt | 7 ++ .../0.1.0/templates/_helpers.tpl | 62 ++++++++++++++++++ .../fio-standalone/0.1.0/templates/job.yaml | 33 ++++++++++ .../templates/persistent-volume-claim.yaml | 14 ++++ helm/charts/fio-standalone/0.1.0/values.yaml | 23 +++++++ helm/index.yaml | 13 ++++ 10 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 helm/assets/fio-standalone-0.1.0.tgz create mode 100644 helm/charts/fio-standalone/0.1.0/.helmignore create mode 100644 helm/charts/fio-standalone/0.1.0/Chart.yaml create mode 100644 helm/charts/fio-standalone/0.1.0/templates/NOTES.txt create mode 100644 helm/charts/fio-standalone/0.1.0/templates/_helpers.tpl create mode 100644 helm/charts/fio-standalone/0.1.0/templates/job.yaml create mode 100644 helm/charts/fio-standalone/0.1.0/templates/persistent-volume-claim.yaml create mode 100644 helm/charts/fio-standalone/0.1.0/values.yaml create mode 100644 helm/index.yaml diff --git a/README.md b/README.md index a81cce0..9f03b80 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,54 @@ Note: a single benchmark for FIO will take about 6 minutes to finish. See [./deploy/fio.yaml](https://github.com/yasker/kbench/blob/main/deploy/fio.yaml) for available options. -#### Deploy Comparison Benchmark in Kubernetes cluster +### Deploy Single Volume Benchmark via Helm + +All defaults are the same as in the YAML installation method. +Use the following steps to prep for installation: +```bash +# add helm repo +helm repo add yasker-kbench https://raw.githubusercontent.com/yasker/kbench/main/helm + +# create namespace for needed resources +kubectl create ns fio-benchmarks +``` + +To deploy with all defaults: +```bash +helm upgrade --install fio-benchmark-default \ + yasker-kbench/fio-standalone \ + -n fio-benchmarks \ + --version v0.1.0 +``` + +To customize the installation, create a values.yaml or use `--set` flags: +```bash +# --set flags +helm upgrade --install fio-benchmark-a \ + yasker-kbench/fio-standalone \ + -n fio-benchmarks \ + --version v0.1.0 \ + --set pvc.size=11Gi \ + --set benchmark.size=10G + +# values file +cat < fio-benchmark-b-values.yaml +pvc: + storageClassName: "local-path" + size: "22Gi" + volumeMode: "Block" +benchmark: + size: "20G" +EOF + +helm upgrade --install fio-benchmark-b \ + yasker-kbench/fio-standalone \ + -n fio-benchmarks \ + --version v0.1.0 \ + -f ./fio-benchmark-b-values.yaml +``` + +### Deploy Comparison Benchmark in Kubernetes cluster 1. Get a local copy of `fio-cmp.yaml` ``` diff --git a/helm/assets/fio-standalone-0.1.0.tgz b/helm/assets/fio-standalone-0.1.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..4c4a44c1afb029742aab3378199e128faabfba73 GIT binary patch literal 1978 zcmV;r2SxZFiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PI>{Z`(K$&oe*8ta1yqxmvbkCjqp$hi;k;a@!`k^}W$pM7b2$J)Tfy{5ehe z&eKt^*Xtb)hwiu6>$QJ-{iB1O{;+p+I6OE!I_mB8`on(zXa{;vXv12{wV`UK_uabM z&i$Vd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e|&MZ4fi*nkzw;%A5jKqf4hWt?pXCscLA=bL^t1=-&B@(i+^| z1rIP9npn45vM(EDw+A{es&mUSP|SkHBR~rz7jo*#+_Hd$`~Udo+3~N}A1>aV0PMPo zXN2QCNtj5M_yJs%KLD@qt*9=c?LPUxoV`D}K7ae+WR0|LQ9$ih6~%4#J z!R|@{RVqmBqIA2_<<&8ih19xtS+dQA(ZRhcXOg!xrk4AXnn?ha#iTW#bxCyngf`d~ zThpr@qb}Sr?9=_6#tn$VN?C@u-C%>{r=(LaEt%XK?T%b-nZDIV4<;i*1^Tb`w8L5!$LRq)CIvzp9 zlqP<{OxIlt^NBzHqPp%{HB6GOy;P5SCb|njc4y2ph#5ys_I!Plkv)G*r)1AJslAtq zC1mfvWEZZeVlvlo_U=RzKU4A}hKBeoLfS3ZmHbHjnGR)y-ItE-Ep2H_TY8B87XSeN M|F?TO_W&vY0GfE%j{pDw literal 0 HcmV?d00001 diff --git a/helm/charts/fio-standalone/0.1.0/.helmignore b/helm/charts/fio-standalone/0.1.0/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/helm/charts/fio-standalone/0.1.0/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm/charts/fio-standalone/0.1.0/Chart.yaml b/helm/charts/fio-standalone/0.1.0/Chart.yaml new file mode 100644 index 0000000..260209d --- /dev/null +++ b/helm/charts/fio-standalone/0.1.0/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: fio-standalone +description: Benchmark a single Kubernetes StorageClass +type: application +version: 0.1.0 diff --git a/helm/charts/fio-standalone/0.1.0/templates/NOTES.txt b/helm/charts/fio-standalone/0.1.0/templates/NOTES.txt new file mode 100644 index 0000000..cfeba44 --- /dev/null +++ b/helm/charts/fio-standalone/0.1.0/templates/NOTES.txt @@ -0,0 +1,7 @@ +Benchmark against StorageClass {{ .Values.pvc.storageClassName }} is running! + +Check the status of the Job to see when the benchmark is complete: +kubectl get jobs -n {{ .Release.Namespace }} + +View logs of the completed benchmark: +kubectl logs -n {{ .Release.Namespace }} job/{{ include "fio-standalone.fullname" . }} diff --git a/helm/charts/fio-standalone/0.1.0/templates/_helpers.tpl b/helm/charts/fio-standalone/0.1.0/templates/_helpers.tpl new file mode 100644 index 0000000..a584a6e --- /dev/null +++ b/helm/charts/fio-standalone/0.1.0/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "fio-standalone.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "fio-standalone.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "fio-standalone.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "fio-standalone.labels" -}} +helm.sh/chart: {{ include "fio-standalone.chart" . }} +{{ include "fio-standalone.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "fio-standalone.selectorLabels" -}} +app.kubernetes.io/name: {{ include "fio-standalone.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "fio-standalone.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "fio-standalone.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/helm/charts/fio-standalone/0.1.0/templates/job.yaml b/helm/charts/fio-standalone/0.1.0/templates/job.yaml new file mode 100644 index 0000000..2b00c92 --- /dev/null +++ b/helm/charts/fio-standalone/0.1.0/templates/job.yaml @@ -0,0 +1,33 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "fio-standalone.fullname" . }} +spec: + template: + metadata: + labels: + benchmark: fio + spec: + containers: + - name: benchmark + image: {{ .Values.benchmark.image.repository }}:{{ .Values.benchmark.image.tag }} + imagePullPolicy: {{ .Values.benchmark.image.pullPolicy }} + env: + {{- if .Values.benchmark.quickMode }} + - name: QUICK_MODE # for debugging + value: "1" + {{- end }} + - name: FILE_NAME + value: "/volume/test" + - name: SIZE + value: "2G" # must be smaller or match the PVC size + volumeMounts: + - name: vol + mountPath: /volume/ + imagePullSecrets: {{ .Values.benchmark.imagePullSecrets }} + restartPolicy: Never + volumes: + - name: vol + persistentVolumeClaim: + claimName: {{ include "fio-standalone.fullname" . }} + backoffLimit: 0 diff --git a/helm/charts/fio-standalone/0.1.0/templates/persistent-volume-claim.yaml b/helm/charts/fio-standalone/0.1.0/templates/persistent-volume-claim.yaml new file mode 100644 index 0000000..9c63fb0 --- /dev/null +++ b/helm/charts/fio-standalone/0.1.0/templates/persistent-volume-claim.yaml @@ -0,0 +1,14 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ include "fio-standalone.fullname" . }} +spec: + volumeMode: {{ .Values.pvc.volumeMode | quote }} + {{- if .Values.pvc.storageClassName }} + storageClassName: {{ .Values.pvc.storageClassName | quote }} + {{- end }} + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.pvc.size | quote }} diff --git a/helm/charts/fio-standalone/0.1.0/values.yaml b/helm/charts/fio-standalone/0.1.0/values.yaml new file mode 100644 index 0000000..3a77435 --- /dev/null +++ b/helm/charts/fio-standalone/0.1.0/values.yaml @@ -0,0 +1,23 @@ +pvc: + # specify storage class to test; + # "" will use the default StorageClass for the cluster + storageClassName: "" + # size of PVC; must be larger than benchmark.size + # NOTE the format: 3Gi, 5Gi, etc. + size: "3Gi" + # mode for PVC - "Filesystem" or "Block" + volumeMode: "Filesystem" + +benchmark: + # size of benchmark tests; must be smaller than pvc.size + # NOTE the format: 2G, 4G, etc. + size: "2G" + image: + repository: "yasker/benchmark" + pullPolicy: "IfNotPresent" + tag: "latest" + imagePullSecrets: [] + quickMode: false + +nameOverride: "" +fullnameOverride: "" diff --git a/helm/index.yaml b/helm/index.yaml new file mode 100644 index 0000000..c0534b5 --- /dev/null +++ b/helm/index.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +entries: + fio-standalone: + - apiVersion: v2 + created: "2021-07-23T02:12:49.792704-04:00" + description: Benchmark a single Kubernetes StorageClass + digest: f847c4e45bb4187810313a48e0ed4884eb1130c65cda9c165725ddedd25673fc + name: fio-standalone + type: application + urls: + - assets/fio-standalone-0.1.0.tgz + version: 0.1.0 +generated: "2021-07-23T02:12:49.791916-04:00" From ff549fe3f0748fa57b7f36cdfa45b9b606dd9f15 Mon Sep 17 00:00:00 2001 From: Matt Nikkel Date: Tue, 3 Aug 2021 13:45:22 -0400 Subject: [PATCH 3/4] Rename repository in Helm templates, update defaults --- helm/assets/fio-standalone-0.1.0.tgz | Bin 1978 -> 1979 bytes helm/charts/fio-standalone/0.1.0/values.yaml | 10 +++++----- helm/index.yaml | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/helm/assets/fio-standalone-0.1.0.tgz b/helm/assets/fio-standalone-0.1.0.tgz index 4c4a44c1afb029742aab3378199e128faabfba73..b5ef701e744353676b889e3446dd72c7d36d603e 100644 GIT binary patch delta 1893 zcmV-r2b%c054#VLOA3|~Ck3>)hi;lJkyRvr!I8+}{2@6%4o69t>}f+qOt}=;Kb}x! z{5j3|&f`%K1i{g8=>7&l(ES?>ULWoZhJ#@LAPDw{`#Zs47#tn!K=6n*tffL5s&<0! z*41_H|Ac7HE>USFMF_Kf5~Ge3%Z+>g8AUY7sG0%=%|yx(el5nR1RB&ZGE&hLk2%$U znh2U<2+Ny^n0byN&^+fXqE;lC)v5x2;0NTno!`<0-k&SCG5)5kdlVkBbxMrL~p%KgkA;yFj+$%Zzi1-gDr8@*65CTM%4F;YSWVCa?-#~V&$YqK1F69KnagNuS!a?L z8Gewl9pB<2q%kF2GQDYb)1((}=!|k+`;pJ0`#cEVy@H|r>DV86! zHsycAmHhAU@O7}o|EHi z$eoeL3aLS$jRqTxbNEz$P|gyDvAt+I^L_FMma-kcu^Ox^8paq=o4jh7EnQ`u(+NW! zYoH2&vy52;vDxp0X?QW7y9s%FHnO}-q%K{4>66n0REZ;{kVpz+VYHmPvW=NCZ62e| zoMWIGs58E@cGLVWK&PH#mNZk^&BW@dTigGTY3I6;^B3nr__v3Duj|6bW->}4ONiUp zxzzZL#^s6$lYsZ5?)|8}j;vDY!*|);k4t;6wWu~;s%nN^P`9wvE-AS<9V6eoxQ={m@#Q>@D&rqIlU-+fcUn?b)b5$HRvxlC+GcW8L>R85I`{4G z?g5}HuW1y?LKusOg~kUs=!U&1N1d&Mu4OhqDsAW-BQG9*kcz!rCsMTiZQ({O+^ZhE z2MJighUY%JAA{EBe;?)evC4p(>VL0a4_5Dghui$`DX3llA5#-e`m+I(&MdldicIWU0z2P_>5iD$|;wO;24t zYu{rRMMc+t=P!zCaC;lx!)Rz~-Rj7`Xw}^A8N4XXEz3YL3tO)M9gtkeY07fT0v7K7 z&l%mj*B#9B3>g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ji;>mh9?W7W{DegBwY=em~j7w1Cox5v+a>%zu*FbW|{h+Esa z)cB3YWr_(CgZHEE{HVQ_tU~GISK0lyOKYz&sWx89YKEOqH?id^DY!TtBi}r^j(IV& zZI7CRUEG(|8u)6@1l(?0-d{cNuDx#$D4C{G6o%@Jh8Apvr4!_-uP0q+d;kw@n5BDu zVZd58jT}QG)%#L^iQia7rQdI}taAPCj?gUgr*#1POm^$ilHJ=^x_pICxir`shgB&l z6*R%9GoA-aNx}%#jD_v~#W;>i;~zVcZD%|8T2fTh9vHJm9kFw#z#2ly1gxWov(wgWi~%7Y-nvGuO5+qioISZQZ)T-;6^3fD{s6< z30T2~m)^Udg4X7LALaO|%7B~de@93CmGj@Azs>)igPQgKF*V_&JL{7v6H#E#Y$QcP zBWh?s05&30>vUvOB-^iAQ$;1KDbZ2^n$;6DPHhk~>6$A+mdcz0RijI%G_CGhzo}|y z&2#LcsOa8*`HRvT+}#BaFdCXzw_36<8)df#Ixnho%Q8^Rg2p323nUkE>dM@*fQ9@2 z_~+U2uh$E}`u{`M;dKKe;}C`{87bv~E#A z?N$}WRSBcBf354hf9k>RN&!_WNbRC@yV2#Ll$T=ijj*D%Y ziR29^_S<$xH=v|#FQp}!c5m)3-gIT{-V0>S~X0PuDw)`dM3IHL3U@%Gl&^a zM@{y8eUp(re@v%j&o`;Pmx?81@4sXhuBc)%*KqdkL=!(#@*{?Z_$)%&E!dU(Nc@=& eWrW?Aj_oaNX-ivri2fG<0RR8Ddph?3DgXcqdbXDU diff --git a/helm/charts/fio-standalone/0.1.0/values.yaml b/helm/charts/fio-standalone/0.1.0/values.yaml index 3a77435..697adcd 100644 --- a/helm/charts/fio-standalone/0.1.0/values.yaml +++ b/helm/charts/fio-standalone/0.1.0/values.yaml @@ -3,17 +3,17 @@ pvc: # "" will use the default StorageClass for the cluster storageClassName: "" # size of PVC; must be larger than benchmark.size - # NOTE the format: 3Gi, 5Gi, etc. - size: "3Gi" + # NOTE the format: 33Gi, 45Gi, etc. + size: "33Gi" # mode for PVC - "Filesystem" or "Block" volumeMode: "Filesystem" benchmark: # size of benchmark tests; must be smaller than pvc.size - # NOTE the format: 2G, 4G, etc. - size: "2G" + # NOTE the format: 30G, 40G, etc. + size: "30G" image: - repository: "yasker/benchmark" + repository: "yasker/kbench" pullPolicy: "IfNotPresent" tag: "latest" imagePullSecrets: [] diff --git a/helm/index.yaml b/helm/index.yaml index c0534b5..92539d4 100644 --- a/helm/index.yaml +++ b/helm/index.yaml @@ -2,12 +2,12 @@ apiVersion: v1 entries: fio-standalone: - apiVersion: v2 - created: "2021-07-23T02:12:49.792704-04:00" + created: "2021-08-03T13:45:12.148698-04:00" description: Benchmark a single Kubernetes StorageClass - digest: f847c4e45bb4187810313a48e0ed4884eb1130c65cda9c165725ddedd25673fc + digest: b6fd382c9f4706537a003af34bdc91f935fc3c485ee290dbf299124bb58965ec name: fio-standalone type: application urls: - assets/fio-standalone-0.1.0.tgz version: 0.1.0 -generated: "2021-07-23T02:12:49.791916-04:00" +generated: "2021-08-03T13:45:12.148104-04:00" From 952e769065a47fea52077307ccfb1446c4005e85 Mon Sep 17 00:00:00 2001 From: Matt Nikkel Date: Tue, 3 Aug 2021 16:50:36 -0400 Subject: [PATCH 4/4] Rename Helm chart, calculate PVC size from benchmark size --- helm/assets/fio-0.1.0.tgz | Bin 0 -> 2124 bytes helm/assets/fio-standalone-0.1.0.tgz | Bin 1979 -> 0 bytes helm/charts/fio-standalone/0.1.0/Chart.yaml | 5 --- .../fio-standalone/0.1.0/templates/NOTES.txt | 7 ---- .../{fio-standalone => fio}/0.1.0/.helmignore | 0 helm/charts/fio/0.1.0/Chart.yaml | 6 +++ helm/charts/fio/0.1.0/templates/NOTES.txt | 11 +++++ .../0.1.0/templates/_helpers.tpl | 38 +++++++++++++----- .../0.1.0/templates/job.yaml | 6 +-- .../templates/persistent-volume-claim.yaml | 4 +- .../{fio-standalone => fio}/0.1.0/values.yaml | 9 ++--- helm/index.yaml | 15 +++---- 12 files changed, 61 insertions(+), 40 deletions(-) create mode 100644 helm/assets/fio-0.1.0.tgz delete mode 100644 helm/assets/fio-standalone-0.1.0.tgz delete mode 100644 helm/charts/fio-standalone/0.1.0/Chart.yaml delete mode 100644 helm/charts/fio-standalone/0.1.0/templates/NOTES.txt rename helm/charts/{fio-standalone => fio}/0.1.0/.helmignore (100%) create mode 100644 helm/charts/fio/0.1.0/Chart.yaml create mode 100644 helm/charts/fio/0.1.0/templates/NOTES.txt rename helm/charts/{fio-standalone => fio}/0.1.0/templates/_helpers.tpl (58%) rename helm/charts/{fio-standalone => fio}/0.1.0/templates/job.yaml (82%) rename helm/charts/{fio-standalone => fio}/0.1.0/templates/persistent-volume-claim.yaml (75%) rename helm/charts/{fio-standalone => fio}/0.1.0/values.yaml (62%) diff --git a/helm/assets/fio-0.1.0.tgz b/helm/assets/fio-0.1.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..9ef841dbbd1d1e58a95cb5684e9a9543f93197a0 GIT binary patch literal 2124 zcmV-S2($MeiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PI?ObKAHP&)@tMd-UCm?M4)3%k~WWm`NPR<6dIBr>n2iPA3C_ zO9~MPFaW5;an#S=0Z2+DCE31*oj!~|WD;2HE*AJLc9%|=>>p2vGQl;;__GITVHk#o z!=d{dhGF+_xVN|WY%m;zd;5FCql1HI;b3qyJa`7-!>H44g*HSz3xBn&?&AJS8p+ue zD$S&bV7BLxJYT+s!5|2|7&TQaH?Hp`3OdP%n!@+R7?nVS8b(GclHxHZT0@R1kt!pC zB79_K0Yhe9Km2||nsDY$9l zKat7}QeJ3-%7dDt8$Ne_!1o=$OvdQwFRzZF2mWiuQD19=nGaHd|B_2OwWKr2iwxh& z*v@TGdEU78N7W+OX9StRqTBVJU;KCi3O^J~VGPbYnFt2q>2uh(KSTS2h6Ywy_Sp*A z4^ORNmXQ=KYXF70)XYeA9f5yM^b}Qp>g4!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%VBi(_YITRTFza0 zjexH)tEvJQ!suwNsF~y)Ntva-BxVvpt*O`9$3+2l^F}tvmMST;p)ew z``4nqj`t&!qSjWK3c5Y`0ZIImVg@e+MbCj=7K+vc3O^L6m+q(%wrZJ0N)a^Wf9=h$ z@E_RRpQS=7d=MFT;(x!3|GmNC;0gba(YD}{7=uc2ZE|t-sC&)RZT#g~Lu_F`db5O{MVKaoBm`S6bh}hc#fvNki57^EXChQZ& z<$sBMvlGCD;MX99n`u?D7bI{dFz|v`qjw`C6?$7x6}GO9M-Vfmy&z?#?|w`5yPgH_#t*Z#Ni|ska-L%sxxSQg8QP-WFUD#blx3 z?A3|(f?Ub>NR1b;7)ie*SMt3V%ruoT_Wu*`{nVb?Q+sNg+P?z;0RR6X=LMtyDgXfB Ck0%iT literal 0 HcmV?d00001 diff --git a/helm/assets/fio-standalone-0.1.0.tgz b/helm/assets/fio-standalone-0.1.0.tgz deleted file mode 100644 index b5ef701e744353676b889e3446dd72c7d36d603e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1979 zcmV;s2SoTEiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PI>{Z`(K$&oe*8ta1yqxmuPJCk3>)hi;lJa@!`k^}f+qOt}=;Kb}x!{5j3| z&f`%K1i{g8=>7&l(ES?>ULWoZhJ#@LAPDw{`#Zs47#tn!K=6n*tffL5s&<0!*41_H z|Ac7HE>USFMF_Kf5~Ge3%Z+>g8AUY7sG0%=%|yx(el5nR1RB&ZGE&hLk2%$v2%2FC z%bSUqd5$5_Jm)N;RwS9#ssexD2jsb(-_lMe{%4dIs2>>sHpKs6FgWPO|G{8?8~;y1 z`782ek^WRUL{6wmZnh*{S z-mzCOJhZ=PBHt=xU#t?_Q!2`2>;_m(&;#!m#!=6;!OR1x!26lYXlhw!k{20%kg*-# z;v%FmC0sJSX?D}37jEc`a$ft9&!YQ02;RMdq5bLDAH1_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|8{gWGEyPgg{p3Gc|3xc zDNX#8nZEli%_si&i|V`Ix?z&`?N9xxXQIClWKYH-hlFv|WY5>vIob2abV~Moli6pf zSW5Q(OLpOsDkcjJr*BU*@pC0VVq}QVVx;|&UCEEcpXo@(*njTW-qMz~w59v#e*pjh N|Nr9!{?Py`003vi+@1gc diff --git a/helm/charts/fio-standalone/0.1.0/Chart.yaml b/helm/charts/fio-standalone/0.1.0/Chart.yaml deleted file mode 100644 index 260209d..0000000 --- a/helm/charts/fio-standalone/0.1.0/Chart.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v2 -name: fio-standalone -description: Benchmark a single Kubernetes StorageClass -type: application -version: 0.1.0 diff --git a/helm/charts/fio-standalone/0.1.0/templates/NOTES.txt b/helm/charts/fio-standalone/0.1.0/templates/NOTES.txt deleted file mode 100644 index cfeba44..0000000 --- a/helm/charts/fio-standalone/0.1.0/templates/NOTES.txt +++ /dev/null @@ -1,7 +0,0 @@ -Benchmark against StorageClass {{ .Values.pvc.storageClassName }} is running! - -Check the status of the Job to see when the benchmark is complete: -kubectl get jobs -n {{ .Release.Namespace }} - -View logs of the completed benchmark: -kubectl logs -n {{ .Release.Namespace }} job/{{ include "fio-standalone.fullname" . }} diff --git a/helm/charts/fio-standalone/0.1.0/.helmignore b/helm/charts/fio/0.1.0/.helmignore similarity index 100% rename from helm/charts/fio-standalone/0.1.0/.helmignore rename to helm/charts/fio/0.1.0/.helmignore diff --git a/helm/charts/fio/0.1.0/Chart.yaml b/helm/charts/fio/0.1.0/Chart.yaml new file mode 100644 index 0000000..97da28e --- /dev/null +++ b/helm/charts/fio/0.1.0/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: fio +description: Benchmark Kubernetes StorageClass performance with FIO. +type: application +version: 0.1.0 +appVersion: v0.1.0 diff --git a/helm/charts/fio/0.1.0/templates/NOTES.txt b/helm/charts/fio/0.1.0/templates/NOTES.txt new file mode 100644 index 0000000..2c00363 --- /dev/null +++ b/helm/charts/fio/0.1.0/templates/NOTES.txt @@ -0,0 +1,11 @@ +{{ if .Values.pvc.storageClassName -}} +Benchmark against StorageClass {{ .Values.pvc.storageClassName | quote }} is running! +{{- else -}} +Benchmark against default StorageClass is running! +{{- end }} + +Check the status of the Job to see when the benchmark is complete: +kubectl get jobs -n {{ .Release.Namespace }} + +View logs of the completed benchmark: +kubectl logs -n {{ .Release.Namespace }} job/{{ include "fio.fullname" . }} diff --git a/helm/charts/fio-standalone/0.1.0/templates/_helpers.tpl b/helm/charts/fio/0.1.0/templates/_helpers.tpl similarity index 58% rename from helm/charts/fio-standalone/0.1.0/templates/_helpers.tpl rename to helm/charts/fio/0.1.0/templates/_helpers.tpl index a584a6e..08cd973 100644 --- a/helm/charts/fio-standalone/0.1.0/templates/_helpers.tpl +++ b/helm/charts/fio/0.1.0/templates/_helpers.tpl @@ -1,7 +1,7 @@ {{/* Expand the name of the chart. */}} -{{- define "fio-standalone.name" -}} +{{- define "fio.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} @@ -10,7 +10,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "fio-standalone.fullname" -}} +{{- define "fio.fullname" -}} {{- if .Values.fullnameOverride }} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} {{- else }} @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "fio-standalone.chart" -}} +{{- define "fio.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels */}} -{{- define "fio-standalone.labels" -}} -helm.sh/chart: {{ include "fio-standalone.chart" . }} -{{ include "fio-standalone.selectorLabels" . }} +{{- define "fio.labels" -}} +helm.sh/chart: {{ include "fio.chart" . }} +{{ include "fio.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -45,18 +45,36 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "fio-standalone.selectorLabels" -}} -app.kubernetes.io/name: {{ include "fio-standalone.name" . }} +{{- define "fio.selectorLabels" -}} +app.kubernetes.io/name: {{ include "fio.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* Create the name of the service account to use */}} -{{- define "fio-standalone.serviceAccountName" -}} +{{- define "fio.serviceAccountName" -}} {{- if .Values.serviceAccount.create }} -{{- default (include "fio-standalone.fullname" .) .Values.serviceAccount.name }} +{{- default (include "fio.fullname" .) .Values.serviceAccount.name }} {{- else }} {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} + +{{/* +Pre-calculate PVC size from benchmark size +*/}} +{{- define "fio.pvcSize" -}} +{{- if not (kindIs "string" .Values.benchmark.size) }} +{{- fail "Benchmark size must be of format G, e.g. 10G, 25G, 1000G" -}} +{{- end }} +{{- if not (hasSuffix "G" .Values.benchmark.size) -}} +{{- fail "Benchmark size must be of format G, e.g. 10G, 25G, 1000G" -}} +{{- end}} +{{- $sizeElevenX := mul (trimSuffix "G" .Values.benchmark.size) 11 -}} +{{- if (ne (mod $sizeElevenX 10) 0) -}} +{{- add1 (div $sizeElevenX 10) }}Gi +{{- else -}} +{{- div $sizeElevenX 10 }}Gi +{{- end }} +{{- end }} diff --git a/helm/charts/fio-standalone/0.1.0/templates/job.yaml b/helm/charts/fio/0.1.0/templates/job.yaml similarity index 82% rename from helm/charts/fio-standalone/0.1.0/templates/job.yaml rename to helm/charts/fio/0.1.0/templates/job.yaml index 2b00c92..402c593 100644 --- a/helm/charts/fio-standalone/0.1.0/templates/job.yaml +++ b/helm/charts/fio/0.1.0/templates/job.yaml @@ -1,7 +1,7 @@ apiVersion: batch/v1 kind: Job metadata: - name: {{ include "fio-standalone.fullname" . }} + name: {{ include "fio.fullname" . }} spec: template: metadata: @@ -20,7 +20,7 @@ spec: - name: FILE_NAME value: "/volume/test" - name: SIZE - value: "2G" # must be smaller or match the PVC size + value: {{ .Values.benchmark.size | quote }} volumeMounts: - name: vol mountPath: /volume/ @@ -29,5 +29,5 @@ spec: volumes: - name: vol persistentVolumeClaim: - claimName: {{ include "fio-standalone.fullname" . }} + claimName: {{ include "fio.fullname" . }} backoffLimit: 0 diff --git a/helm/charts/fio-standalone/0.1.0/templates/persistent-volume-claim.yaml b/helm/charts/fio/0.1.0/templates/persistent-volume-claim.yaml similarity index 75% rename from helm/charts/fio-standalone/0.1.0/templates/persistent-volume-claim.yaml rename to helm/charts/fio/0.1.0/templates/persistent-volume-claim.yaml index 9c63fb0..8448edc 100644 --- a/helm/charts/fio-standalone/0.1.0/templates/persistent-volume-claim.yaml +++ b/helm/charts/fio/0.1.0/templates/persistent-volume-claim.yaml @@ -1,7 +1,7 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ include "fio-standalone.fullname" . }} + name: {{ include "fio.fullname" . }} spec: volumeMode: {{ .Values.pvc.volumeMode | quote }} {{- if .Values.pvc.storageClassName }} @@ -11,4 +11,4 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.pvc.size | quote }} + storage: {{ include "fio.pvcSize" . | quote }} diff --git a/helm/charts/fio-standalone/0.1.0/values.yaml b/helm/charts/fio/0.1.0/values.yaml similarity index 62% rename from helm/charts/fio-standalone/0.1.0/values.yaml rename to helm/charts/fio/0.1.0/values.yaml index 697adcd..d062e36 100644 --- a/helm/charts/fio-standalone/0.1.0/values.yaml +++ b/helm/charts/fio/0.1.0/values.yaml @@ -2,20 +2,17 @@ pvc: # specify storage class to test; # "" will use the default StorageClass for the cluster storageClassName: "" - # size of PVC; must be larger than benchmark.size - # NOTE the format: 33Gi, 45Gi, etc. - size: "33Gi" # mode for PVC - "Filesystem" or "Block" volumeMode: "Filesystem" benchmark: - # size of benchmark tests; must be smaller than pvc.size - # NOTE the format: 30G, 40G, etc. + # size of benchmark + # NOTE required format: 10G, 30G, 40G, etc. size: "30G" image: repository: "yasker/kbench" pullPolicy: "IfNotPresent" - tag: "latest" + tag: "v0.1.0" imagePullSecrets: [] quickMode: false diff --git a/helm/index.yaml b/helm/index.yaml index 92539d4..2caecc8 100644 --- a/helm/index.yaml +++ b/helm/index.yaml @@ -1,13 +1,14 @@ apiVersion: v1 entries: - fio-standalone: + fio: - apiVersion: v2 - created: "2021-08-03T13:45:12.148698-04:00" - description: Benchmark a single Kubernetes StorageClass - digest: b6fd382c9f4706537a003af34bdc91f935fc3c485ee290dbf299124bb58965ec - name: fio-standalone + appVersion: v0.1.0 + created: "2021-08-03T16:41:16.873451-04:00" + description: Benchmark Kubernetes StorageClass performance with FIO. + digest: 0c788837ccac5e80388a694bb51af34cecf5faa1e830d0c54fc2c02f78830212 + name: fio type: application urls: - - assets/fio-standalone-0.1.0.tgz + - assets/fio-0.1.0.tgz version: 0.1.0 -generated: "2021-08-03T13:45:12.148104-04:00" +generated: "2021-08-03T16:41:16.872569-04:00"