why api uses emptyDir instead of PVC?
It takes a long time for API to boot up, why api uses emptyDir instead of PVC? so it can also fix the issue that K8s keeps restarting API pods.
"spec": {
"volumes": [
{
"name": "config",
"configMap": {
"name": "monocular-monocular-api-config",
"defaultMode": 420
}
},
{
"name": "cache",
"emptyDir": {}
}
],
"volumeMounts": [
{
"name": "cache",
"mountPath": "/monocular"
emptyDirs are persisted through container restarts, they just aren't when pods get deleted. So switching to a PV will not really affect the restart problem.
If I use pvc to keep downloaded charts from deleting or upgrading pod, will API downloads all charts all over again every time when it boots up?
it won't know, you're right that it'll be faster if upgrading or after deleting. That said, I don't think we'll change this as it's meant to be a cache and not really persisted.