Fixed claim-to-volume binding strategy in Kubernetes

The problem In order to explain the challenge I will walk you through parts of Elasticsearch cluster setup. Later I will show the solution that will involve deeper understanding of naming convention that Kubernetes uses to render Persistent Volume Claim templates into Persistent Volume Claims, and binding these claims to concrete Persistent Volumes in a fixed fashion. What’s given Storage This is how storage class is defined: 1 2 3 4 5 6 apiVersion:storage.

How to disable/enable touchpad on Linux

Sometimes it is not easy to disable/enable touchpad on a laptop running Linux. Certainly that was the case for my new Dell XPS. So, here is what I came up with to make my life easier: To disable all touchpad devices: 1 2 3 xinput list | grep -i touchpad | \ awk '{print $6}' | awk -F '=' '{print $2}' | \ xargs -rn 1 -I {} xinput --disable {} To enable all touchpad devices:

Baking Docker Client into Image

Sometimes, you might need to have a slim image with only docker client instead of full docker engine. And since it is not available through package repositories like aptitude here is what you can do instead: 1 2 3 4 5 6 7 8 FROMalpine:3.7RUN apk update && \ apk add curl && \ curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-17.09.0-ce.tgz && \ apk del curl && \ tar -xzvf docker-17.

Building statically linked binaries in Haskell with Docker

One of the attractive features of Go is that it builds your projects as statically linked binaries by default when possible. Which has a very convenient side-effect - it is simple to containerize. On the other hand, there is the most obvious trade-off to it - it is not reusing dependencies installed in the Operating System, but instead bundles everything into single binary. Unfortunately, traditionally it is not as simple in Haskell as in Go.

Markdown slideshow with Reveal.js in NixOS

mdslider is here to help produce a nice slides with plain markdown. It will be interesting to those not so interested in fiddling with raw html or javascript. It is based on Reveal.js and created as a NixOS package. Installing Building and installing mdslider is as easy as running following commands on your NixOS: 1 2 3 $ git clone https://github.com/kuznero/mdslider ./ $ nix-build shell.nix $ nix-env -i .