Skip to content

Commit

Permalink
Merge pull request #530 from mengqiy/tmpdir
Browse files Browse the repository at this point in the history
🐛 stop using hardcoded temp dir
  • Loading branch information
k8s-ci-robot committed Jul 24, 2019
2 parents 72ab3fe + d4d6a51 commit f770dcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/webhook/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"net"
"net/http"
"path"
"os"
"path/filepath"
"strconv"
"sync"
Expand Down Expand Up @@ -85,7 +85,7 @@ func (s *Server) setDefaults() {
}

if len(s.CertDir) == 0 {
s.CertDir = path.Join("/tmp", "k8s-webhook-server", "serving-certs")
s.CertDir = filepath.Join(os.TempDir(), "k8s-webhook-server", "serving-certs")
}
}

Expand Down

0 comments on commit f770dcb

Please sign in to comment.