emptyDir in statefulset.yaml file

Hi Team,
I wanted to know about what is the uses of emptyDir volume added in server-statefulset.yaml file.

volumes:
{{ template “vault.volumes” . }}
- name: home
emptyDir: {}
{{- if .Values.server.extraInitContainers }}
initContainers:
{{ toYaml .Values.server.extraInitContainers | nindent 8}}
{{- end }}
containers:
- name: vault
{{ template “vault.resources” . }}
image: {{ .Values.server.image.repository }}:{{ .Values.server.image.tag | default “latest” }}
imagePullPolicy: {{ .Values.server.image.pullPolicy }}
command:
- “/bin/sh”
- “-ec”
args: {{ template “vault.args” . }}
{{- if not .Values.global.openshift }}
securityContext:
allowPrivilegeEscalation: false
{{- end }}

For reference : vault-helm/server-statefulset.yaml at master · hashicorp/vault-helm · GitHub

1 Like

I’m also interested in the answer. Ran into this when doing kubectl drain on a node that runs Vault. Draining is only possible when passing --delete-emptydir-data, but am unaware of the effect that has on the Vault instance.