# rm -rf /var/lib/kubelet/*
# docker run --rm -ti -v /var/lib/kubelet:/var/lib/kubelet fedora /bin/bash
bash-4.3# ls -l /var/lib/kubelet/
total 0
Outside of the container, on the host
# mkdir /var/lib/kubelet/subdir
func doMount(source string, target string, fstype string, options []string) (string, error) { | |
// Build mount command as follows: | |
// mount [-t $fstype] [-o $options] [--source $source] --target $target | |
mountArgs := []string{} | |
if len(fstype) > 0 { | |
mountArgs = append(mountArgs, "-t", fstype) | |
} | |
if options != nil && len(options) > 0 { | |
mountArgs = append(mountArgs, "-o", strings.Join(options, ",")) | |
} |
{ | |
minion: api.Node{ | |
ObjectMeta: api.ObjectMeta{Name: "foo2"}, | |
Spec: api.NodeSpec{Unschedulable: true}, | |
Status: api.NodeStatus{Conditions: []api.NodeCondition{ | |
{Type: api.NodeReady, Status: api.ConditionTrue}, | |
{Type: api.NodeReady, Status: api.ConditionTrue}}}, | |
}, | |
status: "Ready,SchedulingDisabled", | |
}, |
# rm -rf /var/lib/kubelet/*
# docker run --rm -ti -v /var/lib/kubelet:/var/lib/kubelet fedora /bin/bash
bash-4.3# ls -l /var/lib/kubelet/
total 0
Outside of the container, on the host
# mkdir /var/lib/kubelet/subdir
// argsMinusFirstX removes only the first x from args. Otherwise, commands that look like | |
// openshift admin policy add-role-to-user admin my-user, lose the admin argument (arg[4]). | |
func argsMinusFirstX(args []string, x string) []string { | |
for i, y := range args { | |
if x == y { | |
return append(args[:i], args[i+1:]...) | |
} | |
} | |
return args | |
} |
diff --git a/contrib/completions/bash/kubectl b/contrib/completions/bash/kubectl | |
index 639d768..5f546db 100644 | |
--- a/contrib/completions/bash/kubectl | |
+++ b/contrib/completions/bash/kubectl | |
@@ -157,14 +157,13 @@ __handle_word() | |
} | |
# call kubectl get $1, | |
-# use the first column in compgen | |
-# we could use templates, but then would need a template per resource |
gitdm (git data mine) is a tool written by Jonathan Corbet at LWN which he uses to do his 'who wrote the kernel' articles. I spent a couple of minutes (ended up being a couple of hours hacking on gitcm) to run it against kube.
I explicitly ignore merge commits and generated filed (Sorry Patrick Reilly, you had the some huge generated files).
My list of files/dirs I'm ignoring:
Ignore filter on "(Godeps|third_party|api/swagger-spec|pkg/ui/datafile.go|www/.*/shared/assets/sampleData1.json|pkg/assets/bindata.go)"
Grabbing changesets...done
Processed 1692 csets from 73 developers
3 employers found
A total of 240876 lines added, 105802 removed (delta 135074)
Developers with the most changesets
I'm ignoring all merge commits and I'm ignoring all files that match the following regex. This cuts out huge numbers of automatically generated files which hugely skew results.
Ignore filter on "(Godeps|third_party|vendor|docs/theme|.svg|api/swagger-spec|pkg/ui/datafile.go|www/.*/shared/assets/sampleData1.json|pkg/assets/bindata.go)"
(Unknown) 4520 (47.9%)
"Docker" 3821 (40.5%)
# etcdctl get /coreos.com/network/config | |
{"Network": "4.0.0.0/8", "SubnetLen": 24, "Backend": {"Type": "vxlan"}} | |
# etcdctl ls /coreos.com/network/subnets | |
server: | |
flanneld --etcd-endpoints="http://127.0.0.1:4001" --listen=":8081" | |
client1: | |
flanneld --remote="10.12.6.179:8081" |
#!/bin/bash | |
__debug() | |
{ | |
if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then | |
echo "$*" >> "${BASH_COMP_DEBUG_FILE}" | |
fi | |
} | |