Skip to content

Instantly share code, notes, and snippets.

View dcosgrove's full-sized avatar

David Cosgrove dcosgrove

  • SF/NYC
View GitHub Profile

Keybase proof

I hereby claim:

  • I am dcosgrove on github.
  • I am dcosgrove (https://keybase.io/dcosgrove) on keybase.
  • I have a public key ASCuVs_Xqjl_eceXaEQHjDdXdvHrkL_flFYIdYUgK6LECgo

To claim this, I am signing this object:

@dcosgrove
dcosgrove / steps.md
Created November 2, 2018 20:49
Enabling batch/v2alpha1 and batch/v1beta1 on running Kubernetes cluster

Steps

  1. Pull down the existing spec for apiserver daemonset and modify it with the new parameter
  • kubectl get daemonsets/kube-apiserver --namespace=kube-system -o json > pod.json
  • Edit pod.json: under spec.containers.command, add another entry to the array of parameters:--runtime-config=batch/v2alpha1
  1. Replace the kube-apiserver spec with your newly updated spec
  • kubectl replace -f ./pod.json
  • Note that the replace command will fail and not update the pod if the configuration you try to replace with doesn't pass validation
  • Confirm API server pods are brought back up with kubectl get pods --namespace=kube-system | grep apiserver
@dcosgrove
dcosgrove / this.js
Created September 14, 2018 18:20
'this' issue when wrapping
const Person = function(name) {
this.name = name;
this.PrintName = function() {
console.log(`My name is ${this.name}`);
}
}
const Bill = new Person('Bill');
Bill.PrintName(); // "My name is Bill"

Keybase proof

I hereby claim:

  • I am dcosgrove on github.
  • I am dcosgrove (https://keybase.io/dcosgrove) on keybase.
  • I have a public key ASBhPY9AcCQ-Gn83QZPVtCGfY-jXAyA-B_7Wzq-usK6N6go

To claim this, I am signing this object:

package main
import (
"fmt"
"io"
"net/http"
"time"
)
func asyncA() string {