From 0124b737a95181e631457c4c5e3ff6002aaa806a Mon Sep 17 00:00:00 2001 From: Denis Borovikov Date: Wed, 4 Oct 2023 17:08:17 +0000 Subject: [PATCH] Proper PVC mounts + minor tunes --- charts/sdk/templates/deployment.yaml | 23 +++++++++++++++++++++++ charts/sdk/values.yaml | 8 ++++++++ 2 files changed, 31 insertions(+) diff --git a/charts/sdk/templates/deployment.yaml b/charts/sdk/templates/deployment.yaml index 4472908..4ce39f6 100644 --- a/charts/sdk/templates/deployment.yaml +++ b/charts/sdk/templates/deployment.yaml @@ -12,9 +12,32 @@ spec: labels: tag: synth spec: + initContainers: + - name: pre-populate-pvc + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: IfNotPresent + command: ["sh", "-c", "cp -r /home/synthesized/* /mnt/synthesized/"] + volumeMounts: + - name: {{ .Values.synthesized.name }}-storage + mountPath: /mnt/synthesized containers: - name: synthesized image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: IfNotPresent + volumeMounts: + - name: {{ .Values.synthesized.name }}-storage + mountPath: /home/synthesized envFrom: - secretRef: name: {{ .Values.synthesized.name }}-secret + resources: + requests: + memory: {{ .Values.resources.requests.memory }} + cpu: {{ .Values.resources.requests.cpu }} + limits: + memory: {{ .Values.resources.limits.memory }} + cpu: {{ .Values.resources.limits.cpu }} + volumes: + - name: {{ .Values.synthesized.name }}-storage + persistentVolumeClaim: + claimName: {{ .Values.synthesized.name }}-pvc diff --git a/charts/sdk/values.yaml b/charts/sdk/values.yaml index beceac4..9138be7 100644 --- a/charts/sdk/values.yaml +++ b/charts/sdk/values.yaml @@ -12,3 +12,11 @@ service: port: 8888 targetPort: 8888 nodePort: 30001 + +resources: + requests: + memory: "8Gi" + cpu: "4" + limits: + memory: "8Gi" + cpu: "4"