Forgejo on Kubernetes
I (and my sons) want to be able to host code and other text locally, so I decided to run on it on my K3s lab.
The first decision to make was which platform to use. I have used Gitlab for years at work and love it, but it is quite a beast to administer and run. I have used Gogs and Gitea in the past and they are far more lightweight than Gitlab, so I decided to use Forgejo
New Home Lab
Where better to start than how my lab is working.
My home lab is not one that has really been planned, rather I acquire/buy things as the opportunity arises. It really has 2 things:
- NAS
- Kubernetes
Info
First Post Back
The other day my wife mentioned that I had not been blogging for a while. I looked and it turns out the last post was 4 years ago! I am not really sure what happened, but for whatever reason blogging went on the back burner,
Anyway, I am back on it now and have plenty of things to write about. I am still in tech, although things have changed. I have moved on from Claranet and am now at Ubisoft. Also, I am no longer an individual contributor, but have moved into the world of Developer Relations. If you do not know what DevRel is, Kelsey Hightower has the only definition you need:
Experience Buying a Chinese Bike Frame
I’ve recently decided to change my bike frame as I developed a tendonitis due to my beloved Felt F95 actually being too big. As we are also looking to buy a house, my budget was quite limited. This put a nice shiney Cannondale SystemSix well out of my reach, so I decided to give a Chinese frame a try.
This is not as shocking as it sounds because of the realities of the bike market.
Magicforce Smart Keyboard Review
I’ve got myself a new toy - a mechanical keyboard. More specifically it is a 69-key Magicforce Smart, with Gateron MX Brown switches. I choose for a few reasons:
- I have colleague with one, so I know it is good.
- It was the a good price - I paid about €70
- It was one of the few QWERTY UK layout keyboards I found on Amazon France.
I’ve fancied a mechanical keyboard for a while, but could never really justify it. For work I always took what I was given as long as it was QWERTY, and for home I did not use it enough to justify spending the money. However, since I work from home for Oxalide they give me a monthly budget to spend on these things, so I decided to use it.
Replace Failed Kubernetes Etcd Member
I had a pretty knotty problem in my homelab. I am running a Kubernetes cluster in the with 3 masters and an embeded Etcd cluster. That means that the Etcd cluster runs on the same nodes as the K8s API and scheduler pods. Like them, it is running as Pods controlled directly by Kubelet (magic! except it isn’t). The data on one of those members (node3) got corrupted, so naturally it would no longer join the cluster.
Kubernetes Metrics Server Problem
A simple fix for something quite annoying. I set up HPA on some deployments and it did not work.
HPA uses the metrics-server to decide when to scale a deployment, but the logs for the metrics-server pod were saying:
unable to fully collect metrics: unable to fully scrape metrics from source kubelet_summary:kube: unable to fetch metrics from Kubelet kube (kube): Get https://kube:10250/stats/summary/: x509: certificate signed by unknown authority
read more
Lezyne MiniGPS Review
Surprisingly for someone that is a professional geek, I actually do not really like having stats in front of me when I ride my bike. As such for years I have been happilly using a basic wireless computer from Decathlon. It was small, simple, cheap and I only changed the battery once in a blue moon. It told me how fast I was going, and the time. That is all I need and I was happy. I like to geek out, but I do that afterwards - my phone and Strava work fine for that.
Clean Old Exported Resources From Puppetdb
Exported Resources are great, but also suck. If you are not careful how you tag them, you can easily end up in a situation where you have duplicate resources on a node. Of course this will mean that your catalogue will fail to compile.
Normally, old exported resources are cleaned up the next time the agent runs, but can be prone to failure for various reasons:
- the node no longer exists
- the moon is no longer on the right phase
- Puppet just doesn’t feel like it
This means you get a big red error such as:
Extend cached Logical Volume
You cannot do this directly for reasons that I have not tried to understand, but I suspect “it is hard” may have something to do with it.
The process is:
- Mark your cached LV as
uncached
- Extended your LV
- Recreate your cache
Simple, except there are some gotchas. The process of uncaching your LV will delete your cache volumes, so you may need to find out how you previously created them. I used: