Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
etcdutil: NewTLSConfig() don't delete certs dir
Browse files Browse the repository at this point in the history
  • Loading branch information
hongchaodeng committed Mar 8, 2018
1 parent 217a98c commit 78ec574
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/util/etcdutil/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package etcdutil
import (
"crypto/tls"
"io/ioutil"
"os"
"path/filepath"

"github.com/coreos/etcd/pkg/transport"
Expand All @@ -30,11 +29,11 @@ const (
)

func NewTLSConfig(certData, keyData, caData []byte) (*tls.Config, error) {
// TODO: Need cleanup these temp dirs
dir, err := ioutil.TempDir("", "etcd-operator-cluster-tls")
if err != nil {
return nil, err
}
defer os.RemoveAll(dir)

certFile, err := writeFile(dir, CliCertFile, certData)
if err != nil {
Expand Down

0 comments on commit 78ec574

Please sign in to comment.