Skip to content

Instantly share code, notes, and snippets.

View ncdc's full-sized avatar

Andy Goldstein ncdc

View GitHub Profile
=== RUN TestReconcile
^\SIGQUIT: quit
PC=0x7fff75e5065c m=0 sigcode=0
goroutine 0 [idle]:
syscall.syscall6(0x10aa080, 0x226f, 0xc0000706a4, 0x0, 0xc0003d0000, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.12.1/libexec/src/runtime/sys_darwin.go:74 +0x2e fp=0xc0000705f0 sp=0xc0000705c8 pc=0x104d9de
syscall.wait4(0x226f, 0xc0000706a4, 0x0, 0xc0003d0000, 0x90, 0x20e68e0, 0x1)
/usr/local/Cellar/go/1.12.1/libexec/src/syscall/zsyscall_darwin_amd64.go:42 +0x88 fp=0xc000070668 sp=0xc0000705f0 pc=0x10a6518
syscall.Wait4(0x226f, 0xc0000706f4, 0x0, 0xc0003d0000, 0x0, 0x0, 0x0)
@ncdc
ncdc / cluster.yaml
Created May 9, 2019 19:35
Cluster API 9 May 2019 webinar example yaml files
apiVersion: "cluster.k8s.io/v1alpha1"
kind: Cluster
metadata:
name: demo1
spec:
clusterNetwork:
services:
cidrBlocks: ["10.96.0.0/12"]
pods:
cidrBlocks: ["192.168.0.0/16"]
This file has been truncated, but you can view the full file.
building: _output/bin/linux/amd64/velero
/Library/Developer/CommandLineTools/usr/bin/make shell CMD="-c '\
GOOS=linux \
GOARCH=amd64 \
VERSION=master \
PKG=github.com/heptio/velero \
BIN=velero \
OUTPUT_DIR=/output/linux/amd64 \
./hack/build.sh'"
cd hack/build-image && docker build -t velero-builder .
@ncdc
ncdc / main.go
Created November 29, 2018 20:10
func (s *server) run() error {
// do things
widget, err := widgetClient.Foo("abc")
if err != nil {
// QUESTION: what should the top of the stack be (what line)?
optionallyLogStackAtDebugLogLevel(err)
// other error handling
}
}
@ncdc
ncdc / kubeconfig
Created August 6, 2018 18:18
kubicorn kubeconfig
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: [snip]
server: https://[snip]:443
name: kubernetes
contexts:
- context:
cluster: kubernetes
user: kubernetes-admin
@ncdc
ncdc / class.yaml
Created June 27, 2018 17:37
Kubernetes NFS provisioner setup
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: example-nfs
provisioner: example.com/nfs
parameters:
gid: "1001"
rootSquash: "false"
mountOptions: "vers=4.1"
andy@Heptios-MacBook-Pro:~/go/src/github.com/heptio/ark (real-restic-andy) ~/go/src/k8s.io/code-generator/generate-groups.sh all github.com/heptio/ark/pkg/generated github.com/heptio/ark/pkg/apis ark:v1 --go-header-file hack/boilerplate.go.txt
can't load package: package github.com/heptio/ark/Users/andy/go/src/k8s.io/code-generator/cmd/defaulter-gen: cannot find package "github.com/heptio/ark/Users/andy/go/src/k8s.io/code-generator/cmd/defaulter-gen" in any of:
/usr/local/Cellar/go/1.10.2/libexec/src/github.com/heptio/ark/Users/andy/go/src/k8s.io/code-generator/cmd/defaulter-gen (from $GOROOT)
/Users/andy/go/src/github.com/heptio/ark/Users/andy/go/src/k8s.io/code-generator/cmd/defaulter-gen (from $GOPATH)
can't load package: package github.com/heptio/ark/Users/andy/go/src/k8s.io/code-generator/cmd/client-gen: cannot find package "github.com/heptio/ark/Users/andy/go/src/k8s.io/code-generator/cmd/client-gen" in any of:
/usr/local/Cellar/go/1.10.2/libexec/src/github.com/heptio/ark/Users/a
diff --git a/pkg/backup/item_backupper_test.go b/pkg/backup/item_backupper_test.go
index 6371377..7d825f5 100644
--- a/pkg/backup/item_backupper_test.go
+++ b/pkg/backup/item_backupper_test.go
@@ -140,6 +140,7 @@ func TestBackupItemNoSkips(t *testing.T) {
groupResource string
snapshottableVolumes map[string]api.VolumeBackupInfo
snapshotError error
+ additionalItemError error
}{
@ncdc
ncdc / Gopkg.lock
Last active May 23, 2018 13:52
Time how long it takes to determine an s3 bucket's region
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
name = "github.com/aws/aws-sdk-go"
packages = [
"aws",
"aws/awserr",
"aws/awsutil",
"aws/client",
@ncdc
ncdc / foo.go
Last active May 17, 2018 16:09
// option 1
arkplugin.NewSimpleServer().
RegisterObjectStores(map[string]func() cloudprovider.ObjectStore{
"aws": setupAws,
"azure": azure.NewObjectStore,
"gcp": setupGcp,
}).
RegisterBlockStores(map[string]func() cloudprovider.BlockStore{
"aws": aws.NewBlockStore,
"azure": azure.NewBlockStore,