Skip to content

Disk pressure on large file uploads #1308

@alexanderccc

Description

@alexanderccc

During uploads of large files (depends on available host storage, in my case it's 30GB), the node receives a DiskPressure taint.
This is due to limited space available on the node itself, and Kong utilizing an emptyDir volume for it's tmp dir.
Adding a limit causes the pod to be evicted.

This should be easily resolved by attaching a volume to the tmp directory, and directing the tmp files to a different storage device, but the chart doesn't have support for this.

Something like the below could allow for some increased flexibility in handling this

{{- define "kong.volumes" -}}
- name: {{ template "kong.fullname" . }}-tmp
  {{- if .Values.deployment.tmpDir.customVolume }}
  {{- .Values.deployment.tmpDir.customVolume | toYaml | nindent 2 }}
  {{- else }}
  emptyDir:
    sizeLimit: {{ .Values.deployment.tmpDir.sizeLimit }}
  {{- end }}
...
{{- end }}

I'm thinking this could be useful in other situations as well, like setting the emptyDir to the memory medium and utilizing the node memory for quicker file uploads.

If this would be acceptable I can prep this and open a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions