Background & avatars disappears #334

Closed
opened 2026-02-04 18:34:42 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @vadMUKH on GitHub (Jun 19, 2023).

Hi!
We deployed Planka on our kubernetes.
Sometimes we notice that our custom background disappears.
Avatars of users disappear too.

Usually we solve it with restarting our deployment. But we can't detect why does it happens.
Could you help me to understand what could this be related to?)

Originally created by @vadMUKH on GitHub (Jun 19, 2023). Hi! We deployed Planka on our kubernetes. Sometimes we notice that our custom background disappears. Avatars of users disappear too. Usually we solve it with restarting our deployment. But we can't detect why does it happens. Could you help me to understand what could this be related to?)
OVERLORD added the help wanted label 2026-02-04 18:34:42 +03:00
Author
Owner

@eternity1984 commented on GitHub (Nov 20, 2023):

Hi @vadMUKH, does your environment have PVC deployed?
If the volume type is EmptyDir, the images and avatars will disappear every time the pod is terminated.

$ kubectl get pvc
NAME                       STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
data-planka-postgresql-0   Bound    pvc-35606a8d-a79d-4d6c-811c-8dd175f60cfc   8Gi        RWO            hostpath       25m


$ kubectl describe deploy planka
...
    Mounts:
      /app/private/attachments from planka (rw,path="attachments")
      /app/public/project-background-images from planka (rw,path="project-background-images")
      /app/public/user-avatars from planka (rw,path="user-avatars")
  Volumes:
   planka:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     
    SizeLimit:  <unset>

...

  1. Back up your files.

    $ kubectl get po
    NAME                      READY   STATUS    RESTARTS   AGE
    planka-5ffdbdcb69-r4zx7   1/1     Running   0          10m
    ...
    
    $ kubectl cp planka-5ffdbdcb69-r4zx7:/app/private/attachments attachments
    $ kubectl cp planka-5ffdbdcb69-r4zx7:/app/public/project-background-images project-background-images 
    $ kubectl cp planka-5ffdbdcb69-r4zx7:/app/public/user-avatars user-avatars 
    
  2. Set persistence.enabled to true in the helm configuration. After the upgraded, PersistentVolumeClaim will be used instead of EmptyDir.

    $ helm upgrade planka [CHART] [flags]
    $ kubectl describe deploy planka
    ...
        Mounts:
          /app/private/attachments from planka (rw,path="attachments")
          /app/public/project-background-images from planka (rw,path="project-background-images")
          /app/public/user-avatars from planka (rw,path="user-avatars")
      Volumes:
       planka:
        Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
        ClaimName:  planka
        ReadOnly:   false
    
  3. Restore from backup.

    $ kubectl get po
    NAME                      READY   STATUS    RESTARTS   AGE
    planka-7655f4c48f-hdgc6   1/1     Running   0          25s
    ...
    
    $ kubectl cp attachments planka-7655f4c48f-hdgc6:/app/private/
    $ kubectl cp project-background-images planka-7655f4c48f-hdgc6:/app/public/
    $ kubectl cp user-avatars planka-7655f4c48f-hdgc6:/app/public/
    
@eternity1984 commented on GitHub (Nov 20, 2023): Hi @vadMUKH, does your environment have PVC deployed? If the volume type is EmptyDir, the images and avatars will disappear every time the pod is terminated. ``` $ kubectl get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE data-planka-postgresql-0 Bound pvc-35606a8d-a79d-4d6c-811c-8dd175f60cfc 8Gi RWO hostpath 25m $ kubectl describe deploy planka ... Mounts: /app/private/attachments from planka (rw,path="attachments") /app/public/project-background-images from planka (rw,path="project-background-images") /app/public/user-avatars from planka (rw,path="user-avatars") Volumes: planka: Type: EmptyDir (a temporary directory that shares a pod's lifetime) Medium: SizeLimit: <unset> ... ``` --- 1. Back up your files. ``` $ kubectl get po NAME READY STATUS RESTARTS AGE planka-5ffdbdcb69-r4zx7 1/1 Running 0 10m ... $ kubectl cp planka-5ffdbdcb69-r4zx7:/app/private/attachments attachments $ kubectl cp planka-5ffdbdcb69-r4zx7:/app/public/project-background-images project-background-images $ kubectl cp planka-5ffdbdcb69-r4zx7:/app/public/user-avatars user-avatars ``` 2. Set `persistence.enabled` to `true` in the helm configuration. After the upgraded, PersistentVolumeClaim will be used instead of EmptyDir. ``` $ helm upgrade planka [CHART] [flags] $ kubectl describe deploy planka ... Mounts: /app/private/attachments from planka (rw,path="attachments") /app/public/project-background-images from planka (rw,path="project-background-images") /app/public/user-avatars from planka (rw,path="user-avatars") Volumes: planka: Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace) ClaimName: planka ReadOnly: false ``` 3. Restore from backup. ``` $ kubectl get po NAME READY STATUS RESTARTS AGE planka-7655f4c48f-hdgc6 1/1 Running 0 25s ... $ kubectl cp attachments planka-7655f4c48f-hdgc6:/app/private/ $ kubectl cp project-background-images planka-7655f4c48f-hdgc6:/app/public/ $ kubectl cp user-avatars planka-7655f4c48f-hdgc6:/app/public/ ```
Author
Owner

@vadMUKH commented on GitHub (Nov 21, 2023):

Hi @eternity1984 !
Yeah, we have PVC in our deployment.
The issue has not been repeated for a long time (several months) without any changes on our part.
It just work now :)

If this happens again we will know how to deal with it. Thank you for your advice!

@vadMUKH commented on GitHub (Nov 21, 2023): Hi @eternity1984 ! Yeah, we have PVC in our deployment. The issue has not been repeated for a long time (several months) without any changes on our part. It just work now :) If this happens again we will know how to deal with it. Thank you for your advice!
Author
Owner

@eternity1984 commented on GitHub (Nov 21, 2023):

@vadMUKH Thanks for confirming!
My apologies for my inability to provide the assistance you needed 😭

@eternity1984 commented on GitHub (Nov 21, 2023): @vadMUKH Thanks for confirming! My apologies for my inability to provide the assistance you needed 😭
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#334