Skip to content

Instantly share code, notes, and snippets.

View ironcladlou's full-sized avatar

Dan Mace ironcladlou

View GitHub Profile
#/bin/bash
set -o errexit
set -o nounset
set -o pipefail
master_pid=$1
if [ "${master_pid}" == "" ]; then
echo "usage: profile-cluster.sh <master pid>"
exit 1
@ironcladlou
ironcladlou / gist:38f229462e107942a1ee
Last active February 24, 2016 17:52
Speedy NFS shares
config.vm.synced_folder ".", "/nfs/vagrant", type: "nfs"
config.bindfs.bind_folder "/nfs/vagrant", "/vagrant", :owner => "1000", :group => "1000", :perms => 'u=u:g=g:o=o', :'create-as-user' => true
config.vm.synced_folder "#{ENV['GOPATH']}/src", "/nfs/src", type: "nfs", mount_options: [
'vers=3',
'rw',
'tcp',
'fsc',
'intr',
'rsize=1048576',
'wsize=1048576'
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
# name must be in the form: plural.group
name: clustercrontabss.stable.example.com
spec:
# group name to use for REST API: /apis/<group>/<version>
group: stable.example.com
# version name to use for REST API: /apis/<group>/<version>
version: v1
$ /usr/local/opt/curl/bin/curl -k --cert /var/run/kubernetes/client-admin.crt --key /var/run/kubernetes/client-admin.key --cacert /var/run/kubernetes/client-ca.crt -H 'Accept: application/json;as=PartialObjectMetadata;v=v1alpha1;g=meta.k8s.io' https://localhost:6443/api/v1/namespaces/kube-system/configmaps/kube-dns
{
"kind": "PartialObjectMetadata",
"apiVersion": "meta.k8s.io/v1alpha1",
"metadata": {
"name": "kube-dns",
"namespace": "kube-system",
"selfLink": "/api/v1/namespaces/kube-system/configmaps/kube-dns",
"uid": "adce7608-7df6-11e7-a55a-acbc32bcadbb",
"resourceVersion": "162",
@ironcladlou
ironcladlou / good-grief.txt
Created October 7, 2017 20:27
Good Grief
E
B
G
D 8 11 3 6
A 11 11 6 6
D 8 11 3 6
@ironcladlou
ironcladlou / notes.md
Created October 16, 2017 12:58
Origin Gubernator Triage Notes

docker run --rm -it
-e GOOGLE_APPLICATION_CREDENTIALS=/etc/gcp-token.json
-v $HOME/Downloads/aos-kettle-72e5c837667e.json:/etc/gcp-token.json
-v $HOME/tmp/kettle-build.db:/data/build.db
-v $PWD/../buckets.yaml:/buckets.yaml
-v $PWD/make_db.py:/kettle/make_db.py
-v $PWD/update.py:/kettle/update.py
-v $PWD/make_json.py:/kettle/make_json.py
-v $PWD/make_db.py:/kettle/make_db.py
-v $PWD/model.py:/kettle/model.py \

@ironcladlou
ironcladlou / envrc
Last active November 30, 2017 21:30
VSCode settings for Kubernetes/Origin
export GOROOT="$HOME/.go/dist/go1.9.2"
export GOPATH=$(expand_path .)
export KUBECONFIG=/var/run/kubernetes/admin.kubeconfig
export PATH="$GOROOT/bin:$PATH:$(expand_path .)/bin"
#!/bin/bash
# REQUIRES: https://github.com/coreos/prometheus-operator/pull/986
OPERATOR=$HOME/Projects/prometheus-operator/src/github.com/coreos/prometheus-operator
oc login -u system:admin
oc new-project monitoring
oc apply -f $OPERATOR/contrib/kube-prometheus/manifests/prometheus-operator
@ironcladlou
ironcladlou / settings.json
Created February 14, 2018 17:26
Health Check App VSCode settings
{
"files.exclude": {
"_output": true,
".tito": true,
},
"go.testTimeout": "5s",
"go.goroot": "/Users/dan/.go/dist/go1.9.4",
"go.toolsGopath": "/Users/dan/Projects/monitor-project-lifecycle",
"go.gopath": "/Users/dan/Projects/monitor-project-lifecycle"
}
@ironcladlou
ironcladlou / settings.json
Created February 15, 2018 14:18
VSCode User Settings
// Place your settings in this file to overwrite the default settings
{
"window.newWindowDimensions": "maximized",
"editor.fontFamily": "Monaco",
"editor.fontSize": 14,
"editor.tabSize": 2,
"files.autoSave": "off",
"editor.selectionHighlight": false,
"editor.quickSuggestions": false,
"editor.suggestOnTriggerCharacters": false,