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 PV support to the executor statefulset #7

Merged
merged 1 commit into from
Jun 17, 2024
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
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ include "datahub-executor-worker.fullname" . }}
labels:
Expand All @@ -12,6 +12,32 @@ spec:
selector:
matchLabels:
{{- include "datahub-executor-worker.selectorLabels" . | nindent 6 }}
{{- if .Values.persistentVolume.enabled }}
volumeClaimTemplates:
- metadata:
{{- with .Values.persistentVolume.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.persistentVolume.labels }}
labels:
{{- toYaml . | nindent 10 }}
{{- end }}
name: executor-storage-volume
spec:
accessModes:
{{ toYaml .Values.persistentVolume.accessModes }}
{{- if .Values.persistentVolume.storageClass }}
{{- if (eq "-" .Values.persistentVolume.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistentVolume.storageClass }}"
{{- end }}
{{- end }}
resources:
requests:
storage: "{{ .Values.persistentVolume.size }}"
{{- end }}
template:
metadata:
{{- with .Values.podAnnotations }}
Expand Down Expand Up @@ -87,6 +113,10 @@ spec:
{{ toYaml .Values.extraEnvs | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.persistentVolume.enabled }}
- name: executor-storage-volume
mountPath: {{ .Values.persistentVolume.mountPath }}
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{ toYaml .Values.extraVolumeMounts | nindent 10 }}
{{- end }}
Expand Down
14 changes: 13 additions & 1 deletion charts/datahub-executor-worker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ extraPodLabels: {}
resources:
requests:
memory: "8Gi"
cpu: "2"
cpu: "4"

nodeSelector: {}

Expand All @@ -89,3 +89,15 @@ readinessProbe:
periodSeconds: 60
failureThreshold: 3
timeoutSeconds: 5

persistentVolume:
enabled: false
accessModes:
- ReadWriteOnce
annotations: {}
labels: {}
existingClaim: ""
mountPath: /tmp/datahub
size: 100Gi
# storageClass: "-"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is an example value here?

do you thik their engineers will understand how to correctly configure to store on say S3?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if that parameter is omitted, this will use default storage class configured in their cluster. I'd not go with S3 volumes, because that path is used by ingestions to store venv and logs. We actually use similar config in ECS (cloudformation).

Alternatively, they can mount it under a different path (e.g. /memory-profiles), and then use S3 volumes, but I'm not sure their kube cluster supports it. Usually EBS gp2/gp3 is the only supported volume type in AWS deployments.

subPath: ""