Skip to content

Instantly share code, notes, and snippets.

View derekparker's full-sized avatar

Derek Parker derekparker

View GitHub Profile
@derekparker
derekparker / test.c
Last active October 13, 2015 05:18
This is just a test for my blog
#include <stdlib.h>
#include <signal.h>
static void signal_handler(int sig){
puts("oh no!");
exit(EXIT_SUCCESS);
}
int main(int argc, const char **argv){
signal(SIGINT, signal_handler());
@derekparker
derekparker / advisory_locks.rb
Last active December 19, 2015 18:38
Script for show and tell for Postgres Advisory Locks
require 'active_record'
class ObtainerOfLocks
class << self
def lock_it_up
initiate_useless_connection
2.times do
fork do
exclusive { puts 'Lock obtained.' }
### Keybase proof
I hereby claim:
* I am derekparker on github.
* I am dparker (https://keybase.io/dparker) on keybase.
* I have a public key whose fingerprint is 7F9D C7D5 8E54 7532 B767 7606 DA4E 6BEE 784D 232A
To claim this, I am signing this object:
set number
set nolist
" set background=dark
colorscheme apprentice
let g:go_fmt_command = "goimports"
filetype plugin indent on
let delimitMate_expand_cr = 1
let delimitMate_jump_expansion = 1
" 'apprentice.vim' -- Vim color scheme.
" Maintainer: Romain Lafourcade (romainlafourcade@gmail.com)
" Essentially a streamlining and conversion to X11 colors of
" 'sorcerer' by Jeet Sukumaran (jeetsukumaran@gmailcom)
" MADE-UP NAME HEX XTERM ANSI
" ==================================================
" almost black #1c1c1c 234 0
" darker grey #262626 235 background color
" dark grey #303030 236
alias mux="tmux attach-session -t "
alias tls="tmux ls"
alias tkill="tmux kill-session -t "
alias dcd="mkdir $1; cd $1"
alias esub="exercism submit -a"
alias lh="ls -lh"
alias git="/usr/local/Cellar/git/1.9.0/bin/git"
# alias vim="nvim"
# Golang setup
fatih/vim-go
sickill/vim-monokai
baverman/vim-babymate256
SirVer/ultisnips
xolox/vim-misc
xolox/vim-notes
kien/ctrlp.vim
vicramon/vim-quickdraw
altercation/vim-colors-solarized
Valloric/YouCompleteMe
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Afterglow</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@derekparker
derekparker / nvim
Last active November 14, 2015 23:17
filetype plugin indent on
syntax off
set nu
if has('gui_running')
colorscheme apprentice
endif
let g:go_fmt_command = "goimports"

Proposal: Self-hosted kubernetes components

Abstract

A Kubernetes deployment has many of the same considerations as a normal application deployment using Kubernetes. It should therefore be possible to deploy Kubernetes with kubernetes. This will make cluster installation and updating vastly simpler. From this point forward, Kubernetes installed by Kubernetes will be referred to as "self-hosted", or "managed".

Background

Our current approach to self-hosting Kubernetes is a "pivot" style installation procedure. Briefly, the following steps summarize a generic outline for this installation procedure (it is assumed that a functional etcd cluster exists somewhere):