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

Add model download to dedup engine chart #10

Merged
merged 4 commits into from
Jan 10, 2025
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.
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
Expand Up @@ -49,5 +49,11 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
{{ include "keyvault.volumeMounts" . | nindent 12 }}
- name: dde-model-data
mountPath: /dde-model
volumes:
{{ include "keyvault.volumes" . | nindent 8 }}
{{ include "keyvault.volumes" . | nindent 8 }}
- name: dde-model-data
persistentVolumeClaim:
claimName: {{ include "deduplication-engine.fullname" . }}-model-data
readOnly: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "deduplication-engine.fullname" . }}-model-downloader
labels:
{{- include "deduplication-engine.labels" . | nindent 4 }}
deduplication-engine/job: model-downloader
annotations:
"helm.sh/hook": pre-upgrade, post-install
"helm.sh/hook-weight": "5"
"helm.sh/hook-delete-policy": before-hook-creation
spec:
template:
metadata:
labels:
{{- include "deduplication-engine.labels" . | nindent 8 }}
deduplication-engine/job: model-downloader
spec:
containers:
- name: {{ .Chart.Name }}-backend-model-downloader
args: ["syncmodels"]
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
{{ include "keyvault.secretRef" . | nindent 12 }}
- configMapRef:
name: {{ include "deduplication-engine.fullname" . }}-backend
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
{{ include "keyvault.volumeMounts" . | nindent 12 }}
- name: dde-model-data
mountPath: /dde-model
restartPolicy: Never
volumes:
{{ include "keyvault.volumes" . | nindent 8 }}
- name: dde-model-data
persistentVolumeClaim:
claimName: {{ include "deduplication-engine.fullname" . }}-model-data
backoffLimit: 3
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
deduplication-engine/job: upgrade
annotations:
"helm.sh/hook": pre-upgrade, post-install
"helm.sh/hook-weight": "5"
"helm.sh/hook-weight": "10"
"helm.sh/hook-delete-policy": before-hook-creation
spec:
template:
Expand Down
11 changes: 11 additions & 0 deletions charts/deduplication-engine/templates/backend/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "deduplication-engine.fullname" . }}-model-data
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 2Gi
storageClassName: azurefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,11 @@ spec:
name: {{ include "deduplication-engine.fullname" . }}-backend
volumeMounts:
{{ include "keyvault.volumeMounts" . | nindent 12 }}
- name: dde-model-data
mountPath: /dde-model
volumes:
{{ include "keyvault.volumes" . | nindent 8 }}
{{ include "keyvault.volumes" . | nindent 8 }}
- name: dde-model-data
persistentVolumeClaim:
claimName: {{ include "deduplication-engine.fullname" . }}-model-data
readOnly: true
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,11 @@ spec:
name: {{ include "deduplication-engine.fullname" . }}-backend
volumeMounts:
{{ include "keyvault.volumeMounts" . | nindent 12 }}
- name: dde-model-data
mountPath: /dde-model
volumes:
{{ include "keyvault.volumes" . | nindent 8 }}
{{ include "keyvault.volumes" . | nindent 8 }}
- name: dde-model-data
persistentVolumeClaim:
claimName: {{ include "deduplication-engine.fullname" . }}-model-data
readOnly: true
Loading