Skip to content

Commit

Permalink
Merge pull request #138 from linki/read-only
Browse files Browse the repository at this point in the history
Avoid writing klogs to the filesystem
  • Loading branch information
linki committed Aug 14, 2019
2 parents d4bf952 + 4c5bbad commit bc154e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ require (
k8s.io/api v0.0.0-20190620084959-7cf5895f2711
k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719
k8s.io/client-go v0.0.0-20190620085101-78d2af792bab
k8s.io/klog v0.3.1
k8s.io/utils v0.0.0-20190607212802-c55fbcfc754a // indirect
)
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"context"
"fmt"
"io/ioutil"
"math/rand"
"net/http"
_ "net/http/pprof"
Expand All @@ -22,6 +23,7 @@ import (
"k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog"

"github.com/linki/chaoskube/chaoskube"
"github.com/linki/chaoskube/terminator"
Expand Down Expand Up @@ -57,6 +59,7 @@ var (

func init() {
rand.Seed(time.Now().UTC().UnixNano())
klog.SetOutput(ioutil.Discard)

kingpin.Flag("labels", "A set of labels to restrict the list of affected pods. Defaults to everything.").StringVar(&labelString)
kingpin.Flag("annotations", "A set of annotations to restrict the list of affected pods. Defaults to everything.").StringVar(&annString)
Expand Down

0 comments on commit bc154e3

Please sign in to comment.