Skip to content

Instantly share code, notes, and snippets.

View gaorong's full-sized avatar
🎯
Focusing

Rong Gao gaorong

🎯
Focusing
View GitHub Profile
@gaorong
gaorong / pod-sanxbod-ip-check.go
Created September 3, 2019 15:02
this snippet is in order to reproduce kubelet's bug
package main
import (
"flag"
"os"
"time"
"github.com/golang/glog"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@gaorong
gaorong / pod-ip-is-empty.go
Created September 3, 2019 12:53
this process will automatically create-wait-delete pod to reproduce kubelet's issue
package main
import (
"flag"
"os"
"time"
"github.com/golang/glog"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@gaorong
gaorong / heartbeat.go
Last active April 22, 2019 13:59
this file is to emulate heatbeat to server by http/1.1 and http/2.0 respectively
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
@gaorong
gaorong / hook.go
Created February 19, 2019 10:54
this is for logrus log with line number, just add hook.go in logrus's code file with debug
package logrus
import (
"fmt"
"runtime"
"strings"
)
type LineHook struct {
Field string