Skip to content

Instantly share code, notes, and snippets.

View roycaihw's full-sized avatar

Haowei Cai (Roy) roycaihw

View GitHub Profile
@roycaihw
roycaihw / kube-apiserver.panic.after
Last active April 2, 2019 19:52
panic log difference after/before
E0402 11:02:52.495590 159816 runtime.go:71] Observed a panic: test panic
goroutine 3247 [running]:
k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/handlers.finishRequest.func1.1(0x...)
$GOPATH/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go:203 +0x...
panic(0x..., 0x...)
$GOROOT/src/runtime/panic.go:522 +0x...
k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/handlers.finishRequest.func1(0x..., 0x..., 0x..., 0x...)
$GOPATH/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go:213 +0x...
created by k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/handlers.finishRequest
$GOPATH/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/endpoints/handlers/rest.go:194 +0x...
@roycaihw
roycaihw / panicparse.result
Created March 29, 2019 00:04
panicparse result from github.com/maruel/panicparse
$ pp /tmp/kube-apiserver.log.panic
E0328 16:10:10.806679 24517 runtime.go:68] Observed a panic: test panic
1: running [Created by handlers.finishRequest @ rest.go:194]
debug stack.go:24 Stack(0xc008b93ed0, #1, #2)
handlers rest.go:203 finishRequest.func1.1(Duration(#4))
panic.go:522 panic(interface{}(#1))
handlers rest.go:213 finishRequest.func1(#4, #3, 0xc00500a1e0, 0xc00500a180)
1: running [Created by filters.(*timeoutHandler).ServeHTTP @ timeout.go:97]
debug stack.go:24 Stack(#46, #1, #42)
filters timeout.go:105 (*timeoutHandler).ServeHTTP.func1.1(*timeoutHandler(#45))
@roycaihw
roycaihw / crd_definition.json
Created February 7, 2019 19:13
schema(definition) for a object with only k8s gvk extensions
"$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClassList"
},
"io.k8s.samplecontroller.v1alpha1.Foo": {
"x-kubernetes-group-version-kind": [
{
"group": "samplecontroller.k8s.io",
"kind": "Foo",
"version": "v1alpha1"
}
]
@roycaihw
roycaihw / invalid_name_workqueue.log
Created December 6, 2018 03:42
workqueue with invalid name for prometheus metric
$ grep -r "workqueue.New.*-"
pkg/controller/disruption/disruption_test.go: dc.recheckQueue = workqueue.NewNamedDelayingQueue("pdb-queue")
pkg/controller/disruption/disruption.go: recheckQueue: workqueue.NewNamedDelayingQueue("disruption-recheck"),
pkg/controller/certificates/rootcacertpublisher/publisher.go: queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "root-ca-cert-publisher"),
pkg/controller/deployment/progress_test.go: queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "doesnt-matter"),
@roycaihw
roycaihw / registration_failure.log
Created December 6, 2018 03:12
metrics failed to be registered
E1205 19:07:50.524562 109101 prometheus.go:42] failed to register depth metric admission_quota_controller: duplicate metrics collector registration attempted
E1205 19:07:50.524582 109101 prometheus.go:54] failed to register adds metric admission_quota_controller: duplicate metrics collector registration attempted
E1205 19:07:50.524610 109101 prometheus.go:66] failed to register latency metric admission_quota_controller: duplicate metrics collector registration attempted
E1205 19:07:50.524639 109101 prometheus.go:78] failed to register work_duration metric admission_quota_controller: duplicate metrics collector registration attempted
E1205 19:07:50.524657 109101 prometheus.go:93] failed to register unfinished_work_seconds metric admission_quota_controller: duplicate metrics collector registration attempted
E1205 19:07:50.524671 109101 prometheus.go:106] failed to register longest_running_processor_microseconds metric admission_quota_controller: duplicate metrics collector registration attempted
E1205 19:
@roycaihw
roycaihw / crd_swagger_no_subresources_json.diff
Created November 15, 2018 18:42
served openapi spec for new crd without subresources
65109a65110,66075
> "/apis/samplecontroller.k8s.io/v1alpha1/namespaces/{namespace}/foos": {
> "get": {
> "description": "list or watch objects of kind Foo",
> "consumes": [
> "application/json",
> "application/yaml"
> ],
> "produces": [
> "application/json",
@roycaihw
roycaihw / mutl_version_crd_openapi_spec.diff
Created November 9, 2018 01:30
sample openapi spec for registered multi-version crd
65109a65110,66667
> "/apis/samplecontroller.k8s.io/v1alpha1/namespaces/{namespace}/foos": {
> "get": {
> "description": "list or watch objects of kind Foo",
> "consumes": [
> "application/json",
> "application/yaml"
> ],
> "produces": [
> "application/json",
@roycaihw
roycaihw / crd_openapi_spec.diff
Created August 14, 2018 00:19
sample openapi spec for registered crd
62350,63128d62349
"/apis/samplecontroller.k8s.io/v1alpha1/namespaces/{namespace}/foos": {
"get": {
"description": "list or watch objects of kind Foo",
"consumes": [
"application/json",
"application/yaml"
],
"produces": [
"application/json",
@roycaihw
roycaihw / crd_openapi_spec.diff
Created August 13, 2018 23:05
Sample OpenAPI spec for registered CRD
62350,63102d62349
"/apis/samplecontroller.k8s.io/v1alpha1/namespaces/{namespace}/foos": {
"get": {
"description": "list or watch objects of kind Foo",
"consumes": [
"application/json",
"application/yaml"
],
"produces": [
"application/json",
@roycaihw
roycaihw / crd_openapi_spec.diff
Created August 13, 2018 23:03
Sample OpenAPI spec of registered CRD
62350,63102d62349
< "/apis/samplecontroller.k8s.io/v1alpha1/namespaces/{namespace}/foos": {
< "get": {
< "description": "list or watch objects of kind Foo",
< "consumes": [
< "application/json",
< "application/yaml"
< ],
< "produces": [
< "application/json",