This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## Origin: https://raw.githubusercontent.com/moby/moby/master/contrib/download-frozen-image-v2.sh | |
# We extend our path to include local directory to ease jq finding. | |
export PATH=$PATH:. | |
# List of external commands we need currently | |
NEEDCMD=( | |
curl jq awk sha256sum uname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# If only one argument is given when calling this script, we do a namespace switch. | |
# If a second argument exists when calling this script, we do a cluster switch. | |
# When switching clusters, alert the user if that cluster is not found. | |
# The trap provides the current context on exit. The context names are sorted to provide consistency. | |
LRED=$(echo -en '\033[01;31m') | |
RESTORE=$(echo -en '\033[0m') | |
trap 'CURRENT_CONTEXT=$(kubectl config current-context) && echo && kubectl config get-contexts | head -n1 && kubectl config get-contexts | sed 1d | sort --key=1 -b | sed "s|\*\(.*\)${CURRENT_CONTEXT}\(.*\)$|${LRED}\*\1${CURRENT_CONTEXT}\2${RESTORE}|g"' 0 1 3 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bcc/proto.h> | |
#include <uapi/linux/ip.h> | |
#include <uapi/linux/ipv6.h> | |
#include <net/inet_sock.h> | |
//Newer kernel bug so need to #define before including ip_fib.h | |
#define KBUILD_MODNAME "foo" | |
#include <net/ip_fib.h> | |
#include <linux/netfilter/x_tables.h> | |
#define ROUTE_EVT_IF 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\n | |
time_namelookup: %{time_namelookup}\n | |
time_connect: %{time_connect}\n | |
time_appconnect: %{time_appconnect}\n | |
time_pretransfer: %{time_pretransfer}\n | |
time_redirect: %{time_redirect}\n | |
time_starttransfer: %{time_starttransfer}\n | |
----------\n | |
time_total: %{time_total}\n | |
\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bcc/proto.h> | |
#include <uapi/linux/ip.h> | |
#include <uapi/linux/ipv6.h> | |
#include <uapi/linux/icmp.h> | |
#include <uapi/linux/tcp.h> | |
#include <uapi/linux/udp.h> | |
#include <uapi/linux/icmpv6.h> | |
#include <net/inet_sock.h> | |
#include <linux/netfilter/x_tables.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# The access this gives you is rather terrifing. Use sparingly. | |
# | |
set -e -x | |
node=$1 | |
trap "kubectl delete pod nodesh-$node" EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import sys | |
from socket import inet_ntop, AF_INET, AF_INET6 | |
from bcc import BPF | |
import ctypes as ct | |
import subprocess | |
import struct | |
from struct import pack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bcc/proto.h> | |
#include <uapi/linux/ip.h> | |
#include <uapi/linux/ipv6.h> | |
#include <net/inet_sock.h> | |
//Newer kernel bug so need to #define before including ip_fib.h | |
#define KBUILD_MODNAME "foo" | |
#include <net/ip_fib.h> | |
#include <linux/netfilter/x_tables.h> | |
#include <net/route.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env python | |
# coding: utf-8 | |
import sys | |
from socket import inet_ntop, AF_INET, AF_INET6 | |
from bcc import BPF | |
import ctypes as ct | |
import subprocess | |
import struct | |
from struct import pack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: ssm-agent | |
namespace: kube-system | |
labels: | |
k8s-app: ssm-agent | |
spec: | |
selector: | |
matchLabels: |
NewerOlder