Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable FIFO policy for demo #63

Merged
merged 2 commits into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rusty-hook.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[hooks]
pre-commit = "cd core && cargo fmt --all && find src -name '*.rs' | xargs touch && cargo clippy --tests --all-targets --all-features -- -D warnings"
pre-commit = "cd core && cargo fmt --all && find */src -name '*.rs' | xargs touch && cargo clippy --tests --all-targets --all-features -- -D warnings"

[logging]
verbose = true
29 changes: 21 additions & 8 deletions distribution/kubernetes/demo/templates/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ spec:
storage: {{ .Values.volumeClaim.request }}
---
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ include "webgrid-demo.fullname" . }}-storage
labels:
dev.webgrid/component: minio
{{- include "webgrid-demo.labels" . | nindent 4 }}
spec:
replicas: 1
serviceName: {{ include "webgrid-demo.fullname" . }}-storage
selector:
matchLabels:
dev.webgrid/component: minio
Expand Down Expand Up @@ -48,16 +49,11 @@ spec:
{{- end }}
containers:
- name: minio
image: minio/minio@sha256:9daf9c4b2be5b19b8bf40d3cc9a6026b94d9b31582deb7365914b27c09e28573
image: minio/minio
command: ["/usr/bin/docker-entrypoint.sh", "server", "/storage/data{1...4}", "--console-address", ":44095"]
volumeMounts:
- mountPath: "/storage"
name: storage
command:
[
"/bin/bash",
"-c",
'mkdir -p /storage/webgrid-video && /usr/bin/docker-entrypoint.sh server /storage --console-address ":44095"',
]
ports:
- name: s3
containerPort: 9000
Expand Down Expand Up @@ -95,3 +91,20 @@ spec:
selector:
dev.webgrid/component: minio
{{- include "webgrid-demo.selectorLabels" . | nindent 4 }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "webgrid-demo.fullname" . }}-storage-setup
spec:
backoffLimit: 4
template:
spec:
containers:
- name: storage-setup
image: minio/mc
command: ["/bin/bash", "-c", "curl --retry 64 -f --retry-connrefused --retry-delay 5 -s -o /dev/null 'http://webgrid-demo-storage' || true && mc mb --ignore-existing webgrid/webgrid && mc admin bucket quota --fifo {{ trimSuffix "i" .Values.volumeClaim.request }} webgrid/webgrid"]
env:
- name: MC_HOST_webgrid
value: http://minioadmin:minioadmin@webgrid-demo-storage
restartPolicy: Never
2 changes: 1 addition & 1 deletion distribution/kubernetes/demo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ affinity:

webgrid:
config:
storageBackend: s3+http://minioadmin:minioadmin@webgrid-demo-storage/webgrid-video?pathStyle
storageBackend: s3+http://minioadmin:minioadmin@webgrid-demo-storage/webgrid?pathStyle