helm chart: support cloud-based persistent volumes if values 'volume_storage_class' is specified.
use PersistentVolumeClaim to create a persistent volume for each local service (mongo, minio, redis) when running in a cloud setup if cloud-specified volume storage class not specified, create default hostPath volume (eg. for minikube) lint: add default icon for chart
This commit is contained in:
parent
88f1689e0e
commit
b3ca501a19
@ -2,6 +2,7 @@ apiVersion: v2
|
|||||||
name: browsertrix-cloud
|
name: browsertrix-cloud
|
||||||
description: A chart for running the Webrecorder Browsertrix System
|
description: A chart for running the Webrecorder Browsertrix System
|
||||||
type: application
|
type: application
|
||||||
|
icon: https://webrecorder.net/assets/icon.png
|
||||||
|
|
||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
|
|||||||
@ -1,5 +1,41 @@
|
|||||||
{{- if .Values.minio_local }}
|
{{- if .Values.minio_local }}
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: minio-storage-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
|
|
||||||
|
{{- if .Values.volume_storage_class }}
|
||||||
|
storageClassName: {{ .Values.volume_storage_class }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{- if not .Values.volume_storage_class }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: "local-minio-store-pv"
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 5Gi
|
||||||
|
|
||||||
|
accessModes:
|
||||||
|
- "ReadWriteOnce"
|
||||||
|
|
||||||
|
hostPath:
|
||||||
|
path: /tmp/btrix-minio-data
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@ -20,9 +56,8 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: data-storage
|
- name: data-storage
|
||||||
hostPath:
|
persistentVolumeClaim:
|
||||||
path: /tmp/browsertrix-minio-data
|
claimName: minio-storage-pvc
|
||||||
type: DirectoryOrCreate
|
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: minio
|
- name: minio
|
||||||
@ -36,6 +71,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data-storage
|
- name: data-storage
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
subPath: minio
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
|||||||
@ -13,6 +13,41 @@ stringData:
|
|||||||
MONGO_INITDB_ROOT_PASSWORD: {{ .Values.mongo_auth.password | quote }}
|
MONGO_INITDB_ROOT_PASSWORD: {{ .Values.mongo_auth.password | quote }}
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: mongo-storage-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 2Gi
|
||||||
|
|
||||||
|
{{- if .Values.volume_storage_class }}
|
||||||
|
storageClassName: {{ .Values.volume_storage_class }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{- if not .Values.volume_storage_class }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: "local-mongo-store-pv"
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 2Gi
|
||||||
|
|
||||||
|
accessModes:
|
||||||
|
- "ReadWriteOnce"
|
||||||
|
|
||||||
|
hostPath:
|
||||||
|
path: /tmp/btrix-mongo-data
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@ -32,9 +67,8 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: data-db
|
- name: data-db
|
||||||
hostPath:
|
persistentVolumeClaim:
|
||||||
path: /tmp/browsertrix-mongo-data
|
claimName: mongo-storage-pvc
|
||||||
type: DirectoryOrCreate
|
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: mongo
|
- name: mongo
|
||||||
@ -47,6 +81,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data-db
|
- name: data-db
|
||||||
mountPath: /data/db
|
mountPath: /data/db
|
||||||
|
subPath: mongo
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
|||||||
@ -1,5 +1,41 @@
|
|||||||
{{- if .Values.redis_local }}
|
{{- if .Values.redis_local }}
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: redis-storage-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
|
||||||
|
{{- if .Values.volume_storage_class }}
|
||||||
|
storageClassName: {{ .Values.volume_storage_class }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{- if not .Values.volume_storage_class }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: "local-redis-store-pv"
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 1Gi
|
||||||
|
|
||||||
|
accessModes:
|
||||||
|
- "ReadWriteOnce"
|
||||||
|
|
||||||
|
hostPath:
|
||||||
|
path: /tmp/btrix-redis-data
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@ -20,9 +56,8 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: data-storage
|
- name: data-storage
|
||||||
hostPath:
|
persistentVolumeClaim:
|
||||||
path: /tmp/browsertrix-redis-data
|
claimName: redis-storage-pvc
|
||||||
type: DirectoryOrCreate
|
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: redis
|
- name: redis
|
||||||
@ -33,6 +68,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data-storage
|
- name: data-storage
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
|
subPath: redis
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
|||||||
@ -2,6 +2,11 @@
|
|||||||
# =========================================
|
# =========================================
|
||||||
name: browsertrix-cloud
|
name: browsertrix-cloud
|
||||||
|
|
||||||
|
# when running in the cloud, set this value to cloud-specific block storage
|
||||||
|
# keep empty to use hostPath (eg. on minikube)
|
||||||
|
volume_storage_class:
|
||||||
|
|
||||||
|
|
||||||
registration_enabled: 1
|
registration_enabled: 1
|
||||||
jwt_token_lifetime_minutes: 60
|
jwt_token_lifetime_minutes: 60
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user