Skip to content

Commit

Permalink
simplify helm chart usage (#217)
Browse files Browse the repository at this point in the history
* helm: use release namespace for svc fqdn
* helm: add missing nodeSelector and affinity in templates
* helm: use dynamic job args

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
  • Loading branch information
clwluvw authored Jul 22, 2022
1 parent b3149da commit 678e0fa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
10 changes: 9 additions & 1 deletion k8s/helm-chart/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ spec:
- name: {{ include "warp.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: [ "{{ .Values.warpConfiguration.operationToBenchmark }}", "--warp-client", "warp-{0...{{ sub .Values.replicaCount 1 }}}.warp.default.svc.cluster.local", "--concurrent", "{{ .Values.warpConfiguration.concurrentOperations }}", "--obj.size", "{{ .Values.warpConfiguration.objectSize }}", "--objects", "{{ .Values.warpConfiguration.objectCount }}", "--duration", "{{ .Values.warpConfiguration.duration }}", "--bucket", "{{ .Values.warpConfiguration.bucket }}" ]
args:
- "{{ .Values.warpConfiguration.operationToBenchmark }}"
- "--warp-client=warp-{0...{{ sub .Values.replicaCount 1 }}}.warp.{{ .Release.Namespace }}"
{{- range $k, $v := .Values.warpJobArgs }}
- --{{ $k }}={{ $v }}
{{- end }}
env:
- name: WARP_HOST
value: {{ .Values.warpConfiguration.s3ServerURL | quote }}
Expand All @@ -26,4 +31,7 @@ spec:
value: {{ .Values.warpConfiguration.s3AccessKey | quote }}
- name: WARP_SECRET_KEY
value: {{ .Values.warpConfiguration.s3SecretKey | quote }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }}
backoffLimit: 4
6 changes: 6 additions & 0 deletions k8s/helm-chart/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ spec:
ports:
- name: http
containerPort: 7761
{{- if .Values.affinity }}
affinity: {{- .Values.affinity | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- .Values.nodeSelector | toYaml | nindent 8 }}
{{- end }}
9 changes: 6 additions & 3 deletions k8s/helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@ warpConfiguration:
s3SecretKey: "minio123"
# Operation to be benchmarked (get / put / delete / list / stat / mixed)
operationToBenchmark: get

warpJobArgs: {}
# Full args can be found: https://github.com/minio/warp#usage
#
# Number of objects to be used
# objectCount: 1000
# objects: 1000
#
# Object size to be used for benchmarks
# objectSize: 10MiB
# obj.size: 10MiB
#
# Duration for which the benchmark will run
# duration: 5m0s
#
# Number of parallel operations to run during benchmark
# concurrentOperations: 10
# concurrent: 10
#
# By default operations are performed on a bucket called warp-benchmark-bucket.
# This can be changed using the --bucket parameter. Do however note that the bucket
Expand Down

0 comments on commit 678e0fa

Please sign in to comment.