Rotating Github (Action) secrets

So, here’s a fun problem I ran into at work: We use Github Actions to deploy all our services to Kubernetes. And in order to do a deployment, we have kube configs (as secrets) setup to connect to a Kubernetes cluster when a workflow runs. The Kubernetes config has an expiration date and will become invalid when the Kubernetes certificates are rotated (k0s takes great care of that). When they expire, the deploys fail until we update the secret on Github Actions....

February 11, 2024 · 5 min

Terraform and OpenStack: Boot an instance from CD-ROM

In the spirit of “this took me way too long”, here’s how to boot an instance with a CD-ROM on OpenStack, using Terraform. Why would I need this? In a perfect world, I have templates to bootstrap instances. Means, the instances are ready to go when booted. I customise them with cloud-init and let them do all kinds of cool (or necessary) stuff like configuring the network, setting hostnames, adding user accounts and then maybe joining them to a cluster....

May 13, 2021 · 3 min

Terraform: Resource not found

Here’s a few things I learned and did when I encountered the very verbose “Resource not found” error from Terraform. Debug your Infrastructure as Code More logs? This is my obvious choice or go-to. Terraform comes with different log levels though it will say itself that every level but TRACE is not to be trusted? 2021/03/02 09:21:33 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility....

March 2, 2021 · 3 min

Ansible Galaxy: Install private roles from private GitHub repositories

When I googled how to install private roles using ansible-galaxy, I found suggestions such as, “use git+https://github.com/…” or even better, “I am not sure what you’re doing, but it works for me (since Ansible 2.2)”. So, since neither of these suggestions helped me and because I am unable to find documentation with obvious examples, here is how you achieve this. Assuming you have your ssh key and configuration figured out, put this into requirements....

June 30, 2020 · 1 min

Prometheus: relabel your scrape_config

Prometheus labels every data point — the most well-known example of a label is (probably) instance. Take a look at this query result (query: up{job="prometheus"}): up{instance="127.0.0.1:9090",job="prometheus"} 1 So what does this tell me? I queried for the “up” metric and filtered it for “prometheus” — yay. The “1” says, my service is alive. So far so gut. Readability Since we are in the process of running a few Prometheus servers (in federation), each of those metrics will report back with instance="127....

April 22, 2020 · 2 min