Skip to content

Instantly share code, notes, and snippets.

View rmb938's full-sized avatar

Ryan Belgrave rmb938

  • Software Engineer @Optum
  • Minneapolis, MN
View GitHub Profile
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Mar 10 00:13:34 consul-server1 consul[30687]: http: Request GET /v1/health/service/k8s-kublet (256.27µs) from=[::1]:44184
Mar 10 00:13:34 consul-server1 consul: 2017/03/10 00:13:34 [DEBUG] http: Request GET /v1/health/service/k8s-kublet (256.27µs) from=[::1]:44184
Mar 10 00:13:34 consul-server1 consul[30687]: http: Request GET /v1/health/service/node_metrics (827.615µs) from=[::1]:44184
Mar 10 00:13:34 consul-server1 consul: 2017/03/10 00:13:34 [DEBUG] http: Request GET /v1/health/service/node_metrics (827.615µs) from=[::1]:44184
Mar 10 00:13:34 consul-server1 consul[30687]: http: Request GET /v1/health/service/vault (236.03µs) from=[::1]:44184
Mar 10 00:13:34 consul-server1 consul: 2017/03/10 00:13:34 [DEBUG] http: Request GET /v1/health/service/vault (236.03µs) from=[::1]:44184
Mar 10 00:13:34 consul-server1 consul: 2017/03/10 00:13:34 [DEBUG] http: Request GET /v1/health/service/consul (306.503µs) from=[::1]:44184
Mar 10 00:13:34 consul-server1 consul[30687]: http: Request GET /v1/health/service/consul (30
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kube-router
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kube-router
subjects:
#!/bin/sh
set -e
USAGE="USAGE: $(basename "$0") [run|edit] <docker_run_params>"
GOSS_FILES_PATH="${GOSS_FILES_PATH:-.}"
info() { echo -e "INFO: $*"; }
error() { echo -e "ERROR: $*";exit 1; }
$ ./bin/deli project list --limit 2
+------+--------------------------------------+
| NAME | ID |
+------+--------------------------------------+
| w003 | ca3a3495-00ec-4388-b549-430dfe895256 |
| w002 | dc15173f-a76e-401f-be8d-aa05d05385ff |
+------+--------------------------------------+
Next Page Marker
dc15173f-a76e-401f-be8d-aa05d05385ff
Ryan@Ryan-PC MINGW64 /e/Dropbox/go/src/github.com/sandwichcloud/deli-cli (master)
$ ./bin/deli image create test6 moo6
?[36mINFO?[0m[2017-09-23T17:29:31-05:00] Image 'test6' created
sandwich=# select * from networks;
id | name | port_group | state | cidr | pool_start | pool_end | gateway | dns_servers
--------------------------------------+-----------+------------+----------+------------------+----------------+-----------------+-----------------+-------------------
e4938219-ffb5-4188-a760-55e4081732da | testnet | moo | CREATING | 192.168.200.0/24 | 192.168.200.20 | 192.168.200.253 | 192.168.200.254 | {8.8.8.8}
68dc8382-9a64-4b6d-80e6-b128f2f6f4fc | testnet1 | moo1 | CREATING | 192.168.200.0/24 | 192.168.200.20 | 192.168.200.253 | 192.168.200.254 | {8.8.8.8}
cbb5a9b9-7dec-4c64-9c45-14a27dd26145 | testnet2 | moo2 | CREATING | 192.168.200.0/24 | 192.168.200.20 | 192.168.200.253 | 192.168.200.254 | {8.8.8.8}
90d7ea6d-8f14-437d-812c-d1c0f01777ed | testnet3 | moo3 | CREATING | 192.168.200.0/24 | 192.168.200.20 | 192.168.200.253 | 192.168.200.254 | {8.8.8.8}
b826b197-a02d-4d8a-953c-3c
@rmb938
rmb938 / event.py
Created February 11, 2019 22:59
Implementation of the EventBroadcaster from client-go but using python. It isn't an exact replica but is good enough for my use case.
import enum
import socket
import typing
import arrow
import pylru
from kubernetes import client
MAX_LRU_CACHE_SIZE = 4096
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3559, ...}) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3559, ...}) = 0
write(1, "root 2094 0.0 0.0 10812 "..., 179root 2094 0.0 0.0 10812 2112 ? Sl Mar28 0:02 containerd-shim -namespace k8s.io -workdir /data/var/lib/containerd/io.containerd.runtime.v1.linux/k8s.io/707fec6
) = 179
stat("/proc/2116", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/2116/stat", O_RDONLY) = 6
read(6, "2116 (configmap-reloa) S 2094 21"..., 2048) = 293
close(6) = 0
open("/proc/2116/status", O_RDONLY) = 6
read(6, "Name:\tconfigmap-reloa\nUmask:\t002"..., 2048) = 1326
# strace -f -p 2344
strace: Process 2344 attached with 20 threads
[pid 2862] futex(0xc4202a3548, FUTEX_WAIT, 0, NULL <unfinished ...>
[pid 2496] futex(0xc42008c948, FUTEX_WAIT, 0, NULL <unfinished ...>
[pid 2494] futex(0xc4202a2948, FUTEX_WAIT, 0, NULL <unfinished ...>
[pid 2493] futex(0xc4202a2548, FUTEX_WAIT, 0, NULL <unfinished ...>
[pid 2404] futex(0xc42037d548, FUTEX_WAIT, 0, NULL <unfinished ...>
[pid 2402] futex(0xc42037d148, FUTEX_WAIT, 0, NULL <unfinished ...>
[pid 2384] futex(0xc42037cd48, FUTEX_WAIT, 0, NULL <unfinished ...>
[pid 2382] futex(0xc42037c948, FUTEX_WAIT, 0, NULL <unfinished ...>