Skip to content

Commit f770dcb

Browse files
authored
Merge pull request #530 from mengqiy/tmpdir
🐛 stop using hardcoded temp dir
2 parents 72ab3fe + d4d6a51 commit f770dcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/webhook/server.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"fmt"
2323
"net"
2424
"net/http"
25-
"path"
25+
"os"
2626
"path/filepath"
2727
"strconv"
2828
"sync"
@@ -85,7 +85,7 @@ func (s *Server) setDefaults() {
8585
}
8686

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

0 commit comments

Comments
 (0)