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

fix: Add volumeMounts only if defaultStorage is enabled #7911

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Fixed

- Helm chart: Add volumeMounts only if defaultStorage is enabled
jackylamhk marked this conversation as resolved.
Show resolved Hide resolved
(<https://github.com/cvat-ai/cvat/pull/7911>)
2 changes: 2 additions & 0 deletions helm-chart/templates/cvat_backend/server/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ spec:
{{- toYaml (omit $localValues.livenessProbe "enabled") | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-backend-per-service-cache
Expand All @@ -96,6 +97,7 @@ spec:
- mountPath: /home/django/models
name: cvat-backend-data
subPath: models
{{- end }}
{{- with concat .Values.cvat.backend.additionalVolumeMounts $localValues.additionalVolumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions helm-chart/templates/cvat_backend/utils/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ spec:
{{- $probeConfig := dict "args" $probeArgs "livenessProbe" $.Values.cvat.backend.worker.livenessProbe -}}
{{ include "cvat.backend.worker.livenessProbe" $probeConfig | indent 10 }}
volumeMounts:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-backend-per-service-cache
Expand All @@ -80,6 +81,7 @@ spec:
- mountPath: /home/django/models
name: cvat-backend-data
subPath: models
{{- end }}
{{- with concat .Values.cvat.backend.additionalVolumeMounts $localValues.additionalVolumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ spec:
{{- $probeConfig := dict "args" $probeArgs "livenessProbe" $.Values.cvat.backend.worker.livenessProbe -}}
{{ include "cvat.backend.worker.livenessProbe" $probeConfig | indent 10 }}
volumeMounts:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-backend-per-service-cache
Expand All @@ -83,6 +84,7 @@ spec:
- mountPath: /home/django/tmp_storage
name: cvat-backend-data
subPath: tmp_storage
{{- end }}
{{- with concat .Values.cvat.backend.additionalVolumeMounts $localValues.additionalVolumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ spec:
{{- $probeConfig := dict "args" $probeArgs "livenessProbe" $.Values.cvat.backend.worker.livenessProbe -}}
{{ include "cvat.backend.worker.livenessProbe" $probeConfig | indent 10 }}
volumeMounts:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-backend-per-service-cache
Expand All @@ -84,6 +85,7 @@ spec:
- mountPath: /home/django/tmp_storage
name: cvat-backend-data
subPath: tmp_storage
{{- end }}
{{- with concat .Values.cvat.backend.additionalVolumeMounts $localValues.additionalVolumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ spec:
{{- $probeConfig := dict "args" $probeArgs "livenessProbe" $.Values.cvat.backend.worker.livenessProbe -}}
{{ include "cvat.backend.worker.livenessProbe" $probeConfig | indent 10 }}
volumeMounts:
{{- if .Values.cvat.backend.defaultStorage.enabled }}
{{- if not .Values.cvat.backend.disableDistinctCachePerService }}
- mountPath: /home/django/data/cache
name: cvat-backend-per-service-cache
Expand All @@ -83,6 +84,7 @@ spec:
- mountPath: /home/django/tmp_storage
name: cvat-backend-data
subPath: tmp_storage
{{- end }}
{{- with concat .Values.cvat.backend.additionalVolumeMounts $localValues.additionalVolumeMounts }}
{{- toYaml . | nindent 10 }}
{{- end }}
Expand Down
8 changes: 5 additions & 3 deletions helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,12 @@ cvat:
periodSeconds: 10
initialDelaySeconds: 30
defaultStorage:
# Note: if you disable defaultStorage, you will need to mount `/home/django/*`
# volumes manually under additionalVolumes and additionalVolumeMounts
enabled: true
# storageClassName: default
# accessModes:
# - ReadWriteOnce
# storageClassName: default
# accessModes:
# - ReadWriteOnce
size: 100Gi

postgresql:
Expand Down