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"