Parallel

Apparently there are two Unix-y ways to run commands in parallel: GNU parallel: https://www.gnu.org/software/parallel/ moreutils parallel: https://www.gnu.org/software/parallel/ ...

July 24, 2024 · 206 words · Thiago Perrotta

kubectl: get all logs from all pods

Frequently: kubectl logs -n argocd argocd-repo-server-5d59975687-dxnh7 But how do you know what hash to use after server-? ...

July 15, 2024 · 170 words · Thiago Perrotta

kubectl: get secret with jsonpath and add a newline

When retrieving opaque secrets with kubectl, one will often invoke this typical command: ubuntu@ubuntu:~ $ kubectl get secret -n argocd argocd-github-webhook-secret -o jsonpath='{.data.value}' eW91IGFyZSBjdXJpb3VzIGFyZW50IHlvdQ==ubuntu@ubuntu:~ $ But isn’t this ugly? The prompt is concatenated with the output. ...

July 9, 2024 · 142 words · Thiago Perrotta

Terraform: perform a global update

Given a terraform/modules directory tree, we would like to globally update the minimum required terraform version in all modules. ...

July 2, 2024 · 52 words · Thiago Perrotta

Explain a crontab expression

Given, for example, 0 0 * * *, how do you figure out when it will run? ...

July 1, 2024 · 71 words · Thiago Perrotta

Localhost domain

If you find yourself in a situation wherein http://localhost:1313 has issues, you can use a domain that redirects to localhost. For example: http://localdev.me:1313/ http://demo.localdev.me:1313/ ...

July 1, 2024 · 118 words · Thiago Perrotta

Bcrypt-hash a password

Given the password correct horse battery staple, we would like to bcrypt-hash it. XKCD Courtesy of Randall Munroe ...

June 6, 2024 · 65 words · Thiago Perrotta

★ Github actions workflow

This post exemplifies an efficient workflow to shorten the edit-refresh loop when dealing with github actions. ...

May 28, 2024 · 366 words · Thiago Perrotta

Terraform: AWS deployment to random availability zones

A common scenario: there’s a new deployment you would like to roll out to AWS. Let’s say you pick “us-east-1” as your cloud region. There are multiple availability zones within it: us-east-1a us-east-1b us-east-1c us-east-1d us-east-1e us-east-1f Suppose you want to pick two of them for your service/app, and you don’t particularly care about which one. How to proceed? ...

May 21, 2024 · 240 words · Thiago Perrotta

Adding a healthcheck to chartmuseum in AWS Fargate

Assume that you have a Chartmuseum container running in AWS Fargate. Chartmuseum is a repository for helm charts. AWS Fargate is an Amazon service to run containers (“serverless”), being part of ECS (Elastic Container Service). Problem statement: Add a container healthcheck to the chartmuseum task definition associated with the container. ...

May 17, 2024 · 165 words · Thiago Perrotta