• 0 Posts
  • 93 Comments
Joined 2 years ago
cake
Cake day: December 30th, 2023

help-circle
  • Similarly, make your methods short - really, really short. If you have 10 lines of code and put them each in their own method, great! Maybe it isnt the fastest code to read - but readable method names will make it obvious what each line does, and combining independent methods together is far easier than breaking one massive method into chunks.

    I agree with a lot you said and this reads like advice straight from Robert Martins “Clean Code”, but I’ve recently read a discussion between him and John Ousterhout, where John makes compelling arguments for longer, “deeper” functions. I found the discussion very interesting and actually started reading “A Philosophy of Software Design” shortly after. Would recommend!











  • Check the permissions/owner of the authorized_keys file. I’m not at home right now to give you the path to it, but I have had a similar problem after I add a new ssh key to my gitea/forgejo account. It turned out that in doing so, sometimes the permissions change and gitea/forgejo then refuses to use the file. You should see warnings about this in the logs.

    In my case the problem is probably rooted within the uid/gid thats used inside the container and/or the nfs mount I use for the container volume. I never bothered to get to the bottom of it though.






  • I’m thinking about just doing something outside kubernetes that just copies the data from the directory that NFS provides to another storage.

    This is what I’m doing for the most part. A TrueNAS server provides the NFS shares and periodically backs them up with restic.

    Some apps don’t like NFS very much, especially those that require SQLite. If you’re running Jellyfin over NFS you probably know what I mean. For those apps I use Ceph instead, which is highly available and a lot faster but also more complicated. Those PVCs I backup from within kubernetes to S3 storage with velero.