Skip to content

Instantly share code, notes, and snippets.

View ncdc's full-sized avatar

Andy Goldstein ncdc

View GitHub Profile
@ncdc
ncdc / stack.txt
Created June 9, 2022 19:54
2 kcp admission inits
# First trace
│I0609 15:50:57.523552 62573 server.go:342] Finished start kube informers │
│E0609 15:50:57.538166 62573 kubequota_admission.go:137] ANDY │
│goroutine 2465 [running]: │
│runtime/debug.Stack() │
│ /usr/local/Cellar/go/1
@ncdc
ncdc / kcp.log
Created January 26, 2022 15:36
kcp ingress source log file - e2e test run
I0126 10:33:12.395799 96588 etcd.go:57] Creating embedded etcd server
{"level":"warn","ts":1643211193.659682,"caller":"fileutil/fileutil.go:57","msg":"check file permission","error":"directory \"/Users/angoldst/go/src/github.com/kcp-dev/kcp/testout/TestIngressController/create_an_ingress_that_points_to_a_valid_service_and_expect_the_Ingress_to_be_scheduled_to_the_same_cluster/2345490025/data/kcp/source\" exist, but the permission is \"drwxr-xr-x\". The recommended permission is \"-rwx------\" to prevent possible unprivileged access to the data"}
{"level":"warn","ts":"2022-01-26T10:33:16.624-0500","caller":"etcdserver/metrics.go:224","msg":"failed to get file descriptor usage","error":"cannot get FDUsage on darwin"}
{"level":"warn","ts":"2022-01-26T10:33:18.036-0500","caller":"etcdserver/util.go:166","msg":"apply request took too long","took":"265.457663ms","expected-duration":"100ms","prefix":"","request":"ID:4097570423066461443 Method:\"PUT\" Path:\"/0/version\" Val:\"3.5.0\" ","response":""}
{"level":"war
@ncdc
ncdc / test.log
Created January 26, 2022 15:30
Output from kcp e2e tests on a 2019 16" MacBook Pro 2.6 GHz 6-Core Intel Core i7 32GB RAM
--- FAIL: TestAPIInheritance (0.00s)
--- FAIL: TestAPIInheritance/Basic_workspace_API_inheritance (70.00s)
util.go:85: Saving test artifacts and data under /var/folders/hf/d3p2y6v55zq4_q709t06cj4w0000gn/T/TestAPIInheritanceBasic_workspace_API_inheritance2907862924/001/TestAPIInheritance/Basic_workspace_API_inheritance/758656762.
test.go:105: Starting kcp servers...
kcp.go:137: running: kcp start --root-directory /var/folders/hf/d3p2y6v55zq4_q709t06cj4w0000gn/T/TestAPIInheritanceBasic_workspace_API_inheritance2907862924/001/TestAPIInheritance/Basic_workspace_API_inheritance/758656762/data/kcp/main --listen=:60446 --etcd-client-port=60447 --etcd-peer-port=60448 --etcd-wal-size-bytes=5000 --kubeconfig-path=admin.kubeconfig --install-workspace-controller
test.go:137: error contacting /livez: Get "https://[::1]:60446/livez": context deadline exceeded
test.go:137: error contacting /readyz: Get "https://[::1]:60446/readyz": context deadline exceeded
kcp.go:132: cle
$ cat workspace-source.yaml
apiVersion: tenancy.kcp.dev/v1alpha1
kind: Workspace
metadata:
name: source
spec:
shard: abc
$ cat workspace-target.yaml
apiVersion: tenancy.kcp.dev/v1alpha1
goroutine profile: total 9
1 @ 0x1032fde 0x10668c8 0x10ee219 0x106a9c1
# 0x10668c7 os/signal.signal_recv+0x27 /usr/local/Cellar/go/1.17.2/libexec/src/runtime/sigqueue.go:166
# 0x10ee218 os/signal.loop+0x18 /usr/local/Cellar/go/1.17.2/libexec/src/os/signal/signal_unix.go:24
1 @ 0x1039856 0x1007a8c 0x10074f8 0x1a1064a 0x106a9c1
# 0x1a10649 k8s.io/klog.(*loggingT).flushDaemon+0x69 /Users/angoldst/go/pkg/mod/k8s.io/klog@v1.0.0/klog.go:1010
1 @ 0x1039856 0x1007a8c 0x10074f8 0x1a66fea 0x106a9c1
# 0x1a66fe9 k8s.io/klog/v2.(*loggingT).flushDaemon+0x69 /Users/angoldst/go/pkg/mod/k8s.io/klog/v2@v2.9.0/klog.go:1169
[
{
"local": "0.0.0.0:58093",
"remote": "192.168.127.2:58093",
"protocol": "tcp"
},
{
"local": ":55834",
"remote": "192.168.127.2:22",
"protocol": "tcp"
@ncdc
ncdc / main_test.go
Last active November 4, 2021 18:09
Go map benchmarks - string vs struct keys
package mapbenchmark
import (
"math/rand"
"strconv"
"testing"
)
type structKey struct {
one string
diff --git a/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go b/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go
index 41ccef8c4..fa157f97a 100644
--- a/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go
+++ b/controlplane/kubeadm/api/v1alpha3/zz_generated.conversion.go
@@ -1,4 +1,4 @@
-// +build !ignore_autogenerated
+// +build !andy_kcp
/*
Copyright The Kubernetes Authors.
@ncdc
ncdc / foo.diff
Last active September 24, 2020 20:29
diff --git a/controllers/machinehealthcheck_targets.go b/controllers/machinehealthcheck_targets.go
index 6f03ed863..2a6de43e3 100644
--- a/controllers/machinehealthcheck_targets.go
+++ b/controllers/machinehealthcheck_targets.go
@@ -58,6 +58,7 @@ const (
// healthCheckTarget contains the information required to perform a health check
// on the node to determine if any remediation is required.
type healthCheckTarget struct {
+ Cluster *clusterv1.Cluster
Machine *clusterv1.Machine
@ncdc
ncdc / foo.diff
Created September 11, 2020 15:25
diff --git a/util/patch/patch.go b/util/patch/patch.go
index e0c2b65b2..78c42ebb2 100644
--- a/util/patch/patch.go
+++ b/util/patch/patch.go
@@ -37,8 +37,8 @@ import (
type Helper struct {
client client.Client
beforeObject runtime.Object
- before *unstructured.Unstructured
- after *unstructured.Unstructured