Developing Go Services For Kubernetes with Telepresence and konfig

The Problem As a developer when you are working on a Kubernetes application on your local machine, if you want to test or debug something, you have the following options: A full environment running using docker-compose. A full environment running in a local Kubernetes cluster (Minikube or Docker-for-Desktop) Pushing instrumented code, building, testing, and deploying to a dev Kubernetes cluster through CI/CD pipeline. The problem with the first two options is the environment you get is not close by any means to your actual final environment (staging and production)....

Mar 4, 2020 · 4 min · Milad Irannejad

Dynamic Configuration Management and Secret Injection with konfig

TL;DR Dynamic configuration management and secret injection refer to updating an application with new configurations and secrets in a non-disruptive way. Kubernetes ConfigMaps and Secrets mounted as files into containers will be updated with new values automatically. konfig makes dynamic configuration management and secret injection very easy to implement and use for Go applications. The Problem Dynamic configuration management and secret injection refer to a situation that your application can update its configurations and secrets without needing a restart....

Mar 4, 2020 · 5 min · Milad Irannejad

Zero-Config Configuration Management

konfig is a minimal and unopinionated configuration management library for Go applications. It is based on The 12-Factor App. I created this library as a response to repeating myself across almost every single service and application. It is a very minimal and lightweight library for reading configuration values either from command-line arguments, environment variables, or files. It uses reflection to automatically convert the input values to the desired types defined in Go....

Mar 4, 2020 · 8 min · Milad Irannejad

Compilers 101 in Go

Theory What is a Language? Every Language is defined by specifying four sets: Alphabet The most primitive building block of a language is its alphabet. An alphabet is a finite set of symbols. The alphabet for English consists of letters A to Z (both capital and small) as well as punctuation marks. The alphabet for a programming language includes characters A to Z, a to z, and other characters such as -, +, *, /, ‘, “, etc....

Sep 2, 2019 · 17 min · Milad Irannejad

gRPC in Microservices

I have been working with a microservices application using gRPC as the main service-to-service communication mechanism for almost a year. So, I decided to write a blog post and share my experience on how to do gRPC right in a microservices world! So, let’s get started! TL;DR DRY! Have a package for your common messages. Choose unique names for your gRPC packages. Choose singular names for your gRPC packages. Distinguish your gRPC package names with a prefix or suffix....

Jun 1, 2019 · 11 min · Milad Irannejad