Skip to content

Instantly share code, notes, and snippets.

[Desktop Entry]
Name=AgileAgent
Exec=env WINEPREFIX="/home/gnufied/.wine" wine "/home/gnufied/.wine/drive_c/Program Files (x86)/1Password 4/Agile1pAgent.exe" &
Type=Application
StartupNotify=true
Path=/home/gnufied/.wine/dosdevices/c:/Program Files (x86)/1Password 4
Icon=C775_1Password.0
╭─ xaos☯  ⸙-2.4.1   master
╰─kube_scripts/nfs_xaos_demo> k get pods
NAME READY STATUS RESTARTS AGE
writer-pod2 1/1 Running 0 57s
╭─ xaos☯  ⸙-2.4.1   master
╰─kube_scripts/nfs_xaos_demo> k delete pod writer-pod2 --now --force=true
pod "writer-pod2" deleted
╭─ xaos☯  ⸙-2.4.1   master
╰─kube_scripts/nfs_xaos_demo> k get pods
NAME READY STATUS RESTARTS AGE
@gnufied
gnufied / run_kube.md
Last active August 25, 2017 19:32
Using Invoker to run kubernetes locally for development

I use Invoker for running Kubernetes locally while developing Kubernetes. It is relatively simple setup and unlike ./hack/local-up-cluster.sh doesn't involve any magical bits that my tiny brain can't understand. It is basically all kubernetes components started and running individually.

You can use following instructions for running kubenetes locally. Just don't forget to change hostname (xaos.lan to match your hostname). Similarly change ip address used here - "192.168.1.71" to your machine's IP address and similarly location of etcd and kubernetes binaries.

  1. Install Invoker ~> gem install invoker

  2. Compile kube ~> cd kube_home; make

oldSize := oldPvc.Spec.Resources.Requests[api.ResourceStorage]
newSize := pvc.Spec.Resources.Requests[api.ResourceStorage]
if newSize.Cmp(oldSize) <= 0 {
return nil
}
if oldPvc.Status.Phase != api.ClaimBound {
return admission.NewForbidden(a, fmt.Errorf("Only bound persistent volume claims can be expanded"))
}
for 37 with volume
Operation * create_delete_loop took on average 73.54864007360001
for 37 without volumes:
Operation create_delete_loop took on average 45.497796535599996
For 35 with volume
Operation * create_delete_loop took on average 48.5834527769

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

-- Inside node_auth.test
^^^^^^^^^^ Original object is &core.PersistentVolumeClaim{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"mypvc", GenerateName:"", Namespace:"ns", SelfLink:"/api/v1/namespaces/ns/persistentvolumeclaims/mypvc", UID:"fff05c83-cf86-11e7-83e4-0242ac110002", ResourceVersion:"1796", Generation:0
, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63646953238, loc:(*time.Location)(0x957dda0)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initialize
rs)(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:core.PersistentVolumeClaimSpec{AccessModes:[]core.PersistentVolumeAccessMode{"ReadOnlyMany"}, Selector:(*v1.LabelSelector)(nil), Resources:core.ResourceRequirements{Limits:core.ResourceList(nil), Requests:core.ResourceList{"storage":resource.Quantity{i:resource
.int64Amount{value:1, scale:0}, d:resou
kind: Pod
apiVersion: v1
metadata:
name: nginx-with-vol
labels:
name: nginx-with-vol
spec:
containers:
- name: nginx-with-vol
image: nginx
feanor_grab_current_context() {
if type "kubectl" > /dev/null; then
kube_context=$(kubectl config current-context 2>/dev/null)
if [[ -z $kube_context ]]; then
kube_context="no_kube"
fi
echo "$kube_context" > /tmp/current-kube-context
echo -n "$kube_context"
fi
}
(setq org-super-agenda-groups
'(;; Each group has an implicit boolean OR operator between its selectors.
(:name "Today"
;; Single arguments given alone
:not(:tag "meetings" :tag "PROJECT"))
(:name "Projects"
;; meetings
:tag "PROJECT")
(:name "Immediately"
;; single argument