Rapid Kubernetes Controller Development with Tilt

Welcome dear reader. Today, we are going to dive into how to use Tilt to speed up the feedback loop of developing a Kubernetes controller. We are going to do that using an open-source project called OCM which has a controller called ocm-controller. I’m going to walk through the following process: researching tilt what it could do for me understanding the Tilt file trivial mapping of the developer process understanding Starlark adding more features tackling hot swapping troubleshooting Let’s dive in....

February 25, 2023 · 23 min · hannibal

Forming the habit of analog journaling - Why the digital format did not work for me

You can see, I wasn’t able to decide on a title. That’s because I wanted to express more than a “How to get started with Journaling” kind of vibe. There are a lot of posts about that already. Rather, this post depicts my struggle to get into this habit. TL;DR It turned out that it took way too long to get into writing a simple entry with too many steps. Taking out a notebook and starting to write is a lot faster and cheaper....

January 4, 2023 · 9 min · hannibal

Generate a sample YAML file from a CRD

Hello. This one is a quick update. Just a showcase really. I wrote a tool to generate a sample YAML file from a CRD. Given a CRD like this one, it would output a generate yaml sample like this: apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 kind: AWSCluster metadata: {} spec: additionalTags: {} bastion: allowedCIDRBlocks: ["string"] ami: string disableIngressRules: true enabled: true instanceType: string controlPlaneEndpoint: host: string port: 1 controlPlaneLoadBalancer: additionalSecurityGroups: ["string"] crossZoneLoadBalancing: true healthCheckProtocol: string name: string scheme: string subnets: ["string"] identityRef: kind: AWSCluster name: string imageLookupBaseOS: string imageLookupFormat: string imageLookupOrg: string network: cni: cniIngressRules: - description: string fromPort: 1 protocol: string toPort: 1 securityGroupOverrides: {} subnets: - availabilityZone: string cidrBlock: string id: string ipv6CidrBlock: string isIpv6: true isPublic: true natGatewayId: string routeTableId: string tags: {} vpc: availabilityZoneSelection: string availabilityZoneUsageLimit: 1 cidrBlock: string id: string internetGatewayId: string ipv6: cidrBlock: string egressOnlyInternetGatewayId: string poolId: string tags: {} region: string s3Bucket: controlPlaneIAMInstanceProfile: string name: string nodesIAMInstanceProfiles: ["string"] sshKeyName: string status: bastion: addresses: - address: string type: string availabilityZone: string ebsOptimized: true enaSupport: true iamProfile: string id: string imageId: string instanceState: string networkInterfaces: ["string"] nonRootVolumes: - deviceName: string encrypted: true encryptionKey: string iops: 1 size: 1 throughput: 1 type: string privateIp: string publicIp: string rootVolume: deviceName: string encrypted: true encryptionKey: string iops: 1 size: 1 throughput: 1 type: string securityGroupIds: ["string"] spotMarketOptions: maxPrice: string sshKeyName: string subnetId: string tags: {} tenancy: string type: string userData: string volumeIDs: ["string"] conditions: - lastTransitionTime: string message: string reason: string severity: string status: string type: string failureDomains: {} networkStatus: apiServerElb: attributes: crossZoneLoadBalancing: true idleTimeout: 1 availabilityZones: ["string"] dnsName: string healthChecks: healthyThreshold: 1 interval: 1 target: string timeout: 1 unhealthyThreshold: 1 listeners: - instancePort: 1 instanceProtocol: string port: 1 protocol: string name: string scheme: string securityGroupIds: ["string"] subnetIds: ["string"] tags: {} securityGroups: {} ready: true The link to the repo is here....

October 19, 2022 · 2 min · hannibal

Summary of Common Sense guide to Data Structures and Algorithms

Hello! I’ve been working on something extensive these days. Like my Grokking Algorithms summary, I now moved on to read Common-Sense Guide to Data Structures and Algorithms. As with Grokking, I created a Go based repo and added notes for each chapter. The repo can be located here. Enjoy, and thanks for reading. Gergely.

September 25, 2022 · 1 min · hannibal

How to contribute to a new repository

How to contribute to a new repository Hello Dear readers. Today, I’m going to walk you through a process of contributing into a new repository. If you are new to Go development and would like to contribute somewhere but are at a loss in large repositories, this post will be for you. I selected the top repository in trending Go today. Which is istio. I think that’s sufficiently large and I have no idea about the repository, so I’m going to walk you through my process....

July 1, 2022 · 6 min · hannibal

Hacking on CAPA - The journey of implementing a nontrivial feature in a barely known codebase

Hacking on CAPA - The journey of implementing a nontrivial feature in a barely known codebase Hello Dear readers. Today, I would like to write about a project I’ve been working on these past months or so. This is a longer story and hopefully an interesting one to read. I’m going to write about the journey I took while trying to implement IPv6 based Kubernetes cluster for CAPA and EKS....

June 26, 2022 · 14 min · hannibal

Dependabot Bundler

Hello Dear readers. Today, I would like to write about a small pet project of mine called Dependabot Bundler. We’ve all been here: You would like to review these individually, of course, however, having to individually merge them is quite the pain. Isn’t it a lot better to do this instead? A lot nicer and more comfortable, isn’t it? This is done by running dependabot-bundler with the following command: ./bundler --token ${GITHUB_TOKEN} --repo eksctl --owner weaveworks --author-name Skarlso --author-email gergely@weave....

May 16, 2022 · 1 min · hannibal

Reader's Digest - January with Grokking Algorithms Go Generics Repository

Hello Dear readers. Today’s reader’s digest comes with a repo and some code too! Let’s dive in. Reader’s Digest - January Immune Immune is an absolutely fabulous book. It’s amazing and in time of this pandemic a healthy read to boot. I love biology, but never went too deep into it. This book fascinated me with its colorful images, the style of Kurzgesagt story telling and the man himself, who is the voice of Kurzgesagt....

January 26, 2022 · 3 min · hannibal

Providers Pattern

Hello Dear readers. Today, I would like to write about a project design pattern I’ve been using successfully over the past years for various projects. It has many variations and it has some design patterns that are commonly found in the wild, so there is nothing really special about it. Let’s begin. Providers Pattern What is this pattern anyways? It’s a pattern I learned while working at ArangoDB. It’s quite nice and defines package abstractions wonderfully....

December 21, 2021 · 9 min · hannibal

Advent Of Code - Day 12 - Updated

Advent Of Code - Day 12 - Updated A comment from one of my readers prompted me to revise my solution on this trying to do part 2. The suggestions was that instead of using a struct as seen, use int and keep track of the count for small caves that way. I started to do that but got into various problems along the way when I got frustrated with my code, deleted the whole thing and begun again....

December 17, 2021 · 7 min · hannibal