Skip to content

Instantly share code, notes, and snippets.

View canthefason's full-sized avatar

Can Yucel canthefason

  • DoorDash
  • San Francisco
View GitHub Profile
@canthefason
canthefason / create-httpbin.md
Last active May 18, 2020 00:22
istio-multicluster
$ kubectl create --context=$CTX_CLUSTER2 namespace bar
$ kubectl label --context=$CTX_CLUSTER2 namespace bar istio-injection=enabled
$ kubectl apply --context=$CTX_CLUSTER2 -n bar -f samples/httpbin/httpbin.yaml

Keybase proof

I hereby claim:

  • I am canthefason on github.
  • I am canthefason (https://keybase.io/canthefason) on keybase.
  • I have a public key whose fingerprint is 328D D6D5 4917 8255 A812 A67B 08F0 2849 8E91 2C62

To claim this, I am signing this object:

@canthefason
canthefason / minion-user-data
Created September 29, 2015 04:55
Kubernetes minion-user-data script
#! /bin/bash
SALT_MASTER='172.20.0.9'
DOCKER_OPTS=''
readonly DOCKER_STORAGE='aufs'
apt-get update
apt-get install --yes curl
@canthefason
canthefason / master-start.sh
Last active September 29, 2015 04:53
Kubernetes master-start.sh script
#! /bin/bash
mkdir -p /var/cache/kubernetes-install
cd /var/cache/kubernetes-install
readonly SALT_MASTER='172.20.0.9'
readonly INSTANCE_PREFIX='kubernetes'
readonly NODE_INSTANCE_PREFIX='kubernetes-minion'
readonly CLUSTER_IP_RANGE='10.244.0.0/16'
readonly ALLOCATE_NODE_CIDRS='true'
readonly SERVER_BINARY_TAR_URL='https://s3.amazonaws.com/kubernetes-artifact/devel/kubernetes-server-linux-amd64.tar.gz'
readonly SALT_TAR_URL='https://s3.amazonaws.com/kubernetes-artifact/devel/kubernetes-salt.tar.gz'
@canthefason
canthefason / gist:5b57bb2b2abbe1eac082
Last active September 4, 2015 17:29
golang test coverage
go test -coverprofile=cover.out
go tool cover -html=cover.out
@canthefason
canthefason / reflection
Created June 23, 2015 21:26
Some reflection tips
// for checking if an operand implements Context interface
contextType := reflect.TypeOf((*context.Context)(nil)).Elem()
mtype.Implements(contextType)
curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: localhost:3001/ws" -H "Sec-Websocket-Key: hey" -H "Sec-Websocket-Version: 13" http://localhost:3001/ws
@canthefason
canthefason / Running specific tests in Go
Created June 8, 2014 19:00
How to run only a given test in go
# Compile the test binary as pkg.test
go test -c
# Run the given test
./pkg.test -test.run=TestSomething