Skip to content

Commit

Permalink
Adding shared media dir for upload and results
Browse files Browse the repository at this point in the history
  • Loading branch information
morganekmefjord committed Oct 18, 2024
1 parent 36173e0 commit ed526f9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
9 changes: 4 additions & 5 deletions charts/ptp/templates/ptp-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,18 @@ spec:
- containerPort: 8000
protocol: TCP
volumeMounts:
- mountPath: /app/inference/models/
subPath: models/
name: ptp-worker-claim0
- mountPath: /app/media/
name: ptp-media-dir
- name: settings-volume
mountPath: /app/ptp/settings.py
subPath: settings.py
imagePullSecrets:
- name: regcred
restartPolicy: Always
volumes:
- name: ptp-worker-claim0
- name: ptp-media-dir
persistentVolumeClaim:
claimName: ptp-worker-claim0
claimName: ptp-media-dir
- name: settings-volume
configMap:
name: settings-config-{{ .Release.Name }}
12 changes: 12 additions & 0 deletions charts/ptp/templates/ptp-media-dir.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
io.kompose.service: ptp-media-dir
name: ptp-media-dir
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
5 changes: 5 additions & 0 deletions charts/ptp/templates/ptp-worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ spec:
image: {{ .Values.ptp.image.repository }}:{{ .Values.ptp.image.tag }}
name: worker
volumeMounts:
- mountPath: /app/media/
name: ptp-media-dir
- mountPath: /app/inference/models/
subPath: models/
name: ptp-worker-claim0
Expand All @@ -56,6 +58,9 @@ spec:
subPath: settings.py
restartPolicy: Always
volumes:
- name: ptp-media-dir
persistentVolumeClaim:
claimName: ptp-media-dir
- name: ptp-worker-claim0
persistentVolumeClaim:
claimName: ptp-worker-claim0
Expand Down

0 comments on commit ed526f9

Please sign in to comment.