Skip to content

Instantly share code, notes, and snippets.

View frimik's full-sized avatar

Mikael Fridh frimik

  • Electronic Arts / DICE
  • Uppsala, Sweden
View GitHub Profile

Keybase proof

I hereby claim:

  • I am frimik on github.
  • I am frimik (https://keybase.io/frimik) on keybase.
  • I have a public key ASDV4EMGtVVLqWX4UEYlqjXfmgc8XSt6O0btr6gEULmNxQo

To claim this, I am signing this object:

@frimik
frimik / plugin.yml
Last active November 8, 2022 09:20
k9s plugin.yml
# $XDG_CONFIG_HOME/k9s/plugin.yml
plugin:
# Annotate current object with a Flux ignore annotation
fluxdepignore:
# Define a mnemonic to invoke the plugin
shortCut: Shift-I
# What will be shown on the K9s menu
confirm: true
description: Flux Ignore
@frimik
frimik / Makefile
Last active June 30, 2022 11:49
linkerd2-cni on Kubernetes via Grafana Tanka hackery.
.PHONY: vendor-cni
vendor-cni:
vendir sync
mkdir gitvendor/charts/linkerd2-cni/charts
mv gitvendor/charts/partials gitvendor/charts/linkerd2-cni/charts/partials
patch-cni:
patch -p0 <install-cni-delete-event.patch
@frimik
frimik / Tilt.log
Created December 26, 2020 08:14
Tilt.dev, Tanka, Jsonnet experiments.
Beginning Tiltfile execution
local: tk eval environments/default -e '_tilt'
→ {
→ "megaproxy": {
→ "port_forwards": [
→ {
→ "link_path": "/haproxy/stats",
→ "name": "health",
→ "port": 8404
→ }
@frimik
frimik / README.md
Last active June 12, 2020 02:16
k3d ubuntu systemd-resolved DNS hacks

DNS Hack for Ubuntu

The problem

Going on and off VPN, things work, then they don't work... general annoying. Containers can't resolve... and when you might make containers resolve, then containers in containers (k3d) can't resolve...

It seems I got things working... I can go on and off VPN, name resolution works essentially the same on the Host as in Docker and the Kubernetes (k3d) nodes and the k3d kubernetes containers.

On the host I have per-interface DNS servers via systemd-resolved that takes care of it.

@frimik
frimik / ecs-cloudstor-install.sh
Last active April 9, 2020 16:12
Install CloudStor plugin on Amazon ECS Optimized AMI Instance
#!/bin/bash
set -ex
if [ $# -ne 2 ]; then
echo "Usage: $0 EFS_ID_REGULAR EFS_ID_MAXIO"
exit 1
fi
EFS_ID_REGULAR=$1
#!/bin/bash
#
# get_secret (c) 2019 Fulhack industries.
#
# Author: Mikael Fridh
#
# Half inspired half stolen from somewhere, can't remember exactly.
#
# Use in scripts like:
# get_secret vpn_password "VPN password" [username]
@frimik
frimik / k3d-setup.sh
Created September 17, 2019 17:56
Local K3D (k3s) cluster base
#!/bin/bash
CLUSTER_NAME="k3s-default"
# Install k3d
k3d --version || wget -q -O - https://raw.githubusercontent.com/rancher/k3d/master/install.sh | bash
# verify it
k3d check-tools
# create a volume and cluster
@frimik
frimik / README.md
Last active August 23, 2017 14:56
Aurora Scheduler / Mesos Master SSL and Auth solution

About

Aurora Scheduler consists of 5 instances across 5 nodes usually. Usually there is a zookeeper instance on each of those 5. Maybe you also have 5x Mesos Master instances on the same nodes.

Now you want SSL ... and AUTH on those!? Tough luck ...

The documentation discuss making the scheduler listen on 127.0.0.1:8081 and putting an nginx on each of the nodes listening on 0.0.0.0:8081 or the node IP. I forget which. Now you'll think - ok - what happens to "sane hostnames", "hostnames matching certificate CN"?

@frimik
frimik / aurora.py
Last active July 5, 2017 13:45 — forked from zircote/aurora.py
WIP DataDog check for Apache Aurora
"""
Aurora Scheduler check
Collects metrics from aurora scheduler.
"""
import requests
from checks import AgentCheck, CheckException
class AuroraCheck(AgentCheck):