Ramblings of a cloud engineer

Welcome to my little corner of the internet.

External Secrets Operator template rendering tool

External Secrets Operator template rendering tool Once this1 pull request is merged, ESO will be extended with a tool that has the ability to render templates in an object. Let’s step back a little… what are templates even? But… what is ESO even? Okay, so… ESO is external-secrets-operator2. It’s Kubernetes operator than can sync secrets between an external provider, like AWS Parameter/Secret Store, and a cluster. This is bi-directional. Meaning ESO can sync the secret back as well using something called a PushSecret3. The secret will then be pushed to the provider. This way, secrets can be backed up or straight Generated4 to provide ephemeral access to certain resources. ...

January 11, 2025 · 2 min · hannibal

Missing out on jobs because of LeetCode

Missing out of jobs because of LeetCode At the end of the last year, my previous workplace ( Weaveworks ) went bankrupt. I found myself without a job. I didn’t have to interview for a long time and I certainly wasn’t planning on it any time soon. I enjoyed my work. Thus, I started to learn a bit because I forgot how to interview. I refreshed my knowledge on LeetCode, I did some exercises, I read some books, post, whatever. I refreshed my algo knowledge because that’s what people most likely will ask, right? ...

January 9, 2025 · 2 min · hannibal

Notetaking with ADHD

Notetaking with ADHD After several years, I finally have my official diagnosis. ADHD. I had it as a kid as well, in hindsight, it was pretty fucking obvious. I could reminisce about those days for a long time. How things now fit together, how everything suddenly fell into place. Why the things happened to me as they did and how I was always always in the middle of every shit-storm. ...

January 8, 2025 · 2 min · hannibal

CORScapade; the story why cty doesn't support git flow on web

CORScapade; the story why cty doesn’t support git flow on web Recently, I implemented git based discovery for cty. It means, that the user can provide a git repo URL and cty will clone the content and look for any valid CRDs and discover them. I wanted ot provide this through the front-end as well. However, I ran into some issues… CORS Plain HTTP requests are working fine only if raw.githubusercontent.com is being used. That service doesn’t have CORS. ...

January 7, 2025 · 3 min · hannibal

Using ORAS as a library to interact with OCI repositories

Introducing ORAS into a Library This post talks about using ORAS as a library to interact with OCI repositories. First and foremost I like to keep things simple. I was seeing basic usages around the project I’m working in and some common behaviour that started to emerge. Looking at that behaviour I drawn a preliminary interface. This interface is also something similar that docker remote implementation has in containerd. Looks something like this: ...

January 6, 2025 · 10 min · hannibal

Write something every day

This year I want to do somerhinf different. For the whole year I’ll attempt to write a blogpost everyday. I might miss a day during holiday or being sick or something but the point is that by the end of the year I should have at least 365 blog posts. I also want them to be somewhat meaningful so be about some kind of technology or discovery or whatever. So posts like ‘This is a post’ are not valid. ...

January 5, 2025 · 1 min · hannibal

Add Suggest Edit to Posts

Added Suggest Edit to Post link to all my posts I added “Suggest edit” to all my posts in a way to open my blob to the community. I accept all kinds of contriubtions be they simple grammar fixes or more accurate descriptions of something. Feel free to suggest changes. I’m also toying with the idea of accepting completely new content but that remains to be seen. Thank you, and have a happy new year! ...

January 2, 2025 · 1 min · hannibal

Quickly delete all packages from GitHub registry using a blob

Script to remove GitHub registry images Hey, though I quickly just share a script to get rid of packages you don’t want anymore from your GitHub registry. #!/bin/bash set -e # Variables OWNER=$1 # Replace with your GitHub username or organization name PACKAGE_GLOB=$2 # Glob pattern for package names passed as an argument (e.g., "package*" to match all) # makes sure that important packages are not removed by accident contains() { found=1 array=(place-very-important-packages-here-to-make-sure-they-are-not-deleted) for v in "${array[@]}" do if [[ "$1" == "$v" ]]; then echo "$v found not deleting" found=0 break fi done } # Function to delete a package version delete_package_version() { contains "$1" # echo "found: $found" if [[ $found -eq 1 ]]; then name=${1//\//%2F} echo "deleting package with name: $name" gh api -X DELETE "/user/packages/container/$name" --silent fi } # Fetch the list of all available packages for the user/organization echo "Fetching packages matching the glob pattern '$PACKAGE_GLOB'..." # Fetch all package names and filter with globbing # Change `/users/` to `organization` if you are looking at organization packages. ALL_PACKAGES=$(gh api "/users/$OWNER/packages?package_type=container" --jq '.[].name' --paginate) MATCHED_PACKAGES=$(echo "$ALL_PACKAGES" | grep "$PACKAGE_GLOB") if [[ -z "$MATCHED_PACKAGES" ]]; then echo "No packages found matching the pattern '$PACKAGE_GLOB'." exit 1 fi # echo "Deleting the following packages: ${MATCHED_PACKAGES}" # Loop through matched packages and delete them SAVEIFS=$IFS # Save current IFS (Internal Field Separator) IFS=$'\n' # Change IFS to newline char packages=($MATCHED_PACKAGES) # split the `names` string into an array by the same name IFS=$SAVEIFS # Restore original IFS for (( i=0; i<${#packages[@]}; i++ )) do delete_package_version "${packages[$i]}" done echo "All matching packages deleted!" That is all. ...

December 10, 2024 · 2 min · hannibal

Test Post - Please ignore

Hello This is just a test post to see if I did my hugo build correctly.

November 14, 2024 · 1 min · hannibal

How I track tasks with Obsidian

How I track tasks with Obsidian Hello. This will be a run-down on how I track tasks and projects and long-term things, like reading a book, tracking a project or traveling using the PARA method. Let’s get to it! Task tracking queue The way I track tasks is through a queuing system. To not get overloaded by tasks, I just simply put the next task into the queue and take out the top recent if I’m done. Unless something really urgent comes along I don’t disrupt this flow. Meaning, once I have a task out and #active that’s the task I’m going to be working on! ...

September 17, 2024 · 6 min · hannibal