Skip to content

Commit

Permalink
try to stub out storage tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tayterz2 committed Jan 21, 2025
1 parent 9bce90c commit 2337234
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
7 changes: 4 additions & 3 deletions charts/hauler/ci/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ hauler:
pvc:
accessModes: ReadWriteMany
# storageClass: longhorn # optional... will use default storage class
storageRequest: 2Gi # recommended size of 3x the artifact(s)
storageRequest: 5Gi # recommended size of 3x the artifact(s)
test: true

# Helm Chart Values for the Hauler Jobs
# Docs: https://rancherfederal.github.io/hauler-docs/docs/introduction/quickstart
Expand All @@ -35,7 +36,7 @@ haulerJobs:
# "remote" refers to URL-based hauler artifacts and/or manifests
remote:
artifacts:
- path: https://raw.githubusercontent.com/hauler-dev/hauler/main/testdata/haul.tar.zst
- path: https://raw.githubusercontent.com/hauler-dev/hauler/main/testdata/haul.tar.zst
name: remhaul.tar.zst
# - path: /path/to/additional-hauls.tar.zst
# name: additional-hauls.tar.zst
Expand All @@ -47,7 +48,7 @@ haulerJobs:
# "local" refers to the host the container/kubectl is being run on. Use filesystem paths (hostDir) for these values.
local:
artifacts:
#- path: /usr/local/testdata/haul.tar.zst
# - path: /usr/local/testdata/haul.tar.zst
# name: haul.tar.zst
# - path: /path/to/additional-hauls.tar.zst
# name: additional-hauls.tar.zst
Expand Down
25 changes: 25 additions & 0 deletions charts/hauler/templates/hauler/hauler-pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Use a PV only if this is a test case, not for production!
{{- if .Values.hauler.data.test }}
apiVersion: v1
kind: PersistentVolume
metadata:
name: hauler-data-pv
namespace: {{ .Release.Namespace }}
labels:
{{- include "hauler.labels" . | nindent 4 }}
spec:
{{- if .Values.hauler.data.pvc.storageClass }}
storageClassName: {{ .Values.hauler.data.pvc.storageClass }}
{{- else }}
storageClassName: standard
{{- end }}
accessModes:
- {{ .Values.hauler.data.pvc.accessModes }}
capacity:
storage: 5Gi
hostPath:
path: /tmp/
resources:
requests:
storage: {{ .Values.hauler.data.pvc.storageRequest }}
{{- end }}
1 change: 1 addition & 0 deletions charts/hauler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ hauler:
accessModes: ReadWriteMany
# storageClass: longhorn # optional... will use default storage class
storageRequest: 48Gi # recommended size of 3x the artifact(s)
test: false # set to "true" for CI/test builds where there's no storage available

# Helm Chart Values for the Hauler Jobs
# Docs: https://rancherfederal.github.io/hauler-docs/docs/introduction/quickstart
Expand Down

0 comments on commit 2337234

Please sign in to comment.