Skip to content

Instantly share code, notes, and snippets.

@jpetazzo
jpetazzo / README.md
Created April 2, 2019 12:22
Route reflector for kube-router or Calico using quagga-bgpd
  • run alpine container (I used --net host --cap-add net_admin)
  • install quagga
  • run zebra and bgpd

Note: the peers have to be hard-coded in the conf. I'll update this to use frr, which should allow dynamic peers.

table inet firewalld {
chain raw_PREROUTING {
type filter hook prerouting priority -290; policy accept;
icmpv6 type { nd-router-advert, nd-neighbor-solicit } accept
meta nfproto ipv6 fib saddr . iif oif missing drop
jump raw_PREROUTING_ZONES_SOURCE
jump raw_PREROUTING_ZONES
}
chain raw_PREROUTING_ZONES_SOURCE {
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#
@jpetazzo
jpetazzo / socat.yaml
Created February 27, 2018 22:13
This will expose your Kubernetes dashboard over HTTP (stripping SSL). VERY DANGEROUS, DO NOT USE IN PRODUCTION!!!
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "2"
creationTimestamp: null
generation: 1
labels:
run: socat
name: socat
[ 16.556420] fuse init (API version 7.26)
[ 646.117651] nouveau 0000:01:00.0: disp: 0x6219[0]: INIT_GENERIC_CONDITON: unknown 0x07
[ 2135.430538] nouveau 0000:01:00.0: disp: 0x6219[0]: INIT_GENERIC_CONDITON: unknown 0x07
[ 3400.469391] nouveau 0000:01:00.0: disp: 0x6219[0]: INIT_GENERIC_CONDITON: unknown 0x07
[ 8490.902597] nouveau 0000:01:00.0: fifo: SCHED_ERROR 0a [CTXSW_TIMEOUT]
[ 8490.902609] nouveau 0000:01:00.0: fifo: runlist 0: scheduled for recovery
[ 8490.902616] nouveau 0000:01:00.0: fifo: channel 5: killed
[ 8490.902622] nouveau 0000:01:00.0: fifo: engine 0: scheduled for recovery
[ 8490.936734] nouveau 0000:01:00.0: systemd-logind[501]: channel 5 killed!
[ 8700.266211] sysrq: SysRq : Emergency Sync
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kubernetes-dashboard
labels:
k8s-app: kubernetes-dashboard
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
@jpetazzo
jpetazzo / README.md
Last active February 17, 2024 12:39
Berlin tips for visitors

What's this?

This is a bunch of tips for people traveling to Berlin.

Thanks to AJ, Katharine, Magali, for their suggestions/input. And maybe other folks I forgot!

Also thanks to all the people who told me "I'll be visiting Berlin" until it pushed me to clean up my notes and evolve them from a preciously copy-pasted, disorganized stash, to a linkable,

#!/bin/sh
SUBNET=10.4.2.254/24
DHCP_A=10.4.2.101
DHCP_Z=10.4.2.199
sudo iptables -t nat -A POSTROUTING -s $SUBNET ! -d $SUBNET -j MASQUERADE
sudo ifconfig eth0 $SUBNET
sudo dnsmasq --no-daemon --interface=eth0 --dhcp-range=$DHCP_A,$DHCP_Z,1h
@jpetazzo
jpetazzo / Dockerfile
Created February 10, 2017 13:59
volume tester
FROM alpine
COPY runme.sh /usr/local/bin
ENTRYPOINT ["runme.sh"]